From 53688d93fd1000fc2c74d5e210691a3e7fe2e642 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 16 May 2023 14:52:56 -0700 Subject: [PATCH 001/200] Added dependency --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 03a4533a..ff26e161 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,6 +26,7 @@ scanner-rust = "2.0.16" serde = { version = "1", features = ["derive"] } serde_json = "1" similar = "2" +solang-parser = "=0.2.4" strum = "0.24.1" strum_macros = "0.24.3" tempfile = "3" From d51202c0695ce8690cc08aa5678733dc9314caa5 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 17 May 2023 13:57:58 -0700 Subject: [PATCH 002/200] Temp commit: Removed AST and some initial refactors before using solang parser --- src/ast.rs | 349 ----------------------------------------------- src/compile.rs | 121 ---------------- src/filter.rs | 54 +++++++- src/lib.rs | 10 +- src/mutation.rs | 221 ++++++------------------------ src/mutator.rs | 262 ++++++++++++++++++++++------------- src/test_util.rs | 14 -- 7 files changed, 259 insertions(+), 772 deletions(-) delete mode 100644 src/ast.rs diff --git a/src/ast.rs b/src/ast.rs deleted file mode 100644 index c995d7e5..00000000 --- a/src/ast.rs +++ /dev/null @@ -1,349 +0,0 @@ -use regex::Regex; -use serde::Deserialize; -use serde_json::Value; - -/// This is a thin wrapper around the json AST -/// generated by the solidity compiler. - -#[derive(Debug, Deserialize, Default, Clone)] -pub struct TypeDescriptions { - pub(crate) element: Option, -} - -impl TypeDescriptions { - pub fn new(v: Value) -> Self { - if v.is_null() { - Self { element: None } - } else { - Self { element: Some(v) } - } - } - - pub fn type_string(&self) -> Option { - self.element.as_ref().map(|e| e["typeString"].to_string()) - } -} - -/// Solidity AST representation. -/// -/// There are two fields, `element` which is the underlying json object -/// representing an AST node and `contract` which indicates the name of the -/// contract that this node belongs to. -#[derive(Debug, Deserialize, Default, Clone)] -#[serde(default)] -pub struct SolAST { - pub(crate) element: Option, -} - -impl SolAST { - /// Create a new AST node. - pub fn new(v: Value) -> Self { - if v.is_null() { - Self { element: None } - } else { - Self { element: Some(v) } - } - } - - /// Return the `element` field of a `SolAST` struct. - pub fn get_object(&self) -> Option { - self.element.clone() - } - - /// Return some node of this AST that has the field name `fnm` in the json - /// representation. - pub fn get_node(&self, fnm: &str) -> SolAST { - let node: SolAST = self.get_object().map_or_else( - || SolAST { element: None }, - |v| SolAST { - element: Some(v[fnm].clone()), - }, - ); - node - } - - pub fn is_literal(&self) -> bool { - self.node_type() == Some("Literal".into()) - } - - /// Check if this node has kind `"number"` or if it is a unary operator `"-"` - /// on a kind "number". - /// - /// This function is necessary because solc doesn't parse negative integer - /// literals as literals, but rather as a negative unary operator applied to - /// a literal. For instance, solc parses `-1` as - /// - /// `(unop '-' (number 1))` - pub fn is_literal_number(&self) -> bool { - let k = self.node_kind(); - if Some("number".into()) == k { - true - } else if self.node_type() == Some("UnaryOperator".into()) - && self.operator() == Some("-".into()) - { - let operand = self.get_node("subExpression"); - operand.node_kind() == Some("number".into()) - } else { - false - } - } - - /// A helper that is used in various places to get the value of some - /// field name (`fnm`) in the AST's `element`. - pub fn get_string(&self, fnm: &str) -> Option { - let obj = self.get_object(); - match obj { - Some(o) => { - let v = o[fnm].as_str(); - v.map(|s| s.into()) - } - None => None, - } - } - - /// Returns the `src` field. - pub fn src(&self) -> Option { - self.get_string("src") - } - - /// Returns the `name` field. - pub fn name(&self) -> Option { - self.get_string("name") - } - - /// Returns the `node_type` field. - pub fn node_type(&self) -> Option { - self.get_string("nodeType") - } - - pub fn node_kind(&self) -> Option { - self.get_string("kind") - } - - /// Returns the `expression` field. - pub fn expression(&self) -> SolAST { - self.get_node("expression") - } - - /// Returns the `operator` field. - pub fn operator(&self) -> Option { - self.get_string("operator") - } - - /// Returns the `leftExpression` field. - pub fn left_expression(&self) -> SolAST { - self.get_node("leftExpression") - } - - /// Returns the `rightExpression` field. - pub fn right_expression(&self) -> SolAST { - self.get_node("rightExpression") - } - - /// Returns the `leftHandSide` field. - pub fn left_hand_side(&self) -> SolAST { - self.get_node("leftHandSide") - } - - /// Returns the `rightHandSide` field. - pub fn right_hand_side(&self) -> SolAST { - self.get_node("rightHandSide") - } - - /// Returns the `arguments` representing argument nodes to some function. - pub fn arguments(&self) -> Vec { - let o = self.get_object(); - match o { - None => vec![], - Some(v) => { - let arg = &v["arguments"].as_array(); - match arg { - Some(lst) => lst.iter().map(|e| Self::new(e.clone())).collect(), - None => vec![], - } - } - } - } - - /// Returns `statements` in some block. - pub fn statements(&self) -> Vec { - let o = self.get_object(); - match o { - None => vec![], - Some(v) => { - let arg = &v["statements"].as_array(); - match arg { - Some(lst) => lst.iter().map(|e| Self::new(e.clone())).collect(), - None => vec![], - } - } - } - } - - /// Returns the `condition` field. - pub fn condition(&self) -> SolAST { - self.get_node("condition") - } - - /// Returns the `trueBody` field. - pub fn true_body(&self) -> SolAST { - self.get_node("trueBody") - } - - /// Returns the `falseBody` field. - pub fn false_body(&self) -> SolAST { - self.get_node("falseBody") - } - - /// Returns the `typeDescriptions` field. - pub fn get_type_descs(&self) -> Option { - self.get_object() - .map(|obj| TypeDescriptions::new(obj["typeDescriptions"].clone())) - } - - /// Recursively traverses the AST. - /// - /// This is how Gambit determines what nodes can be mutated using which - /// types of mutations and the exact location in the source where the - /// mutation must be done. - /// - /// # Arguments - /// - /// * `visitor` - see [`run::RunMutations::mk_closures()`] - /// * `skip` - see [`run::RunMutations::mk_closures()`] - /// * `accept` - see [`run::RunMutations::mk_closures()`] - pub fn traverse(self, visitor: &dyn SolASTVisitor, arg: A) -> Vec { - let mut result: Vec = vec![]; - self.traverse_internal(visitor, &arg, &mut result); - result - } - - /// Helper function to traverse AST - /// - /// # Arguments - /// - /// * `visitor` - see [`run::RunMutations::mk_closures()`] - /// * `skip` - see [`run::RunMutations::mk_closures()`] - /// * `accept` - see [`run::RunMutations::mk_closures()`] - /// * `accepted` - is this node the descendent of an accepted node? This - /// value is monotonic as we descend an AST: it begins as false but once - /// set to true will be true for all recursive calls - /// * `acc` - TODO: ? - fn traverse_internal( - &self, - visitor: &dyn SolASTVisitor, - arg: &A, - acc: &mut Vec, - ) { - log::debug!( - "Traversing Node: kind: {:?}, type: {:?}", - self.node_kind(), - self.node_type(), - ); - if visitor.skip_node(self, arg) { - log::debug!(" Skipping"); - return; - } - - if let Some(result) = visitor.visit_node(self, arg) { - log::debug!(" Visit successful"); - acc.push(result); - } else { - log::debug!(" Visit failed") - } - - if self.element.is_none() { - return; - } - - let e = self.element.as_ref().unwrap(); - if e.is_object() { - let e_obj = e.as_object().unwrap(); - - // TODO: We are _cloning_ entire ASTs! This is no bueno! - log::debug!(" Recursively traversing children"); - for v in e_obj.values() { - let child: SolAST = SolAST::new(v.clone()); - child.traverse_internal(visitor, arg, acc); - } - } else if e.is_array() { - let e_arr = e.as_array().unwrap(); - for a in e_arr { - let child: SolAST = SolAST::new(a.clone()); - child.traverse_internal(visitor, arg, acc); - } - } - } - - /// Extracts the bounds from the AST that indicate where in the source - /// a node's text starts and ends. - /// This is represented by the `src` field in the AST about which more - /// information can be found [here](https://docs.soliditylang.org/en/v0.8.17/using-the-compiler.html?highlight=--ast-compact--json#compiler-input-and-output-json-description). - pub fn get_bounds(&self) -> (usize, usize) { - let src = self.src().expect("Source information missing."); - let parts: Vec<&str> = src.split(':').collect(); - let start = parts[0].parse::().unwrap(); - (start, start + parts[1].parse::().unwrap()) - } - - /// Returns the text corresponding to an AST node in the given `source`. - pub fn get_text(&self, source: &[u8]) -> String { - let (start, end) = self.get_bounds(); - let byte_vec = source[start..end].to_vec(); - String::from_utf8(byte_vec).expect("Slice is not u8.") - } - - /// This method is used by a variety of mutations like `FunctionCallMutation`, - /// `RequireMutation`, etc. (see more in `mutation.rs`) to directly - /// mutate the source guided by information gathered from traversing the AST. - pub fn replace_in_source(&self, source: &[u8], new: String) -> String { - let (start, end) = self.get_bounds(); - self.replace_part(source, new, start, end) - } - - /// This method is used to replace part of a statement. - /// Example mutation types that use it are are `BinaryOperatorMutation`, - /// `UnaryOperatorMutation`, and `ElimDelegateMutation`. - pub fn replace_part(&self, source: &[u8], new: String, start: usize, end: usize) -> String { - let before = &source[0..start]; - let changed = new.as_bytes(); - let after = &source[end..source.len()]; - let res = [before, changed, after].concat(); - String::from_utf8(res).expect("Slice is not u8.") - } - - /// This method is used for mutations that comment out - /// some piece of code using block comments. - pub fn comment_out(&self, source: &[u8]) -> String { - let (start, mut end) = self.get_bounds(); - let rest_of_str = String::from_utf8(source[end..source.len()].to_vec()) - .unwrap_or_else(|_| panic!("cannot convert bytes to string.")); - let mtch = Regex::new(r"^\*").unwrap().find(rest_of_str.as_str()); - if let Some(m) = mtch { - end += - rest_of_str[0..m.range().last().unwrap_or_else(|| { - panic!("There was a match but last() still returned None.") - }) + 1] - .as_bytes() - .len(); - } - self.replace_part( - source, - "/*".to_string() + &String::from_utf8(source[start..end].to_vec()).unwrap() + "*/", - start, - end, - ) - } -} - -/// Implement this to traverse an AST -pub trait SolASTVisitor { - /// Performs logic on a given node - fn visit_node(&self, node: &SolAST, arg: &A) -> Option; - - /// Determines if this node should not be recursively visited. If `true`, - /// this will not be visited, nor will its children - fn skip_node(&self, _node: &SolAST, _arg: &A) -> bool { - false - } -} diff --git a/src/compile.rs b/src/compile.rs index 2b93a9c9..351b504b 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -1,9 +1,6 @@ use crate::invoke_command; -use crate::SolAST; -use serde_json::Value; use std::{ error, - fs::File, path::{Path, PathBuf}, }; @@ -13,10 +10,8 @@ type CompilerRet = (i32, Vec, Vec); /// helper functions. The main object of interest in this module is `Solc`. /// compilation constants -static INPUT_JSON: &str = "input_json"; static ALLOWPATH: &str = "--allow-paths"; static OPTIMIZE: &str = "--optimize"; -static DOT_JSON: &str = ".json"; /// Compilation configurations. This exists across compilations of individual /// files @@ -76,69 +71,6 @@ impl Solc { } impl Solc { - /// Compile a solidity file to an AST - /// - /// This method: - /// 1. Creates a new directory in `self.conf.output_directory` to store the - /// compiled AST file - /// 2. Invokes solc with flags derived from `self.conf` - /// 3. Copies the AST file to a JSON file in the same directory - /// 4. Reads the JSON into a SolAST struct and returns it - pub fn compile_ast(&self, solidity_file: &Path) -> Result> { - log::debug!( - "Invoking AST compilation (--stop-after parse) on {}", - solidity_file.display() - ); - let outdir = &self.output_directory; - let mk_dir_result = Self::make_ast_dir(solidity_file, outdir.as_path()); - let (ast_dir, ast_path, json_path) = match mk_dir_result { - Ok(x) => x, - Err(e) => { - log::error!( - "Error: Failed to run make_ast_dir({}, {})\nEncountered error {}", - solidity_file.display(), - outdir.as_path().display(), - e - ); - return Err(e); - } - }; - - match self.invoke_compiler(solidity_file, &ast_dir, false) { - Ok((code, stdout, stderr)) => { - if code != 0 { - log::error!( - "Solidity compiler returned exit code {} on file `{}`", - code, - solidity_file.display() - ); - log::error!("stdout: {}", String::from_utf8(stdout).unwrap()); - log::error!("stderr: {}", String::from_utf8(stderr).unwrap()); - } - } - Err(e) => { - log::error!( - "Failed to compile source with invoke_compiler({}, {}, {}) \nEncountered error {}", - solidity_file.display(), - ast_dir.display(), - true, - e - ); - return Err(e); - } - } - std::fs::copy(&ast_path, &json_path)?; - log::debug!("Wrote AST to {}", &ast_path.display()); - log::debug!("Wrote AST as JSON to {}", &json_path.display()); - - let json_f = File::open(&json_path)?; - let ast_json: Value = serde_json::from_reader(json_f)?; - log::debug!("Deserialized JSON AST from {}", &json_path.display()); - Ok(SolAST { - element: Some(ast_json), - }) - } - /// Invoke the full solidity compiler and return the exit code, stdout, and stderr pub fn compile( &self, @@ -211,59 +143,6 @@ impl Solc { } } - /// A helper function to create the directory where the AST (.ast) and it's - /// json representation (.ast.json) are stored. - /// - /// # Arguments - /// - /// * `solidity_file` - Solidity file that is going to be compiled - /// * `output_directory` - The output directory - /// - /// # Returns - /// - /// This returns a 3-tuple: - /// * `ast_dir` - the path to the directory of the solidity AST - /// * `ast_path` - the solidity AST file (contained inside `sol_ast_dir`) - /// * `json_path` - the solidity AST JSON file (contained inside - /// `sol_ast_dir`) - fn make_ast_dir( - solidity_file: &Path, - output_directory: &Path, - ) -> Result<(PathBuf, PathBuf, PathBuf), Box> { - let extension = solidity_file.extension(); - if extension.is_none() || !extension.unwrap().eq("sol") { - panic!("Invalid Extension: {}", solidity_file.display()); - } - - let input_json_dir = output_directory.join(INPUT_JSON); - if input_json_dir.exists() { - log::debug!("{} already exists", input_json_dir.display()); - } else { - log::debug!("{} doesn't exist", input_json_dir.display()); - } - - let filename = PathBuf::from(solidity_file.file_name().unwrap()); - let sol_ast_dir = input_json_dir - .join(filename) - .parent() - .unwrap() - .to_path_buf(); - - std::fs::create_dir_all(&sol_ast_dir)?; - log::debug!("Created AST directory {}", input_json_dir.display()); - - let ast_fnm = Path::new(solidity_file) - .file_name() - .unwrap() - .to_str() - .unwrap() - .to_owned() - + "_json.ast"; - let ast_path = sol_ast_dir.join(&ast_fnm); - let json_path = sol_ast_dir.join(ast_fnm + DOT_JSON); - Ok((sol_ast_dir, ast_path, json_path)) - } - /// Create the compilation flags for compiling `solidity_file` in `ast_dir` fn make_compilation_flags( &self, diff --git a/src/filter.rs b/src/filter.rs index ec91c088..783c4683 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -1,8 +1,9 @@ use rand::prelude::*; use rand_chacha::ChaCha8Rng; use std::error; +use tempfile::{tempdir, NamedTempFile}; -use crate::{Mutant, Mutator}; +use crate::{Mutant, MutantWriter, Mutator, Solc}; /// This module downsamples mutants. @@ -26,11 +27,17 @@ pub struct RandomDownSampleFilter { /// Should filtered mutants be validated with an external compiler run? This /// is more expensive but disabling this option may produce invalid mutants. validate: bool, + + validator: Validator, } impl RandomDownSampleFilter { - pub fn new(seed: Option, validate: bool) -> Self { - Self { seed, validate } + pub fn new(seed: Option, validate: bool, validator: Validator) -> Self { + Self { + seed, + validate, + validator, + } } } @@ -57,7 +64,7 @@ impl MutantFilter for RandomDownSampleFilter { let idx = r.gen_range(0..mutants.len()); let mutant = mutants.remove(idx); if self.validate() { - if let Ok(true) = mutator.validate_mutant(&mutant.1) { + if let Ok(true) = self.validator.validate_mutant(&mutant.1) { sampled.push(mutant) } } else { @@ -74,3 +81,42 @@ impl MutantFilter for RandomDownSampleFilter { self.validate } } + +/// Responsible for mutant validation logic +pub struct Validator { + pub solc: Solc, +} + +impl Validator { + /// validate a mutant by writing it to disk and compiling it. If compilation + /// fails then this is an invalid mutant. + pub fn validate_mutant(&self, mutant: &Mutant) -> Result> { + let source_filename = mutant.source.filename(); + let source_parent_dir = source_filename.parent().unwrap(); + let mutant_file = NamedTempFile::new_in(source_parent_dir)?; + let mutant_file_path = mutant_file.path(); + log::debug!( + "Validating mutant of {}: copying mutated code to {}", + source_filename.display(), + mutant_file_path.display() + ); + let dir = tempdir()?; + MutantWriter::write_mutant_to_file(mutant_file_path, mutant)?; + let code = match self.solc.compile(mutant_file_path, dir.path()) { + Ok((code, _, _)) => code == 0, + Err(_) => false, + }; + Ok(code) + } + + pub fn get_valid_mutants(&self, mutants: &[Mutant]) -> Vec { + log::info!("Validating mutants..."); + let mut valid_mutants = vec![]; + for m in mutants.iter() { + if let Ok(true) = self.validate_mutant(m) { + valid_mutants.push(m.clone()) + } + } + valid_mutants + } +} diff --git a/src/lib.rs b/src/lib.rs index 8f38779d..6d1844c5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,8 +1,5 @@ -mod ast; use std::{collections::HashMap, fs, path::PathBuf, time::Instant}; -pub use ast::*; - mod cli; pub use cli::*; @@ -133,6 +130,9 @@ pub fn run_mutate( // TODO: Separate out Filtering from Validation // Check if we are filtering + let validator = Validator { + solc: Solc::new(params.solc.clone(), outdir_path.clone()), + }; let mutants = if let Some(num_mutants) = params.num_mutants { log::info!("Filtering down to {} mutants", num_mutants); log::debug!(" seed: {:?}", params.seed); @@ -142,7 +142,7 @@ pub fn run_mutate( } else { Some(params.seed) }; - let filter = RandomDownSampleFilter::new(seed, !params.skip_validate); + let filter = RandomDownSampleFilter::new(seed, !params.skip_validate, validator); let mutants = filter.filter_mutants(&mutator, num_mutants)?; log::info!("Filtering resulted in {} mutants", mutants.len()); mutants @@ -150,7 +150,7 @@ pub fn run_mutate( log::info!("Skipping validation"); mutants } else { - let mutants = mutator.get_valid_mutants(&mutants); + let mutants = validator.get_valid_mutants(&mutants); log::info!("Validation resulted in {} mutants", mutants.len()); mutants }; diff --git a/src/mutation.rs b/src/mutation.rs index bf145f74..3516bfaa 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -1,8 +1,16 @@ -use crate::{get_indent, SolAST, Source}; +use crate::{get_indent, Source}; use clap::ValueEnum; use serde::{Deserialize, Serialize}; +use solang_parser::pt::{Expression, Statement, VariableDeclaration}; use std::{error, fmt::Display, rc::Rc}; +/// A single type wrapping the types of parse tree nodes we can mutate +pub enum MutationPoint { + Statement(Statement), + Expression(Expression), + VariableDeclaration(VariableDeclaration), +} + /// This struct describes a mutant. #[derive(Debug, Clone)] pub struct Mutant { @@ -118,10 +126,10 @@ impl Display for Mutant { /// applies to an AST node, and can mutate an AST node. pub trait Mutation { /// Check if this mutation applies to this AST node - fn applies_to(&self, node: &SolAST) -> bool; + fn applies_to(&self, node: &MutationPoint) -> bool; /// Generate all mutants of a given node by this agent - fn mutate(&self, node: &SolAST, source: Rc) -> Vec; + fn mutate(&self, node: &MutationPoint, source: Rc) -> Vec; } /// Kinds of mutations. @@ -158,86 +166,43 @@ impl ToString for MutationType { } impl Mutation for MutationType { - fn applies_to(&self, node: &SolAST) -> bool { + fn applies_to(&self, node: &MutationPoint) -> bool { match self { - MutationType::AssignmentMutation => { - if let Some(n) = node.node_type() { - return n == "Assignment"; - } - } + MutationType::AssignmentMutation => match node { + MutationPoint::Statement(Statement::Expression( + _, + Expression::Assign(_, lhs, rhs), + )) => todo!(), + _ => false, + }, MutationType::BinaryOpMutation => { - if let Some(n) = node.node_type() { - return n == "BinaryOperation"; - } + todo!("Not Implemented") } MutationType::DeleteExpressionMutation => { - if let Some(n) = node.node_type() { - return n == "ExpressionStatement"; - } + todo!("Not Implemented") } MutationType::ElimDelegateMutation => { - return node.node_type().map_or_else( - || false, - |n| { - n == "FunctionCall" - && (node - .expression() - .node_type() - .map_or_else(|| false, |nt| nt == "MemberAccess")) - && (node - .expression() - .get_string("memberName") - .map_or_else(|| false, |mn| mn == "delegatecall")) - }, - ); + todo!("Not Implemented") } MutationType::FunctionCallMutation => { - if let Some(n) = node.node_type() { - return n == "FunctionCall" && !node.arguments().is_empty(); - } + todo!("Not Implemented") } MutationType::IfStatementMutation => { - if let Some(n) = node.node_type() { - return n == "IfStatement"; - } + todo!("Not Implemented") } MutationType::RequireMutation => { - return node.node_type().map_or_else( - || false, - |n| { - n == "FunctionCall" - && (node - .expression() - .name() - .map_or_else(|| false, |nm| nm == "require")) - && !node.arguments().is_empty() - }, - ); + todo!("Not Implemented") } MutationType::SwapArgumentsFunctionMutation => { - if let Some(n) = node.node_type() { - return n == "FunctionCall" && node.arguments().len() > 1; - } + todo!("Not Implemented") } MutationType::SwapArgumentsOperatorMutation => { - let non_comm_ops = vec!["-", "/", "%", "**", ">", "<", ">=", "<=", "<<", ">>"]; - if let Some(n) = node.node_type() { - return n == "BinaryOperation" - && non_comm_ops.contains( - &node - .operator() - .unwrap_or_else(|| panic!("Expression does not have operator")) - .as_str(), - ); - } + todo!("Not Implemented") } MutationType::UnaryOperatorMutation => { - if let Some(n) = node.node_type() { - return n == "UnaryOperation"; - } + todo!("Not Implemented") } } - false } /// Produce all mutants at the given node @@ -247,70 +212,23 @@ impl Mutation for MutationType { /// * `node` - The Solidity AST node to mutate /// * `source` - The original source file: we use this to generate a new /// source file - fn mutate(&self, node: &SolAST, source: Rc) -> Vec { + fn mutate(&self, node: &MutationPoint, source: Rc) -> Vec { if !self.applies_to(node) { return vec![]; } match self { MutationType::AssignmentMutation => { - let rhs = node.right_hand_side(); - let node_kind = rhs.node_kind(); - let orig = rhs.get_text(source.contents()); - let replacements: Vec<&str> = if let Some(kind) = node_kind { - if &kind == "bool" { - vec!["true", "false"] - } else if rhs.is_literal_number() { - vec!["(-1)", "0", "1"] - } else { - vec!["0", "(-1)", "1", "true", "false"] - } - } else { - vec!["0", "(-1)", "1", "true", "false"] - } - .iter() - .filter(|v| !orig.eq(*v)) - .copied() - .collect(); - - let (s, e) = rhs.get_bounds(); - replacements - .iter() - .map(|r| Mutant::new(source.clone(), *self, s, e, r.to_string())) - .collect() + todo!("Not implemented") } MutationType::BinaryOpMutation => { - let orig = node.operator().unwrap(); - let orig = String::from(orig.trim()); - - let ops: Vec<&str> = vec!["+", "-", "*", "/", "%", "**"] - .iter() - .filter(|v| !orig.eq(*v)) - .copied() - .collect(); - - let (_, endl) = node.left_expression().get_bounds(); - let (startr, _) = node.right_expression().get_bounds(); - ops.iter() - .map(|op| Mutant::new(source.clone(), *self, endl, startr, op.to_string())) - .collect() + todo!("Not Implemented") } MutationType::DeleteExpressionMutation => { - let (start, end) = node.get_bounds(); - let commented = format!("/* {} */", node.expression().get_text(source.contents())); - vec![Mutant::new(source, *self, start, end, commented)] + todo!("Not Implemented") } MutationType::ElimDelegateMutation => { - let (_, endl) = node.expression().expression().get_bounds(); - let (_, endr) = node.expression().get_bounds(); - - vec![Mutant::new( - source, - *self, - endl + 1, - endr, - "call".to_string(), - )] + todo!("Not Implemented") } // TODO: Should we enable this? I'm not sure if this is the best mutation operator @@ -325,37 +243,15 @@ impl Mutation for MutationType { } MutationType::IfStatementMutation => { - let cond = node.condition(); - let orig = cond.get_text(source.contents()); - let bs: Vec<&str> = vec!["true", "false"] - .iter() - .filter(|v| !orig.eq(*v)) - .copied() - .collect(); - - let (start, end) = cond.get_bounds(); - - bs.iter() - .map(|r| Mutant::new(source.clone(), *self, start, end, r.to_string())) - .collect() + todo!("Not Implemented") } MutationType::RequireMutation => { - let arg = &node.arguments()[0]; - let orig = arg.get_text(source.contents()); - let bs: Vec<&str> = vec!["true", "false"] - .iter() - .filter(|v| !orig.eq(*v)) - .copied() - .collect(); - let (start, end) = arg.get_bounds(); - bs.iter() - .map(|r| Mutant::new(source.clone(), *self, start, end, r.to_string())) - .collect() + todo!("Not Implemented") } MutationType::SwapArgumentsFunctionMutation => { - vec![] + todo!("Not Implemented") // TODO: I'm removing this operator for now as I'm not sure how // to implement it deterministically. I'm also faily convinced @@ -378,52 +274,11 @@ impl Mutation for MutationType { } MutationType::SwapArgumentsOperatorMutation => { - let left = node.left_expression(); - let right = node.right_expression(); - let (left_start, left_end) = left.get_bounds(); - let (right_start, right_end) = right.get_bounds(); - let start = left_start; - let end = right_end; - let op = node.operator().unwrap(); - let op = format!(" {} ", op.trim()); - let contents = source.contents(); - let left_contents = - String::from_utf8(contents[left_start..left_end].to_vec()).unwrap(); - let right_contents = - String::from_utf8(contents[right_start..right_end].to_vec()).unwrap(); - - let mut repl: String = right_contents; - repl.push_str(&op); - repl.push_str(&left_contents); - - vec![Mutant::new(source.clone(), *self, start, end, repl)] + todo!("Not Implemented") } MutationType::UnaryOperatorMutation => { - let prefix_ops = vec!["++", "--", "~"]; - let suffix_ops = vec!["++", "--"]; - - let op = node - .operator() - .expect("Unary operation must have an operator!"); - - let (start, end) = node.get_bounds(); - let is_prefix = source.contents()[start] == op.as_bytes()[0]; - let replacements: Vec<&str> = if is_prefix { prefix_ops } else { suffix_ops } - .iter() - .filter(|v| !op.eq(*v)) - .copied() - .collect(); - let (start, end) = if is_prefix { - (start, start + op.len()) - } else { - (end - op.len(), end) - }; - - replacements - .iter() - .map(|r| Mutant::new(source.clone(), *self, start, end, r.to_string())) - .collect() + todo!("Not Implemented") } } } diff --git a/src/mutator.rs b/src/mutator.rs index 6d058314..946da3ae 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -1,6 +1,11 @@ use crate::{ default_gambit_output_directory, mutation::MutationType, source::Source, Mutant, MutantWriter, - MutateParams, Mutation, SolAST, SolASTVisitor, Solc, + MutateParams, Mutation, MutationPoint, Solc, +}; +use solang_parser; +use solang_parser::pt::{ + ContractDefinition, ContractPart, Expression, FunctionDefinition, SourceUnit, SourceUnitPart, + Statement, }; use clap::ValueEnum; use std::{error, path::PathBuf, rc::Rc}; @@ -56,9 +61,6 @@ pub struct Mutator { /// The mutants, in order of generation pub mutants: Vec, - /// Solc configuration - solc: Solc, - /// A temporary directory to store intermediate work _tmp: PathBuf, } @@ -128,11 +130,14 @@ impl Mutator { conf, sources, mutants: vec![], - solc, _tmp: "".into(), } } + pub fn mutation_operators(&self) -> &[MutationType] { + &self.conf.mutation_operators.as_slice() + } + /// Run all mutations! This is the main external entry point into mutation. /// This function: /// @@ -144,11 +149,10 @@ impl Mutator { pub fn mutate(&mut self) -> Result<&Vec, Box> { let mut mutants: Vec = vec![]; - let solc = &self.solc; for source in self.sources.iter() { log::info!("Mutating source {}", source.filename().display()); - match self.mutate_file(source.clone(), solc) { + match self.mutate_file(source.clone()) { Ok(mut file_mutants) => { log::info!(" Generated {} mutants from source", file_mutants.len()); mutants.append(&mut file_mutants); @@ -165,33 +169,12 @@ impl Mutator { } /// Mutate a single file. - fn mutate_file( - &self, - source: Rc, - solc: &Solc, - ) -> Result, Box> { - let ast = solc.compile_ast(source.filename())?; - if !solc.output_directory().exists() { - log::debug!( - "[Pre traverse] Output directory {} doesn't exist!", - solc.output_directory().display() - ); - } - let result = ast.traverse(self, source).into_iter().flatten().collect(); - if !solc.output_directory().exists() { - log::debug!( - "[Post traverse] Output directory {} doesn't exist!", - solc.output_directory().display() - ); - } + fn mutate_file(&self, source: Rc) -> Result, Box> { + let (pt, comments) = solang_parser::parse(&source.filename_as_str(), 0).unwrap(); + let result = mutate_source_unit(&pt, &self.mutation_operators())?; Ok(result) } - /// Check if a node in the AST is an assert. - pub fn is_assert_call(node: &SolAST) -> bool { - node.name().map_or_else(|| false, |n| n == "assert") - } - /// Get a slice of the mutants produced by this mutator pub fn mutants(&self) -> &[Mutant] { &self.mutants @@ -200,82 +183,169 @@ impl Mutator { pub fn sources(&self) -> &Vec> { &self.sources } +} - pub fn solc(&self) -> &Solc { - &self.solc +pub fn mutate_source_unit( + source_unit: &SourceUnit, + mut_ops: &[MutationType], +) -> Result, Box> { + let mut mutants: Vec = Vec::default(); + for part in source_unit.0.iter() { + mutants.append(&mut mutate_source_unit_part(part, mut_ops)?); } + Ok(mutants) +} - /// validate a mutant by writing it to disk and compiling it. If compilation - /// fails then this is an invalid mutant. - pub fn validate_mutant(&self, mutant: &Mutant) -> Result> { - let source_filename = mutant.source.filename(); - let source_parent_dir = source_filename.parent().unwrap(); - let mutant_file = NamedTempFile::new_in(source_parent_dir)?; - let mutant_file_path = mutant_file.path(); - log::debug!( - "Validating mutant of {}: copying mutated code to {}", - source_filename.display(), - mutant_file_path.display() - ); - let dir = tempdir()?; - MutantWriter::write_mutant_to_file(mutant_file_path, mutant)?; - let code = match self.solc().compile(mutant_file_path, dir.path()) { - Ok((code, _, _)) => code == 0, - Err(_) => false, - }; - Ok(code) +pub fn mutate_source_unit_part( + part: &SourceUnitPart, + mut_ops: &[MutationType], +) -> Result, Box> { + match part { + SourceUnitPart::ContractDefinition(cd) => mutate_contract_definition(cd.as_ref(), mut_ops), + SourceUnitPart::FunctionDefinition(fd) => todo!(), + SourceUnitPart::VariableDefinition(_) => todo!(), + _ => Ok(vec![]), + } +} +pub fn mutate_contract_definition( + contract_definition: &ContractDefinition, + mut_ops: &[MutationType], +) -> Result, Box> { + let mut mutants: Vec = Vec::default(); + for part in contract_definition.parts.iter() { + todo!() } + Ok(mutants) +} - pub fn get_valid_mutants(&self, mutants: &[Mutant]) -> Vec { - log::info!("Validating mutants..."); - let mut valid_mutants = vec![]; - for m in mutants.iter() { - if let Ok(true) = self.validate_mutant(m) { - valid_mutants.push(m.clone()) - } - } - valid_mutants +pub fn mutate_function_definition( + function_definition: &FunctionDefinition, + mut_ops: &Vec, +) -> Result, Box> { + if let Some(statement) = &function_definition.body { + mutate_statement(statement, mut_ops) + } else { + Ok(vec![]) } } -impl SolASTVisitor, Vec> for Mutator { - fn skip_node(&self, node: &SolAST, _source: &Rc) -> bool { - if let Some(e) = &node.element { - if let Some(e_obj) = e.as_object() { - if e_obj.contains_key("contractKind") { - let contract_name = e_obj.get("name").unwrap(); - if let Some(contract) = &self.conf.contract { - return contract != contract_name.as_str().unwrap(); - } else { - return false; - } - } else if node.node_kind() == Some("function".to_string()) { - match &self.conf.funcs_to_mutate { - Some(fns) => { - if let Some(name) = node.name() { - return !fns.contains(&name); - } - return true; - } - None => { - return false; - } - } - } +pub fn mutate_statement( + statement: &Statement, + mut_ops: &Vec, +) -> Result, Box> { + match statement { + Statement::Block { + loc, + unchecked, + statements, + } => { + let mut mutants: Vec = Vec::default(); + for statement in statements.iter() { + mutants.append(&mut mutate_statement(statement, mut_ops)?); } + Ok(mutants) + } + Statement::Assembly { + loc, + dialect, + flags, + block, + } => todo!(), + Statement::If(_, cond, then, els) => { + todo!() + } + Statement::While(_, cond, body) => { + todo!() + } + Statement::Expression(_, expr) => { + todo!() } - false + Statement::VariableDefinition(_, var_decl, initializer) => { + todo!() + } + Statement::For(_, init, cond, update, body) => { + todo!() + } + Statement::DoWhile(_, body, cond) => { + todo!() + } + Statement::Continue(_) => todo!(), + Statement::Break(_) => todo!(), + Statement::Return(_, expr) => { + todo!() + } + Statement::Revert(_, _, _) => todo!(), + Statement::RevertNamedArgs(_, _, _) => todo!(), + Statement::Emit(_, _) => todo!(), + Statement::Try(_, _, _, _) => todo!(), + _ => Ok(vec![]), } +} - fn visit_node(&self, node: &SolAST, arg: &Rc) -> Option> { - let op_node_pairs: Vec = self - .conf - .mutation_operators - .iter() - .filter(|m| m.applies_to(node)) - .flat_map(|m| m.mutate(node, arg.clone())) - .collect(); - - Some(op_node_pairs) +pub fn mutate_expression( + expr: &Expression, + mut_ops: &Vec, +) -> Result, Box> { + match expr { + Expression::PostIncrement(_, _) => todo!(), + Expression::PostDecrement(_, _) => todo!(), + Expression::New(_, _) => todo!(), + Expression::ArraySubscript(_, _, _) => todo!(), + Expression::ArraySlice(_, _, _, _) => todo!(), + Expression::Parenthesis(_, _) => todo!(), + Expression::MemberAccess(_, _, _) => todo!(), + Expression::FunctionCall(_, func, args) => todo!(), + Expression::FunctionCallBlock(_, _, _) => todo!(), + Expression::NamedFunctionCall(_, _, _) => todo!(), + Expression::Not(_, _) => todo!(), + Expression::BitwiseNot(_, _) => todo!(), + Expression::Delete(_, _) => todo!(), + Expression::PreIncrement(_, _) => todo!(), + Expression::PreDecrement(_, _) => todo!(), + Expression::UnaryPlus(_, _) => todo!(), + Expression::Negate(_, _) => todo!(), + Expression::Power(_, _, _) => todo!(), + Expression::Multiply(_, _, _) => todo!(), + Expression::Divide(_, _, _) => todo!(), + Expression::Modulo(_, _, _) => todo!(), + Expression::Add(_, _, _) => todo!(), + Expression::Subtract(_, _, _) => todo!(), + Expression::ShiftLeft(_, _, _) => todo!(), + Expression::ShiftRight(_, _, _) => todo!(), + Expression::BitwiseAnd(_, _, _) => todo!(), + Expression::BitwiseXor(_, _, _) => todo!(), + Expression::BitwiseOr(_, _, _) => todo!(), + Expression::Less(_, _, _) => todo!(), + Expression::More(_, _, _) => todo!(), + Expression::LessEqual(_, _, _) => todo!(), + Expression::MoreEqual(_, _, _) => todo!(), + Expression::Equal(_, _, _) => todo!(), + Expression::NotEqual(_, _, _) => todo!(), + Expression::And(_, _, _) => todo!(), + Expression::Or(_, _, _) => todo!(), + Expression::ConditionalOperator(_, _, _, _) => todo!(), + Expression::Assign(_, _, _) => todo!(), + Expression::AssignOr(_, _, _) => todo!(), + Expression::AssignAnd(_, _, _) => todo!(), + Expression::AssignXor(_, _, _) => todo!(), + Expression::AssignShiftLeft(_, _, _) => todo!(), + Expression::AssignShiftRight(_, _, _) => todo!(), + Expression::AssignAdd(_, _, _) => todo!(), + Expression::AssignSubtract(_, _, _) => todo!(), + Expression::AssignMultiply(_, _, _) => todo!(), + Expression::AssignDivide(_, _, _) => todo!(), + Expression::AssignModulo(_, _, _) => todo!(), + Expression::BoolLiteral(_, _) => todo!(), + Expression::NumberLiteral(_, _, _, _) => todo!(), + Expression::RationalNumberLiteral(_, _, _, _, _) => todo!(), + Expression::HexNumberLiteral(_, _, _) => todo!(), + Expression::StringLiteral(_) => todo!(), + Expression::Type(_, _) => todo!(), + Expression::HexLiteral(_) => todo!(), + Expression::AddressLiteral(_, _) => todo!(), + Expression::Variable(_) => todo!(), + Expression::List(_, _) => todo!(), + Expression::ArrayLiteral(_, _) => todo!(), + Expression::This(_) => todo!(), } } diff --git a/src/test_util.rs b/src/test_util.rs index acbea09f..a818ebb3 100644 --- a/src/test_util.rs +++ b/src/test_util.rs @@ -1,4 +1,3 @@ -use crate::{SolAST, SolASTVisitor}; use std::{io::prelude::*, path::PathBuf}; use tempfile::Builder; @@ -58,16 +57,3 @@ contract Wrapper {{ ); solidity_code } - -#[derive(Default)] -struct ExprParserHelper {} - -impl SolASTVisitor<(), SolAST> for ExprParserHelper { - fn visit_node(&self, node: &SolAST, _: &()) -> Option { - if node.node_type() == Some("Assignment".into()) { - Some(node.right_hand_side()) - } else { - None - } - } -} From 58078a3b10e9e001bb8d923f9312b055884e8a30 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 17 May 2023 17:23:49 -0700 Subject: [PATCH 003/200] Reorganized things, boilerplate stuff --- src/mutation.rs | 165 +++++++++++++++++++----------------------------- src/mutator.rs | 10 ++- 2 files changed, 69 insertions(+), 106 deletions(-) diff --git a/src/mutation.rs b/src/mutation.rs index 3516bfaa..97498e89 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -125,11 +125,26 @@ impl Display for Mutant { /// Every kind of mutation implements this trait. A mutation can check if it /// applies to an AST node, and can mutate an AST node. pub trait Mutation { - /// Check if this mutation applies to this AST node - fn applies_to(&self, node: &MutationPoint) -> bool; - /// Generate all mutants of a given node by this agent - fn mutate(&self, node: &MutationPoint, source: Rc) -> Vec; + fn mutate(&self, node: &MutationPoint, source: Rc) -> Vec { + match node { + MutationPoint::Statement(stmt) => self.mutate_statement(stmt, source), + MutationPoint::Expression(expr) => self.mutate_expression(expr, source), + MutationPoint::VariableDeclaration(decl) => { + self.mutate_variable_declaration(decl, source) + } + } + } + + fn mutate_statement(&self, _stmt: &Statement, source: Rc) -> Vec; + + fn mutate_expression(&self, _expr: &Expression, source: Rc) -> Vec; + + fn mutate_variable_declaration( + &self, + _decl: &VariableDeclaration, + source: Rc, + ) -> Vec; } /// Kinds of mutations. @@ -166,45 +181,6 @@ impl ToString for MutationType { } impl Mutation for MutationType { - fn applies_to(&self, node: &MutationPoint) -> bool { - match self { - MutationType::AssignmentMutation => match node { - MutationPoint::Statement(Statement::Expression( - _, - Expression::Assign(_, lhs, rhs), - )) => todo!(), - _ => false, - }, - MutationType::BinaryOpMutation => { - todo!("Not Implemented") - } - MutationType::DeleteExpressionMutation => { - todo!("Not Implemented") - } - MutationType::ElimDelegateMutation => { - todo!("Not Implemented") - } - MutationType::FunctionCallMutation => { - todo!("Not Implemented") - } - MutationType::IfStatementMutation => { - todo!("Not Implemented") - } - MutationType::RequireMutation => { - todo!("Not Implemented") - } - MutationType::SwapArgumentsFunctionMutation => { - todo!("Not Implemented") - } - MutationType::SwapArgumentsOperatorMutation => { - todo!("Not Implemented") - } - MutationType::UnaryOperatorMutation => { - todo!("Not Implemented") - } - } - } - /// Produce all mutants at the given node /// /// # Arguments @@ -212,36 +188,14 @@ impl Mutation for MutationType { /// * `node` - The Solidity AST node to mutate /// * `source` - The original source file: we use this to generate a new /// source file - fn mutate(&self, node: &MutationPoint, source: Rc) -> Vec { - if !self.applies_to(node) { - return vec![]; - } + fn mutate_statement(&self, stmt: &Statement, _source: Rc) -> Vec { match self { - MutationType::AssignmentMutation => { - todo!("Not implemented") - } - MutationType::BinaryOpMutation => { - todo!("Not Implemented") - } - - MutationType::DeleteExpressionMutation => { - todo!("Not Implemented") - } - MutationType::ElimDelegateMutation => { - todo!("Not Implemented") - } - - // TODO: Should we enable this? I'm not sure if this is the best mutation operator - MutationType::FunctionCallMutation => { - // if let Some(arg) = node.arguments().choose(rand) { - // node.replace_in_source(source, arg.get_text(source)) - // } else { - // node.get_text(source) - // } - - vec![] // For now I'm removing this operator: not sure what it does! - } - + MutationType::AssignmentMutation => match stmt { + Statement::Expression(_, Expression::Assign(_, _lhs, _rhs)) => { + todo!("EVR") + } + _ => vec![], + }, MutationType::IfStatementMutation => { todo!("Not Implemented") } @@ -250,36 +204,47 @@ impl Mutation for MutationType { todo!("Not Implemented") } - MutationType::SwapArgumentsFunctionMutation => { - todo!("Not Implemented") - - // TODO: I'm removing this operator for now as I'm not sure how - // to implement it deterministically. I'm also faily convinced - // that this operator should be removed - - // let mut children = node.arguments(); - // children.shuffle(rand); - - // if children.len() == 2 { - // node.replace_multiple( - // source, - // vec![ - // (children[0].clone(), children[1].get_text(source)), - // (children[1].clone(), children[0].get_text(source)), - // ], - // ) - // } else { - // node.get_text(source) - // } - } + MutationType::BinaryOpMutation + | MutationType::DeleteExpressionMutation + | MutationType::ElimDelegateMutation + | MutationType::FunctionCallMutation + | MutationType::SwapArgumentsFunctionMutation + | MutationType::SwapArgumentsOperatorMutation + | MutationType::UnaryOperatorMutation => vec![], + } + } - MutationType::SwapArgumentsOperatorMutation => { - todo!("Not Implemented") - } + fn mutate_expression(&self, _expr: &Expression, _source: Rc) -> Vec { + match self { + MutationType::AssignmentMutation + | MutationType::IfStatementMutation + | MutationType::RequireMutation => vec![], + MutationType::BinaryOpMutation => todo!(), + MutationType::DeleteExpressionMutation => todo!(), + MutationType::ElimDelegateMutation => todo!(), + MutationType::FunctionCallMutation => todo!(), + MutationType::SwapArgumentsFunctionMutation => todo!(), + MutationType::SwapArgumentsOperatorMutation => todo!(), + MutationType::UnaryOperatorMutation => todo!(), + } + } - MutationType::UnaryOperatorMutation => { - todo!("Not Implemented") - } + fn mutate_variable_declaration( + &self, + _decl: &VariableDeclaration, + _source: Rc, + ) -> Vec { + match self { + MutationType::AssignmentMutation => vec![], + MutationType::IfStatementMutation => vec![], + MutationType::RequireMutation => vec![], + MutationType::BinaryOpMutation => vec![], + MutationType::DeleteExpressionMutation => vec![], + MutationType::ElimDelegateMutation => vec![], + MutationType::FunctionCallMutation => vec![], + MutationType::SwapArgumentsFunctionMutation => vec![], + MutationType::SwapArgumentsOperatorMutation => vec![], + MutationType::UnaryOperatorMutation => vec![], } } } diff --git a/src/mutator.rs b/src/mutator.rs index 946da3ae..96e88424 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -1,15 +1,13 @@ use crate::{ - default_gambit_output_directory, mutation::MutationType, source::Source, Mutant, MutantWriter, - MutateParams, Mutation, MutationPoint, Solc, + default_gambit_output_directory, mutation::MutationType, source::Source, Mutant, MutateParams, + Solc, }; +use clap::ValueEnum; use solang_parser; use solang_parser::pt::{ - ContractDefinition, ContractPart, Expression, FunctionDefinition, SourceUnit, SourceUnitPart, - Statement, + ContractDefinition, Expression, FunctionDefinition, SourceUnit, SourceUnitPart, Statement, }; -use clap::ValueEnum; use std::{error, path::PathBuf, rc::Rc}; -use tempfile::{tempdir, NamedTempFile}; /// This module is responsible for high level logic of running mutation over /// Solidity programs. From 75c7c5083e83837bcd0b975d658bebe63d479121 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 18 May 2023 14:03:27 -0700 Subject: [PATCH 004/200] Started reimplementing mutation --- src/mutation.rs | 29 ++++++++++++++++-- src/mutator.rs | 78 +++++++++++++++++++++++++++++++++---------------- src/source.rs | 12 ++++++++ 3 files changed, 92 insertions(+), 27 deletions(-) diff --git a/src/mutation.rs b/src/mutation.rs index 97498e89..2f661845 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -188,7 +188,7 @@ impl Mutation for MutationType { /// * `node` - The Solidity AST node to mutate /// * `source` - The original source file: we use this to generate a new /// source file - fn mutate_statement(&self, stmt: &Statement, _source: Rc) -> Vec { + fn mutate_statement(&self, stmt: &Statement, source: Rc) -> Vec { match self { MutationType::AssignmentMutation => match stmt { Statement::Expression(_, Expression::Assign(_, _lhs, _rhs)) => { @@ -197,7 +197,32 @@ impl Mutation for MutationType { _ => vec![], }, MutationType::IfStatementMutation => { - todo!("Not Implemented") + if let Statement::If(loc, cond, then, els) = stmt { + let replacements = match cond { + Expression::BoolLiteral(_, true) => vec!["false"], + Expression::BoolLiteral(_, false) => vec!["true"], + _ => vec!["true", "false"], + }; + let mutations = replacements + .into_iter() + .map(|r| { + Mutant::new( + source.clone(), + self.clone(), + loc.start(), + loc.end(), + r.to_string(), + ) + }) + .chain(self.mutate_statement(then, source.clone()).into_iter()) + .chain(els.as_ref().map_or(vec![].into_iter(), |e| { + self.mutate_statement(&e, source.clone()).into_iter() + })) + .collect(); + mutations + } else { + vec![] + } } MutationType::RequireMutation => { diff --git a/src/mutator.rs b/src/mutator.rs index 96e88424..d117c458 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -1,6 +1,6 @@ use crate::{ - default_gambit_output_directory, mutation::MutationType, source::Source, Mutant, MutateParams, - Solc, + default_gambit_output_directory, mutation::Mutation, mutation::MutationType, source::Source, + Mutant, MutateParams, Solc, }; use clap::ValueEnum; use solang_parser; @@ -168,8 +168,8 @@ impl Mutator { /// Mutate a single file. fn mutate_file(&self, source: Rc) -> Result, Box> { - let (pt, comments) = solang_parser::parse(&source.filename_as_str(), 0).unwrap(); - let result = mutate_source_unit(&pt, &self.mutation_operators())?; + let (pt, _) = solang_parser::parse(&source.filename_as_str(), 0).unwrap(); + let result = mutate_source_unit(&pt, &self.mutation_operators(), source.clone())?; Ok(result) } @@ -186,10 +186,11 @@ impl Mutator { pub fn mutate_source_unit( source_unit: &SourceUnit, mut_ops: &[MutationType], + source: Rc, ) -> Result, Box> { let mut mutants: Vec = Vec::default(); for part in source_unit.0.iter() { - mutants.append(&mut mutate_source_unit_part(part, mut_ops)?); + mutants.append(&mut mutate_source_unit_part(part, mut_ops, source.clone())?); } Ok(mutants) } @@ -197,10 +198,15 @@ pub fn mutate_source_unit( pub fn mutate_source_unit_part( part: &SourceUnitPart, mut_ops: &[MutationType], + source: Rc, ) -> Result, Box> { match part { - SourceUnitPart::ContractDefinition(cd) => mutate_contract_definition(cd.as_ref(), mut_ops), - SourceUnitPart::FunctionDefinition(fd) => todo!(), + SourceUnitPart::ContractDefinition(cd) => { + mutate_contract_definition(cd.as_ref(), mut_ops, source) + } + SourceUnitPart::FunctionDefinition(fd) => { + mutate_function_definition(fd.as_ref(), mut_ops, source) + } SourceUnitPart::VariableDefinition(_) => todo!(), _ => Ok(vec![]), } @@ -208,20 +214,35 @@ pub fn mutate_source_unit_part( pub fn mutate_contract_definition( contract_definition: &ContractDefinition, mut_ops: &[MutationType], + source: Rc, ) -> Result, Box> { let mut mutants: Vec = Vec::default(); for part in contract_definition.parts.iter() { - todo!() + match part { + solang_parser::pt::ContractPart::FunctionDefinition(fd) => mutants.append( + &mut mutate_function_definition(&fd, mut_ops, source.clone())?, + ), + solang_parser::pt::ContractPart::VariableDefinition(_) + | solang_parser::pt::ContractPart::StructDefinition(_) + | solang_parser::pt::ContractPart::EventDefinition(_) + | solang_parser::pt::ContractPart::EnumDefinition(_) + | solang_parser::pt::ContractPart::ErrorDefinition(_) + | solang_parser::pt::ContractPart::TypeDefinition(_) + | solang_parser::pt::ContractPart::Annotation(_) + | solang_parser::pt::ContractPart::Using(_) + | solang_parser::pt::ContractPart::StraySemicolon(_) => continue, + } } Ok(mutants) } pub fn mutate_function_definition( function_definition: &FunctionDefinition, - mut_ops: &Vec, + mut_ops: &[MutationType], + source: Rc, ) -> Result, Box> { if let Some(statement) = &function_definition.body { - mutate_statement(statement, mut_ops) + mutate_statement(statement, mut_ops, source) } else { Ok(vec![]) } @@ -229,25 +250,27 @@ pub fn mutate_function_definition( pub fn mutate_statement( statement: &Statement, - mut_ops: &Vec, + mut_ops: &[MutationType], + source: Rc, ) -> Result, Box> { - match statement { + let mut mutants: Vec = match statement { Statement::Block { - loc, - unchecked, + loc: _, + unchecked: _, statements, } => { - let mut mutants: Vec = Vec::default(); - for statement in statements.iter() { - mutants.append(&mut mutate_statement(statement, mut_ops)?); - } - Ok(mutants) + let mutants = statements + .iter() + .flat_map(|s| mutate_statement(s, mut_ops, source.clone()).unwrap()) + .collect::>(); + + mutants } Statement::Assembly { - loc, - dialect, - flags, - block, + loc: _, + dialect: _, + flags: _, + block: _, } => todo!(), Statement::If(_, cond, then, els) => { todo!() @@ -276,13 +299,18 @@ pub fn mutate_statement( Statement::RevertNamedArgs(_, _, _) => todo!(), Statement::Emit(_, _) => todo!(), Statement::Try(_, _, _, _) => todo!(), - _ => Ok(vec![]), + _ => vec![], + }; + for op in mut_ops.iter() { + mutants.append(&mut op.mutate_statement(statement, source.clone())); } + Ok(mutants) } pub fn mutate_expression( expr: &Expression, - mut_ops: &Vec, + mut_ops: &[MutationType], + source: Rc, ) -> Result, Box> { match expr { Expression::PostIncrement(_, _) => todo!(), diff --git a/src/source.rs b/src/source.rs index 2826f572..9fd45755 100644 --- a/src/source.rs +++ b/src/source.rs @@ -77,6 +77,18 @@ impl Source { &self.contents } + pub fn contents_before_offset(&self, offset: usize) -> &[u8] { + &self.contents[..offset] + } + + pub fn contents_after_offset(&self, offset: usize) -> &[u8] { + &self.contents[offset..] + } + + pub fn contents_between_offsets(&self, start: usize, end: usize) -> &[u8] { + &self.contents[start..end] + } + /// Get the sourceroot for this source file pub fn sourceroot(&self) -> &Path { self.sourceroot.as_path() From 79a0cd82724c691e27a113862a3f3fbc40c2bea7 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 26 May 2023 17:16:33 -0700 Subject: [PATCH 005/200] Using solang, everytrhing is broken but it compiles --- Cargo.toml | 3 +- src/lib.rs | 6 +- src/mutation.rs | 181 +++++++------------------ src/mutator.rs | 341 +++++++++++++++++++++--------------------------- 4 files changed, 208 insertions(+), 323 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ff26e161..651f918d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,8 @@ scanner-rust = "2.0.16" serde = { version = "1", features = ["derive"] } serde_json = "1" similar = "2" -solang-parser = "=0.2.4" +solang = "0.3.0" +solang-parser = "0.3.0" strum = "0.24.1" strum_macros = "0.24.3" tempfile = "3" diff --git a/src/lib.rs b/src/lib.rs index 6d1844c5..1135f38e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,8 @@ use std::{collections::HashMap, fs, path::PathBuf, time::Instant}; +mod ast_util; +pub use ast_util::*; + mod cli; pub use cli::*; @@ -116,7 +119,8 @@ pub fn run_mutate( log::info!("Creating mutator"); let mut mutator = Mutator::from(params); log::info!("Generating mutants"); - let mutants = mutator.mutate()?.clone(); + let sources = mutator.sources().clone(); + let mutants = mutator.mutate(sources)?.clone(); log::info!( "(pre filter/validate) Generated {} mutants for {}", &mutants.len(), diff --git a/src/mutation.rs b/src/mutation.rs index 2f661845..d77b9f60 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -1,16 +1,9 @@ use crate::{get_indent, Source}; use clap::ValueEnum; use serde::{Deserialize, Serialize}; -use solang_parser::pt::{Expression, Statement, VariableDeclaration}; +use solang::sema::ast::{Expression, Statement}; use std::{error, fmt::Display, rc::Rc}; -/// A single type wrapping the types of parse tree nodes we can mutate -pub enum MutationPoint { - Statement(Statement), - Expression(Expression), - VariableDeclaration(VariableDeclaration), -} - /// This struct describes a mutant. #[derive(Debug, Clone)] pub struct Mutant { @@ -125,37 +118,34 @@ impl Display for Mutant { /// Every kind of mutation implements this trait. A mutation can check if it /// applies to an AST node, and can mutate an AST node. pub trait Mutation { - /// Generate all mutants of a given node by this agent - fn mutate(&self, node: &MutationPoint, source: Rc) -> Vec { - match node { - MutationPoint::Statement(stmt) => self.mutate_statement(stmt, source), - MutationPoint::Expression(expr) => self.mutate_expression(expr, source), - MutationPoint::VariableDeclaration(decl) => { - self.mutate_variable_declaration(decl, source) - } - } - } - - fn mutate_statement(&self, _stmt: &Statement, source: Rc) -> Vec; - - fn mutate_expression(&self, _expr: &Expression, source: Rc) -> Vec; + fn mutate_statement(&self, _stmt: &Statement, source: &Rc) -> Vec; - fn mutate_variable_declaration( - &self, - _decl: &VariableDeclaration, - source: Rc, - ) -> Vec; + fn mutate_expression(&self, _expr: &Expression, source: &Rc) -> Vec; } /// Kinds of mutations. #[derive(Hash, Eq, PartialEq, Clone, Copy, Debug, ValueEnum, Deserialize, Serialize)] pub enum MutationType { + // # New Operators + // ## Literal Value Replacement + LiteralValueReplacement, + // ## Binary Operator Replacement + ConditionalOperatorReplacement, + RelationalOperatorReplacement, + ArithmeticOperatorReplacement, + LogicalOperatorReplacement, + ShiftOperatorReplacement, + // ## UnaryOperatorReplacement + UnaryOperatorReplacement, + ExpressionValueReplacement, + + // # Old Operators (Deprecated) AssignmentMutation, BinaryOpMutation, DeleteExpressionMutation, ElimDelegateMutation, FunctionCallMutation, - IfStatementMutation, + // IfStatementMutation, RequireMutation, SwapArgumentsFunctionMutation, SwapArgumentsOperatorMutation, @@ -165,12 +155,21 @@ pub enum MutationType { impl ToString for MutationType { fn to_string(&self) -> String { let str = match self { + MutationType::LiteralValueReplacement => "LiteralValueReplacement", + MutationType::ConditionalOperatorReplacement => "ConditionalOperatorReplacement", + MutationType::RelationalOperatorReplacement => "RelationalOperatorReplacement", + MutationType::ArithmeticOperatorReplacement => "ArithmeticOperatorReplacemnt", + MutationType::LogicalOperatorReplacement => "LogicalOperatorReplacement", + MutationType::ShiftOperatorReplacement => "ShiftOperatorReplacement", + MutationType::UnaryOperatorReplacement => "UnaryOperatorReplacement", + MutationType::ExpressionValueReplacement => "ExpressionOperatorReplacement", + MutationType::AssignmentMutation => "AssignmentMutation", MutationType::BinaryOpMutation => "BinaryOpMutation", MutationType::DeleteExpressionMutation => "DeleteExpressionMutation", MutationType::ElimDelegateMutation => "ElimDelegateMutation", MutationType::FunctionCallMutation => "FunctionCallMutation", - MutationType::IfStatementMutation => "IfStatementMutation", + // MutationType::IfStatementMutation => "IfStatementMutation", MutationType::RequireMutation => "RequireMutation", MutationType::SwapArgumentsFunctionMutation => "SwapArgumentsFunctionMutation", MutationType::SwapArgumentsOperatorMutation => "SwapArgumentsOperatorMutation", @@ -181,96 +180,14 @@ impl ToString for MutationType { } impl Mutation for MutationType { - /// Produce all mutants at the given node - /// - /// # Arguments - /// - /// * `node` - The Solidity AST node to mutate - /// * `source` - The original source file: we use this to generate a new - /// source file - fn mutate_statement(&self, stmt: &Statement, source: Rc) -> Vec { - match self { - MutationType::AssignmentMutation => match stmt { - Statement::Expression(_, Expression::Assign(_, _lhs, _rhs)) => { - todo!("EVR") - } - _ => vec![], - }, - MutationType::IfStatementMutation => { - if let Statement::If(loc, cond, then, els) = stmt { - let replacements = match cond { - Expression::BoolLiteral(_, true) => vec!["false"], - Expression::BoolLiteral(_, false) => vec!["true"], - _ => vec!["true", "false"], - }; - let mutations = replacements - .into_iter() - .map(|r| { - Mutant::new( - source.clone(), - self.clone(), - loc.start(), - loc.end(), - r.to_string(), - ) - }) - .chain(self.mutate_statement(then, source.clone()).into_iter()) - .chain(els.as_ref().map_or(vec![].into_iter(), |e| { - self.mutate_statement(&e, source.clone()).into_iter() - })) - .collect(); - mutations - } else { - vec![] - } - } - - MutationType::RequireMutation => { - todo!("Not Implemented") - } - - MutationType::BinaryOpMutation - | MutationType::DeleteExpressionMutation - | MutationType::ElimDelegateMutation - | MutationType::FunctionCallMutation - | MutationType::SwapArgumentsFunctionMutation - | MutationType::SwapArgumentsOperatorMutation - | MutationType::UnaryOperatorMutation => vec![], - } + fn mutate_statement(&self, _stmt: &Statement, _source: &Rc) -> Vec { + println!("statment boop"); + vec![] } - fn mutate_expression(&self, _expr: &Expression, _source: Rc) -> Vec { - match self { - MutationType::AssignmentMutation - | MutationType::IfStatementMutation - | MutationType::RequireMutation => vec![], - MutationType::BinaryOpMutation => todo!(), - MutationType::DeleteExpressionMutation => todo!(), - MutationType::ElimDelegateMutation => todo!(), - MutationType::FunctionCallMutation => todo!(), - MutationType::SwapArgumentsFunctionMutation => todo!(), - MutationType::SwapArgumentsOperatorMutation => todo!(), - MutationType::UnaryOperatorMutation => todo!(), - } - } - - fn mutate_variable_declaration( - &self, - _decl: &VariableDeclaration, - _source: Rc, - ) -> Vec { - match self { - MutationType::AssignmentMutation => vec![], - MutationType::IfStatementMutation => vec![], - MutationType::RequireMutation => vec![], - MutationType::BinaryOpMutation => vec![], - MutationType::DeleteExpressionMutation => vec![], - MutationType::ElimDelegateMutation => vec![], - MutationType::FunctionCallMutation => vec![], - MutationType::SwapArgumentsFunctionMutation => vec![], - MutationType::SwapArgumentsOperatorMutation => vec![], - MutationType::UnaryOperatorMutation => vec![], - } + fn mutate_expression(&self, _expr: &Expression, _source: &Rc) -> Vec { + println!("expr boop"); + vec![] } } @@ -282,7 +199,7 @@ impl MutationType { MutationType::DeleteExpressionMutation, MutationType::ElimDelegateMutation, MutationType::FunctionCallMutation, - MutationType::IfStatementMutation, + // MutationType::IfStatementMutation, MutationType::RequireMutation, // MutationType::SwapArgumentsFunctionMutation, MutationType::SwapArgumentsOperatorMutation, @@ -452,17 +369,17 @@ contract A { Ok(()) } - #[test] - pub fn test_if_statement_mutation() -> Result<(), Box> { - let ops = vec![IfStatementMutation]; - assert_num_mutants_for_statements( - &vec!["uint256 x;", "if (true) { x = 1; } else { x = 2 ;}"], - &ops, - 1, - ); - assert_num_mutants_for_statements(&vec!["if (true) {}"], &ops, 1); - Ok(()) - } + // #[test] + // pub fn test_if_statement_mutation() -> Result<(), Box> { + // let ops = vec![IfStatementMutation]; + // assert_num_mutants_for_statements( + // &vec!["uint256 x;", "if (true) { x = 1; } else { x = 2 ;}"], + // &ops, + // 1, + // ); + // assert_num_mutants_for_statements(&vec!["if (true) {}"], &ops, 1); + // Ok(()) + // } #[test] pub fn test_require_mutation() -> Result<(), Box> { @@ -583,7 +500,8 @@ contract A { .rand_bytes(5) .tempdir()?; let mut mutator = make_mutator(ops, source, outdir.into_path()); - mutator.mutate()?; + let sources = mutator.sources().clone(); + mutator.mutate(sources)?; Ok(mutator) } @@ -638,7 +556,8 @@ contract A { .rand_bytes(5) .tempdir()?; let mut mutator = make_mutator(ops, source, outdir.into_path()); - mutator.mutate()?; + let sources = mutator.sources().clone(); + mutator.mutate(sources)?; Ok(mutator) } diff --git a/src/mutator.rs b/src/mutator.rs index d117c458..d8da51ac 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -1,13 +1,17 @@ use crate::{ - default_gambit_output_directory, mutation::Mutation, mutation::MutationType, source::Source, - Mutant, MutateParams, Solc, + default_gambit_output_directory, mutation::MutationType, source::Source, Mutant, MutateParams, + Mutation, Solc, }; use clap::ValueEnum; -use solang_parser; -use solang_parser::pt::{ - ContractDefinition, Expression, FunctionDefinition, SourceUnit, SourceUnitPart, Statement, +use solang::{ + file_resolver::FileResolver, + parse_and_resolve, + sema::{ + ast::{Expression, Statement}, + Recurse, + }, }; -use std::{error, path::PathBuf, rc::Rc}; +use std::{error, ffi::OsStr, path::PathBuf, rc::Rc}; /// This module is responsible for high level logic of running mutation over /// Solidity programs. @@ -59,6 +63,9 @@ pub struct Mutator { /// The mutants, in order of generation pub mutants: Vec, + /// The current source being mutated + pub current_source: Option>, + /// A temporary directory to store intermediate work _tmp: PathBuf, } @@ -128,6 +135,7 @@ impl Mutator { conf, sources, mutants: vec![], + current_source: None, _tmp: "".into(), } } @@ -144,11 +152,15 @@ impl Mutator { /// /// and returns a Vec of mutants. These are not yet written to disk, and can /// be further validated, suppressed, and downsampled as desired. - pub fn mutate(&mut self) -> Result<&Vec, Box> { + pub fn mutate( + &mut self, + sources: Vec>, + ) -> Result<&Vec, Box> { let mut mutants: Vec = vec![]; - for source in self.sources.iter() { + for source in sources.iter() { log::info!("Mutating source {}", source.filename().display()); + self.current_source = Some(source.clone()); match self.mutate_file(source.clone()) { Ok(mut file_mutants) => { @@ -160,6 +172,8 @@ impl Mutator { log::warn!("Encountered error: {}", e); } } + + self.current_source = None; } self.mutants.append(&mut mutants); @@ -167,10 +181,19 @@ impl Mutator { } /// Mutate a single file. - fn mutate_file(&self, source: Rc) -> Result, Box> { - let (pt, _) = solang_parser::parse(&source.filename_as_str(), 0).unwrap(); - let result = mutate_source_unit(&pt, &self.mutation_operators(), source.clone())?; - Ok(result) + fn mutate_file(&mut self, source: Rc) -> Result, Box> { + let mut resolver = FileResolver::new(); + let target = solang::Target::EVM; + let ns = parse_and_resolve(&OsStr::new(source.filename()), &mut resolver, target); + // mutate functions + for function in ns.functions.iter() { + if function.has_body { + for statement in function.body.iter() { + statement.recurse(self, mutate_statement); + } + } + } + todo!("TODO: Implement this"); } /// Get a slice of the mutants produced by this mutator @@ -181,197 +204,135 @@ impl Mutator { pub fn sources(&self) -> &Vec> { &self.sources } -} -pub fn mutate_source_unit( - source_unit: &SourceUnit, - mut_ops: &[MutationType], - source: Rc, -) -> Result, Box> { - let mut mutants: Vec = Vec::default(); - for part in source_unit.0.iter() { - mutants.append(&mut mutate_source_unit_part(part, mut_ops, source.clone())?); - } - Ok(mutants) -} - -pub fn mutate_source_unit_part( - part: &SourceUnitPart, - mut_ops: &[MutationType], - source: Rc, -) -> Result, Box> { - match part { - SourceUnitPart::ContractDefinition(cd) => { - mutate_contract_definition(cd.as_ref(), mut_ops, source) - } - SourceUnitPart::FunctionDefinition(fd) => { - mutate_function_definition(fd.as_ref(), mut_ops, source) - } - SourceUnitPart::VariableDefinition(_) => todo!(), - _ => Ok(vec![]), - } -} -pub fn mutate_contract_definition( - contract_definition: &ContractDefinition, - mut_ops: &[MutationType], - source: Rc, -) -> Result, Box> { - let mut mutants: Vec = Vec::default(); - for part in contract_definition.parts.iter() { - match part { - solang_parser::pt::ContractPart::FunctionDefinition(fd) => mutants.append( - &mut mutate_function_definition(&fd, mut_ops, source.clone())?, - ), - solang_parser::pt::ContractPart::VariableDefinition(_) - | solang_parser::pt::ContractPart::StructDefinition(_) - | solang_parser::pt::ContractPart::EventDefinition(_) - | solang_parser::pt::ContractPart::EnumDefinition(_) - | solang_parser::pt::ContractPart::ErrorDefinition(_) - | solang_parser::pt::ContractPart::TypeDefinition(_) - | solang_parser::pt::ContractPart::Annotation(_) - | solang_parser::pt::ContractPart::Using(_) - | solang_parser::pt::ContractPart::StraySemicolon(_) => continue, + pub fn apply_operators_to_expression(&mut self, expr: &Expression) { + if let Some(source) = &self.current_source { + let mut mutants = vec![]; + for op in self.mutation_operators() { + mutants.append(&mut op.mutate_expression(expr, source)); + } + self.mutants.append(&mut mutants); } } - Ok(mutants) -} -pub fn mutate_function_definition( - function_definition: &FunctionDefinition, - mut_ops: &[MutationType], - source: Rc, -) -> Result, Box> { - if let Some(statement) = &function_definition.body { - mutate_statement(statement, mut_ops, source) - } else { - Ok(vec![]) + pub fn apply_operators_to_statement(&mut self, stmt: &Statement) { + if let Some(source) = &self.current_source { + let mut mutants = vec![]; + for op in self.mutation_operators() { + mutants.append(&mut op.mutate_statement(stmt, source)); + } + self.mutants.append(&mut mutants); + } } } -pub fn mutate_statement( - statement: &Statement, - mut_ops: &[MutationType], - source: Rc, -) -> Result, Box> { - let mut mutants: Vec = match statement { - Statement::Block { - loc: _, - unchecked: _, - statements, - } => { - let mutants = statements - .iter() - .flat_map(|s| mutate_statement(s, mut_ops, source.clone()).unwrap()) - .collect::>(); - - mutants - } - Statement::Assembly { - loc: _, - dialect: _, - flags: _, - block: _, - } => todo!(), - Statement::If(_, cond, then, els) => { - todo!() +pub fn mutate_statement(statement: &Statement, mutator: &mut Mutator) -> bool { + mutator.apply_operators_to_statement(statement); + match statement { + Statement::Block { .. } => true, + Statement::VariableDecl(_, _, _, _) => true, + Statement::If(_, _, c, _, _) => { + c.recurse(mutator, mutate_expression); + true } - Statement::While(_, cond, body) => { - todo!() + Statement::While(_, _, c, _) => { + c.recurse(mutator, mutate_expression); + true } - Statement::Expression(_, expr) => { - todo!() - } - Statement::VariableDefinition(_, var_decl, initializer) => { - todo!() - } - Statement::For(_, init, cond, update, body) => { - todo!() - } - Statement::DoWhile(_, body, cond) => { - todo!() - } - Statement::Continue(_) => todo!(), - Statement::Break(_) => todo!(), - Statement::Return(_, expr) => { - todo!() + Statement::For { + loc: _, + reachable: _, + init: _, + cond, + .. + } => { + if let Some(cond) = cond { + cond.recurse(mutator, mutate_expression); + } + true } - Statement::Revert(_, _, _) => todo!(), - Statement::RevertNamedArgs(_, _, _) => todo!(), - Statement::Emit(_, _) => todo!(), - Statement::Try(_, _, _, _) => todo!(), - _ => vec![], - }; - for op in mut_ops.iter() { - mutants.append(&mut op.mutate_statement(statement, source.clone())); + Statement::DoWhile(_, _, _, _) => true, + Statement::Expression(_, _, _) => true, + Statement::Delete(_, _, _) => true, + Statement::Destructure(_, _, _) => true, + Statement::Continue(_) => true, + Statement::Break(_) => true, + Statement::Return(_, _) => true, + Statement::Revert { .. } => true, + Statement::Emit { .. } => true, + Statement::TryCatch(_, _, _) => true, + Statement::Underscore(_) => false, + Statement::Assembly(_, _) => false, } - Ok(mutants) } -pub fn mutate_expression( - expr: &Expression, - mut_ops: &[MutationType], - source: Rc, -) -> Result, Box> { +pub fn mutate_expression(expr: &Expression, mutator: &mut Mutator) -> bool { + mutator.apply_operators_to_expression(expr); match expr { - Expression::PostIncrement(_, _) => todo!(), - Expression::PostDecrement(_, _) => todo!(), - Expression::New(_, _) => todo!(), - Expression::ArraySubscript(_, _, _) => todo!(), - Expression::ArraySlice(_, _, _, _) => todo!(), - Expression::Parenthesis(_, _) => todo!(), - Expression::MemberAccess(_, _, _) => todo!(), - Expression::FunctionCall(_, func, args) => todo!(), - Expression::FunctionCallBlock(_, _, _) => todo!(), - Expression::NamedFunctionCall(_, _, _) => todo!(), - Expression::Not(_, _) => todo!(), - Expression::BitwiseNot(_, _) => todo!(), - Expression::Delete(_, _) => todo!(), - Expression::PreIncrement(_, _) => todo!(), - Expression::PreDecrement(_, _) => todo!(), - Expression::UnaryPlus(_, _) => todo!(), - Expression::Negate(_, _) => todo!(), - Expression::Power(_, _, _) => todo!(), - Expression::Multiply(_, _, _) => todo!(), - Expression::Divide(_, _, _) => todo!(), - Expression::Modulo(_, _, _) => todo!(), - Expression::Add(_, _, _) => todo!(), - Expression::Subtract(_, _, _) => todo!(), - Expression::ShiftLeft(_, _, _) => todo!(), - Expression::ShiftRight(_, _, _) => todo!(), - Expression::BitwiseAnd(_, _, _) => todo!(), - Expression::BitwiseXor(_, _, _) => todo!(), - Expression::BitwiseOr(_, _, _) => todo!(), - Expression::Less(_, _, _) => todo!(), - Expression::More(_, _, _) => todo!(), - Expression::LessEqual(_, _, _) => todo!(), - Expression::MoreEqual(_, _, _) => todo!(), - Expression::Equal(_, _, _) => todo!(), - Expression::NotEqual(_, _, _) => todo!(), - Expression::And(_, _, _) => todo!(), - Expression::Or(_, _, _) => todo!(), - Expression::ConditionalOperator(_, _, _, _) => todo!(), - Expression::Assign(_, _, _) => todo!(), - Expression::AssignOr(_, _, _) => todo!(), - Expression::AssignAnd(_, _, _) => todo!(), - Expression::AssignXor(_, _, _) => todo!(), - Expression::AssignShiftLeft(_, _, _) => todo!(), - Expression::AssignShiftRight(_, _, _) => todo!(), - Expression::AssignAdd(_, _, _) => todo!(), - Expression::AssignSubtract(_, _, _) => todo!(), - Expression::AssignMultiply(_, _, _) => todo!(), - Expression::AssignDivide(_, _, _) => todo!(), - Expression::AssignModulo(_, _, _) => todo!(), - Expression::BoolLiteral(_, _) => todo!(), - Expression::NumberLiteral(_, _, _, _) => todo!(), - Expression::RationalNumberLiteral(_, _, _, _, _) => todo!(), - Expression::HexNumberLiteral(_, _, _) => todo!(), - Expression::StringLiteral(_) => todo!(), - Expression::Type(_, _) => todo!(), - Expression::HexLiteral(_) => todo!(), - Expression::AddressLiteral(_, _) => todo!(), - Expression::Variable(_) => todo!(), - Expression::List(_, _) => todo!(), - Expression::ArrayLiteral(_, _) => todo!(), - Expression::This(_) => todo!(), + Expression::BoolLiteral { .. } => true, + Expression::BytesLiteral { .. } => true, + Expression::CodeLiteral { .. } => true, + Expression::NumberLiteral { .. } => true, + Expression::RationalNumberLiteral { .. } => true, + Expression::StructLiteral { .. } => true, + Expression::ArrayLiteral { .. } => true, + Expression::ConstArrayLiteral { .. } => true, + Expression::Add { .. } => true, + Expression::Subtract { .. } => true, + Expression::Multiply { .. } => true, + Expression::Divide { .. } => true, + Expression::Modulo { .. } => true, + Expression::Power { .. } => true, + Expression::BitwiseOr { .. } => true, + Expression::BitwiseAnd { .. } => true, + Expression::BitwiseXor { .. } => true, + Expression::ShiftLeft { .. } => true, + Expression::ShiftRight { .. } => true, + Expression::Variable { .. } => true, + Expression::ConstantVariable { .. } => true, + Expression::StorageVariable { .. } => true, + Expression::Load { .. } => true, + Expression::GetRef { .. } => true, + Expression::StorageLoad { .. } => true, + Expression::ZeroExt { .. } => true, + Expression::SignExt { .. } => true, + Expression::Trunc { .. } => true, + Expression::CheckingTrunc { .. } => true, + Expression::Cast { .. } => true, + Expression::BytesCast { .. } => true, + Expression::PreIncrement { .. } => true, + Expression::PreDecrement { .. } => true, + Expression::PostIncrement { .. } => true, + Expression::PostDecrement { .. } => true, + Expression::Assign { .. } => true, + Expression::More { .. } => true, + Expression::Less { .. } => true, + Expression::MoreEqual { .. } => true, + Expression::LessEqual { .. } => true, + Expression::Equal { .. } => true, + Expression::NotEqual { .. } => true, + Expression::Not { .. } => true, + Expression::BitwiseNot { .. } => true, + Expression::Negate { .. } => true, + Expression::ConditionalOperator { .. } => true, + Expression::Subscript { .. } => true, + Expression::StructMember { .. } => true, + Expression::AllocDynamicBytes { .. } => true, + Expression::StorageArrayLength { .. } => true, + Expression::StringCompare { .. } => true, + Expression::StringConcat { .. } => false, + Expression::Or { .. } => true, + Expression::And { .. } => true, + Expression::InternalFunction { .. } => true, + Expression::ExternalFunction { .. } => todo!(), + Expression::InternalFunctionCall { .. } => todo!(), + Expression::ExternalFunctionCall { .. } => todo!(), + Expression::ExternalFunctionCallRaw { .. } => todo!(), + Expression::Constructor { .. } => true, + Expression::FormatString { .. } => true, + Expression::Builtin { .. } => true, + Expression::InterfaceId { .. } => true, + Expression::List { .. } => true, + Expression::UserDefinedOperator { .. } => true, } } From e158f1f4b3c5037cbce351173ad470ddcfa62a0d Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 26 May 2023 17:24:46 -0700 Subject: [PATCH 006/200] fix --- src/lib.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1135f38e..7c8914e1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,8 +1,5 @@ use std::{collections::HashMap, fs, path::PathBuf, time::Instant}; -mod ast_util; -pub use ast_util::*; - mod cli; pub use cli::*; From 3e3b936d02d680aedefc6636c5950141ba462def Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 29 May 2023 14:01:46 -0700 Subject: [PATCH 007/200] Temp commit: trying to remove llvm dependency --- Cargo.toml | 4 ++-- src/mutation.rs | 2 -- src/mutator.rs | 16 +++++++++++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 651f918d..66b19d34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,8 +26,8 @@ scanner-rust = "2.0.16" serde = { version = "1", features = ["derive"] } serde_json = "1" similar = "2" -solang = "0.3.0" -solang-parser = "0.3.0" +solang = { version = "0.3", features = [] } +solang-parser = "0.3" strum = "0.24.1" strum_macros = "0.24.3" tempfile = "3" diff --git a/src/mutation.rs b/src/mutation.rs index d77b9f60..fa400577 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -181,12 +181,10 @@ impl ToString for MutationType { impl Mutation for MutationType { fn mutate_statement(&self, _stmt: &Statement, _source: &Rc) -> Vec { - println!("statment boop"); vec![] } fn mutate_expression(&self, _expr: &Expression, _source: &Rc) -> Vec { - println!("expr boop"); vec![] } } diff --git a/src/mutator.rs b/src/mutator.rs index d8da51ac..e7c8d3fa 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -183,6 +183,7 @@ impl Mutator { /// Mutate a single file. fn mutate_file(&mut self, source: Rc) -> Result, Box> { let mut resolver = FileResolver::new(); + resolver.add_import_path(&PathBuf::from(".")); let target = solang::Target::EVM; let ns = parse_and_resolve(&OsStr::new(source.filename()), &mut resolver, target); // mutate functions @@ -193,7 +194,7 @@ impl Mutator { } } } - todo!("TODO: Implement this"); + Ok(self.mutants.clone()) } /// Get a slice of the mutants produced by this mutator @@ -216,6 +217,7 @@ impl Mutator { } pub fn apply_operators_to_statement(&mut self, stmt: &Statement) { + println!("applying ops {:?} to {:?}", self.mutation_operators(), stmt); if let Some(source) = &self.current_source { let mut mutants = vec![]; for op in self.mutation_operators() { @@ -257,7 +259,12 @@ pub fn mutate_statement(statement: &Statement, mutator: &mut Mutator) -> bool { Statement::Destructure(_, _, _) => true, Statement::Continue(_) => true, Statement::Break(_) => true, - Statement::Return(_, _) => true, + Statement::Return(_, rv) => { + if let Some(rv) = rv { + rv.recurse(mutator, mutate_expression) + } + true + } Statement::Revert { .. } => true, Statement::Emit { .. } => true, Statement::TryCatch(_, _, _) => true, @@ -278,7 +285,10 @@ pub fn mutate_expression(expr: &Expression, mutator: &mut Mutator) -> bool { Expression::ArrayLiteral { .. } => true, Expression::ConstArrayLiteral { .. } => true, Expression::Add { .. } => true, - Expression::Subtract { .. } => true, + Expression::Subtract { loc: _, ty, .. } => { + println!("Type: {:?}", ty); + true + } Expression::Multiply { .. } => true, Expression::Divide { .. } => true, Expression::Modulo { .. } => true, From 3c8c0f03c0dfd8b13837a4b471509e84c193a69c Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 30 May 2023 13:09:53 -0700 Subject: [PATCH 008/200] ROR, some small tweaks --- src/mutant_writer.rs | 2 +- src/mutation.rs | 211 ++++++++++++++++++++++++++++++++++++++++++- src/mutator.rs | 7 +- 3 files changed, 210 insertions(+), 10 deletions(-) diff --git a/src/mutant_writer.rs b/src/mutant_writer.rs index 6ead4ec0..578613d0 100644 --- a/src/mutant_writer.rs +++ b/src/mutant_writer.rs @@ -162,7 +162,7 @@ impl MutantWriter { let filename = Self::get_mutant_filename(mutants_dir, mid, mutant); let mutant_contents = mutant.as_source_string()?; - log::info!( + log::debug!( "Writing mutant (mid={}) {:?} to {}", mid, mutant, diff --git a/src/mutation.rs b/src/mutation.rs index fa400577..6f998f3b 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -1,7 +1,8 @@ use crate::{get_indent, Source}; use clap::ValueEnum; use serde::{Deserialize, Serialize}; -use solang::sema::ast::{Expression, Statement}; +use solang::sema::ast::{Expression, RetrieveType, Statement}; +use solang_parser::pt::CodeLocation; use std::{error, fmt::Display, rc::Rc}; /// This struct describes a mutant. @@ -137,7 +138,9 @@ pub enum MutationType { ShiftOperatorReplacement, // ## UnaryOperatorReplacement UnaryOperatorReplacement, + // ## Fallback Operators ExpressionValueReplacement, + StatementDeletion, // # Old Operators (Deprecated) AssignmentMutation, @@ -163,6 +166,7 @@ impl ToString for MutationType { MutationType::ShiftOperatorReplacement => "ShiftOperatorReplacement", MutationType::UnaryOperatorReplacement => "UnaryOperatorReplacement", MutationType::ExpressionValueReplacement => "ExpressionOperatorReplacement", + MutationType::StatementDeletion => "StatementDeletion", MutationType::AssignmentMutation => "AssignmentMutation", MutationType::BinaryOpMutation => "BinaryOpMutation", @@ -180,12 +184,48 @@ impl ToString for MutationType { } impl Mutation for MutationType { - fn mutate_statement(&self, _stmt: &Statement, _source: &Rc) -> Vec { - vec![] + fn mutate_statement(&self, stmt: &Statement, source: &Rc) -> Vec { + let loc = stmt.loc(); + if let None = loc.try_file_no() { + return vec![]; + } + match self { + MutationType::StatementDeletion => vec![Mutant::new( + source.clone(), + self.clone(), + stmt.loc().start(), + stmt.loc().end() + 1, + "".to_string(), + )], + _ => vec![], + } } - fn mutate_expression(&self, _expr: &Expression, _source: &Rc) -> Vec { - vec![] + fn mutate_expression(&self, expr: &Expression, source: &Rc) -> Vec { + match self { + // Binary Operators + MutationType::ArithmeticOperatorReplacement => arith_op_replacement(self, expr, source), + MutationType::ShiftOperatorReplacement => todo!(), + MutationType::RelationalOperatorReplacement => rel_op_replacement(self, expr, source), + // Other + MutationType::ConditionalOperatorReplacement => todo!(), + MutationType::LiteralValueReplacement => todo!(), + MutationType::LogicalOperatorReplacement => todo!(), + MutationType::UnaryOperatorReplacement => todo!(), + MutationType::ExpressionValueReplacement => todo!(), + + // Old Operators + MutationType::AssignmentMutation => todo!(), + MutationType::BinaryOpMutation => todo!(), + MutationType::DeleteExpressionMutation => todo!(), + MutationType::ElimDelegateMutation => todo!(), + MutationType::FunctionCallMutation => todo!(), + MutationType::RequireMutation => todo!(), + MutationType::SwapArgumentsFunctionMutation => todo!(), + MutationType::SwapArgumentsOperatorMutation => todo!(), + MutationType::UnaryOperatorMutation => todo!(), + _ => vec![], + } } } @@ -206,6 +246,167 @@ impl MutationType { } } +fn get_operator(expr: &Expression) -> &str { + match expr { + Expression::Add { .. } => "+", + Expression::Subtract { .. } => "-", + Expression::Multiply { .. } => "*", + Expression::Divide { .. } => "/", + Expression::Modulo { .. } => "%", + Expression::Power { .. } => "**", + Expression::BitwiseOr { .. } => "|", + Expression::BitwiseAnd { .. } => "&", + Expression::BitwiseXor { .. } => "^", + Expression::ShiftLeft { .. } => "<<", + Expression::ShiftRight { .. } => ">>", + Expression::PreIncrement { .. } => "++", + Expression::PreDecrement { .. } => "--", + Expression::PostIncrement { .. } => "++", + Expression::PostDecrement { .. } => "--", + Expression::More { .. } => ">", + Expression::Less { .. } => "<", + Expression::MoreEqual { .. } => ">=", + Expression::LessEqual { .. } => "<=", + Expression::Equal { .. } => "==", + Expression::NotEqual { .. } => "!=", + Expression::Not { .. } => "!", + Expression::BitwiseNot { .. } => "~", + Expression::Negate { .. } => "-", + Expression::ConditionalOperator { .. } => "?", + Expression::Or { .. } => "||", + Expression::And { .. } => "&&", + _ => "", + } +} + +fn arith_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) -> Vec { + let loc = expr.loc(); + let arith_op = get_operator(expr); + let rs = vec!["+", "-", "*", "/", "**", "%"]; + let replacements: Vec<&&str> = rs.iter().filter(|x| **x != arith_op).collect(); + + if let None = loc.try_file_no() { + return vec![]; + } + match expr { + Expression::BitwiseOr { left, right, .. } + | Expression::BitwiseAnd { left, right, .. } + | Expression::BitwiseXor { left, right, .. } + | Expression::Divide { left, right, .. } + | Expression::Modulo { left, right, .. } + | Expression::Multiply { left, right, .. } + | Expression::Subtract { left, right, .. } + | Expression::Add { left, right, .. } => { + let (start, end) = (left.loc().end(), right.loc().start()); + replacements + .iter() + .map(|r| Mutant::new(source.clone(), op.clone(), start, end, format!(" {} ", r))) + .collect() + } + Expression::Power { base, exp, .. } => { + let (start, end) = (base.loc().end(), exp.loc().start()); + replacements + .iter() + .map(|r| Mutant::new(source.clone(), op.clone(), start, end, format!(" {} ", r))) + .collect() + } + _ => vec![], + } +} + +fn rel_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) -> Vec { + let loc = expr.loc(); + if let None = loc.try_file_no() { + return vec![]; + } + + // We need to know two things to perform a mutation: + // 1. The replacement string + // 2. The start, stop of each replacement + // + // For true and false replacements we are replacing the full expression, and + // we can get bounds from `expr`. For relational replacements we need to + // know the bounds of the binary operator, which we get from left and right. + // + // Thus, replacements is a tuple of (replacements, (start, end)), where + // (start, end) are the binary operator's start and end locations (note, + // these are only used for replacing with another operator, otherwise the + // `expr.loc` values are used) + let (replacements, bounds) = match expr { + Expression::Less { left, right, .. } => ( + vec!["<=", "!=", "false"], + (left.loc().end(), right.loc().start()), + ), + Expression::LessEqual { left, right, .. } => ( + vec!["<", "==", "true"], + (left.loc().end(), right.loc().start()), + ), + Expression::More { left, right, .. } => ( + vec![">=", "!=", "false"], + (left.loc().end(), right.loc().start()), + ), + Expression::MoreEqual { left, right, .. } => ( + vec![">", "==", "true"], + (left.loc().end(), right.loc().start()), + ), + Expression::Equal { left, right, .. } => { + // Assuming that we only need the left type to determine legal mutations + match left.ty() { + // The following types are orderable, so we use those for better mutation operators + solang::sema::ast::Type::Int(_) + | solang::sema::ast::Type::Uint(_) + | solang::sema::ast::Type::Rational => ( + vec!["<=", ">=", "false"], + (left.loc().end(), right.loc().start()), + ), + + // The following types are not orderable, so we replace with true and false + // TODO: Can Addresses be ordered? + solang::sema::ast::Type::Address(_) => (vec!["true", "false"], (0, 0)), + _ => (vec!["true", "false"], (0, 0)), + } + } + Expression::NotEqual { left, right, .. } => { + // Assuming that we only need the left type to determine legal mutations + match left.ty() { + // The following types are orderable, so we use those for better mutation operators + solang::sema::ast::Type::Int(_) + | solang::sema::ast::Type::Uint(_) + | solang::sema::ast::Type::Rational => ( + vec!["< ", "> ", "true"], + (left.loc().end(), right.loc().start()), + ), + + // The following types are not orderable, so we replace with true and false + // TODO: Can Addresses be ordered? + solang::sema::ast::Type::Address(_) => (vec!["true", "false"], (0, 0)), + _ => (vec!["true", "false"], (0, 0)), + } + } + _ => (vec![], (0, 0)), + }; + + // Now, apply the replacements + let mut mutants = vec![]; + let expr_start = expr.loc().start(); + let expr_end = expr.loc().end(); + let op_start = bounds.0; + let op_end = bounds.1; + for r in replacements { + mutants.push(match r { + "true" | "false" => Mutant::new( + source.clone(), + op.clone(), + expr_start, + expr_end, + r.to_string(), + ), + _ => Mutant::new(source.clone(), op.clone(), op_start, op_end, r.to_string()), + }); + } + mutants +} + /// This testing module defines and uses the testing infrastructure, allowing /// for varying degrees of testing flexibility. /// diff --git a/src/mutator.rs b/src/mutator.rs index e7c8d3fa..a5158434 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -163,9 +163,8 @@ impl Mutator { self.current_source = Some(source.clone()); match self.mutate_file(source.clone()) { - Ok(mut file_mutants) => { + Ok(file_mutants) => { log::info!(" Generated {} mutants from source", file_mutants.len()); - mutants.append(&mut file_mutants); } Err(e) => { log::warn!("Couldn't mutate source {}", source.filename().display()); @@ -183,7 +182,7 @@ impl Mutator { /// Mutate a single file. fn mutate_file(&mut self, source: Rc) -> Result, Box> { let mut resolver = FileResolver::new(); - resolver.add_import_path(&PathBuf::from(".")); + resolver.add_import_path(&PathBuf::from("."))?; let target = solang::Target::EVM; let ns = parse_and_resolve(&OsStr::new(source.filename()), &mut resolver, target); // mutate functions @@ -217,7 +216,7 @@ impl Mutator { } pub fn apply_operators_to_statement(&mut self, stmt: &Statement) { - println!("applying ops {:?} to {:?}", self.mutation_operators(), stmt); + log::debug!("applying ops {:?} to {:?}", self.mutation_operators(), stmt); if let Some(source) = &self.current_source { let mut mutants = vec![]; for op in self.mutation_operators() { From 7d3ab18f3ee561c6755b02f168ad4cdd32d2142a Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 30 May 2023 13:10:00 -0700 Subject: [PATCH 009/200] ROR.sol --- .../RelationalOperatorReplacement/ROR.sol | 38 +++++++++++++++++++ .../expected.sol | 31 +++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 benchmarks/RelationalOperatorReplacement/ROR.sol create mode 100644 benchmarks/RelationalOperatorReplacement/expected.sol diff --git a/benchmarks/RelationalOperatorReplacement/ROR.sol b/benchmarks/RelationalOperatorReplacement/ROR.sol new file mode 100644 index 00000000..914c82a7 --- /dev/null +++ b/benchmarks/RelationalOperatorReplacement/ROR.sol @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } +} diff --git a/benchmarks/RelationalOperatorReplacement/expected.sol b/benchmarks/RelationalOperatorReplacement/expected.sol new file mode 100644 index 00000000..4a9a6371 --- /dev/null +++ b/benchmarks/RelationalOperatorReplacement/expected.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +contract BinaryOpMutation { + function myAddition(uint256 x, uint256 y) public pure returns (uint256) { + return x + y; + } + + function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { + /// BinaryOpMutation of: return x - y; + return x + y; + } + + function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { + return x * y; + } + + function myDivision(uint256 x, uint256 y) public pure returns (uint256) { + return x / y; + } + + function myModulo(uint256 x, uint256 y) public pure returns (uint256) { + return x % y; + } + + function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { + return x ** y; + } + +} From bd618424ddaa4976e3b2d3c5a0e379c91edbce22 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 30 May 2023 15:55:48 -0700 Subject: [PATCH 010/200] bitwise operator replacement and logical operator replacement --- src/mutation.rs | 108 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 103 insertions(+), 5 deletions(-) diff --git a/src/mutation.rs b/src/mutation.rs index 6f998f3b..4c208d63 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -131,7 +131,7 @@ pub enum MutationType { // ## Literal Value Replacement LiteralValueReplacement, // ## Binary Operator Replacement - ConditionalOperatorReplacement, + BitwiseOperatorReplacement, RelationalOperatorReplacement, ArithmeticOperatorReplacement, LogicalOperatorReplacement, @@ -159,7 +159,7 @@ impl ToString for MutationType { fn to_string(&self) -> String { let str = match self { MutationType::LiteralValueReplacement => "LiteralValueReplacement", - MutationType::ConditionalOperatorReplacement => "ConditionalOperatorReplacement", + MutationType::BitwiseOperatorReplacement => "ConditionalOperatorReplacement", MutationType::RelationalOperatorReplacement => "RelationalOperatorReplacement", MutationType::ArithmeticOperatorReplacement => "ArithmeticOperatorReplacemnt", MutationType::LogicalOperatorReplacement => "LogicalOperatorReplacement", @@ -205,12 +205,12 @@ impl Mutation for MutationType { match self { // Binary Operators MutationType::ArithmeticOperatorReplacement => arith_op_replacement(self, expr, source), - MutationType::ShiftOperatorReplacement => todo!(), + MutationType::ShiftOperatorReplacement => shift_op_replacement(self, expr, source), + MutationType::BitwiseOperatorReplacement => bitwise_op_replacement(self, expr, source), MutationType::RelationalOperatorReplacement => rel_op_replacement(self, expr, source), + MutationType::LogicalOperatorReplacement => logical_op_replacement(self, expr, source), // Other - MutationType::ConditionalOperatorReplacement => todo!(), MutationType::LiteralValueReplacement => todo!(), - MutationType::LogicalOperatorReplacement => todo!(), MutationType::UnaryOperatorReplacement => todo!(), MutationType::ExpressionValueReplacement => todo!(), @@ -246,6 +246,7 @@ impl MutationType { } } +/// Get a string representation of an operator fn get_operator(expr: &Expression) -> &str { match expr { Expression::Add { .. } => "+", @@ -314,6 +315,54 @@ fn arith_op_replacement(op: &MutationType, expr: &Expression, source: &Rc, +) -> Vec { + let loc = expr.loc(); + let bitwise_op = get_operator(expr); + let rs = vec!["|", "&", "^"]; + let replacements: Vec<&&str> = rs.iter().filter(|x| **x != bitwise_op).collect(); + + if let None = loc.try_file_no() { + return vec![]; + } + match expr { + Expression::BitwiseOr { left, right, .. } + | Expression::BitwiseAnd { left, right, .. } + | Expression::BitwiseXor { left, right, .. } => { + let (start, end) = (left.loc().end(), right.loc().start()); + replacements + .iter() + .map(|r| Mutant::new(source.clone(), op.clone(), start, end, format!(" {} ", r))) + .collect() + } + _ => vec![], + } +} + +fn shift_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) -> Vec { + let loc = expr.loc(); + let shift_op = get_operator(expr); + let rs = vec!["<<", ">>"]; + let replacements: Vec<&&str> = rs.iter().filter(|x| **x != shift_op).collect(); + + if let None = loc.try_file_no() { + return vec![]; + } + match expr { + Expression::ShiftLeft { left, right, .. } | Expression::ShiftRight { left, right, .. } => { + let (start, end) = (left.loc().end(), right.loc().start()); + replacements + .iter() + .map(|r| Mutant::new(source.clone(), op.clone(), start, end, format!(" {} ", r))) + .collect() + } + _ => vec![], + } +} + fn rel_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) -> Vec { let loc = expr.loc(); if let None = loc.try_file_no() { @@ -407,6 +456,55 @@ fn rel_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) mutants } +fn logical_op_replacement( + op: &MutationType, + expr: &Expression, + source: &Rc, +) -> Vec { + let loc = expr.loc(); + if let None = loc.try_file_no() { + return vec![]; + } + + let replacements = match expr { + Expression::And { left, right, .. } => vec![ + ("LHS", left.loc().start(), left.loc().end()), + ("RHS", right.loc().start(), right.loc().end()), + ("false", 0, 0), + ], + Expression::Or { left, right, .. } => vec![ + ("LHS", left.loc().start(), left.loc().end()), + ("RHS", right.loc().start(), right.loc().end()), + ("true", 0, 0), + ], + _ => vec![], + }; + + // Now, apply the replacements + let mut mutants = vec![]; + let expr_start = expr.loc().start(); + let expr_end = expr.loc().end(); + for (r, s, e) in replacements { + mutants.push(match r { + "LHS" | "RHS" => { + let repl = std::str::from_utf8(source.contents_between_offsets(s, e)) + .unwrap() + .to_string(); + Mutant::new(source.clone(), op.clone(), expr_start, expr_end, repl) + } + "true" | "false" => Mutant::new( + source.clone(), + op.clone(), + expr_start, + expr_end, + r.to_string(), + ), + _ => panic!("Illegal State"), + }); + } + mutants +} + /// This testing module defines and uses the testing infrastructure, allowing /// for varying degrees of testing flexibility. /// From 89728549da69e2ff68e5e15dd974e9fbb99a6936 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 30 May 2023 15:56:47 -0700 Subject: [PATCH 011/200] Changed benchmark dir names --- benchmarks/LOR/LOR.sol | 19 +++++++++++++++++++ .../ROR.sol | 0 .../expected.sol | 0 3 files changed, 19 insertions(+) create mode 100644 benchmarks/LOR/LOR.sol rename benchmarks/{RelationalOperatorReplacement => ROR}/ROR.sol (100%) rename benchmarks/{RelationalOperatorReplacement => ROR}/expected.sol (100%) diff --git a/benchmarks/LOR/LOR.sol b/benchmarks/LOR/LOR.sol new file mode 100644 index 00000000..8baa24eb --- /dev/null +++ b/benchmarks/LOR/LOR.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // To test LHS and RHS operators + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/benchmarks/RelationalOperatorReplacement/ROR.sol b/benchmarks/ROR/ROR.sol similarity index 100% rename from benchmarks/RelationalOperatorReplacement/ROR.sol rename to benchmarks/ROR/ROR.sol diff --git a/benchmarks/RelationalOperatorReplacement/expected.sol b/benchmarks/ROR/expected.sol similarity index 100% rename from benchmarks/RelationalOperatorReplacement/expected.sol rename to benchmarks/ROR/expected.sol From 0cced1e7c8a467f8cef33465fe2c0e1adb888604 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 30 May 2023 18:01:30 -0700 Subject: [PATCH 012/200] LVR --- Cargo.toml | 3 +++ benchmarks/LVR/LVR.sol | 37 ++++++++++++++++++++++++++ src/mutation.rs | 59 +++++++++++++++++++++++++++++++++++++++++- src/mutator.rs | 10 ++++++- 4 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 benchmarks/LVR/LVR.sol diff --git a/Cargo.toml b/Cargo.toml index 66b19d34..3e08d0bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,9 @@ clap_complete = "4.0.6" csv = "1.2.1" env_logger = { version = "0.10.0", default-features = false } log = "0.4" +num-bigint = "0.4" +num-rational = "0.4" +num-traits = "0.2" project-root = "0.2" rand_pcg = "0.3.0" rand = { version = "0.8.5", features = ["std"] } diff --git a/benchmarks/LVR/LVR.sol b/benchmarks/LVR/LVR.sol new file mode 100644 index 00000000..e74ec9eb --- /dev/null +++ b/benchmarks/LVR/LVR.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/src/mutation.rs b/src/mutation.rs index 4c208d63..a6842752 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -1,5 +1,7 @@ use crate::{get_indent, Source}; use clap::ValueEnum; +use num_bigint::BigInt; +use num_traits::{One, Zero}; use serde::{Deserialize, Serialize}; use solang::sema::ast::{Expression, RetrieveType, Statement}; use solang_parser::pt::CodeLocation; @@ -210,7 +212,7 @@ impl Mutation for MutationType { MutationType::RelationalOperatorReplacement => rel_op_replacement(self, expr, source), MutationType::LogicalOperatorReplacement => logical_op_replacement(self, expr, source), // Other - MutationType::LiteralValueReplacement => todo!(), + MutationType::LiteralValueReplacement => literal_value_replacement(self, expr, source), MutationType::UnaryOperatorReplacement => todo!(), MutationType::ExpressionValueReplacement => todo!(), @@ -505,6 +507,61 @@ fn logical_op_replacement( mutants } +fn literal_value_replacement( + op: &MutationType, + expr: &Expression, + source: &Rc, +) -> Vec { + let loc = expr.loc(); + if let None = loc.try_file_no() { + return vec![]; + } + // We are only replacing BoolLiterals, NumberLiterals, and + // RationalNumberLiterals. It's not clear what other literals we should + // replace + let replacements = match expr { + Expression::BoolLiteral { value, .. } => vec![(!value).to_string()], + Expression::NumberLiteral { ty, value, .. } => match ty { + solang::sema::ast::Type::Address(_) => todo!(), + solang::sema::ast::Type::Int(_) => { + if value.is_zero() { + vec!["-1".to_string(), "1".to_string()] + } else { + vec!["0".to_string(), (-value).to_string()] + } + } + solang::sema::ast::Type::Uint(_) => { + if value.is_zero() { + vec!["1".to_string()] + } else { + vec!["0".to_string(), (value + BigInt::one()).to_string()] + } + } + _ => vec![], + }, + Expression::RationalNumberLiteral { value: _, .. } => vec![], + Expression::BytesLiteral { .. } => vec![], + Expression::CodeLiteral { .. } => vec![], + Expression::StructLiteral { .. } => vec![], + Expression::ArrayLiteral { .. } => vec![], + Expression::ConstArrayLiteral { .. } => vec![], + _ => vec![], + }; + let mut mutants = vec![]; + let expr_start = expr.loc().start(); + let expr_end = expr.loc().end(); + for r in replacements { + mutants.push(Mutant::new( + source.clone(), + op.clone(), + expr_start, + expr_end, + r.clone(), + )); + } + mutants +} + /// This testing module defines and uses the testing infrastructure, allowing /// for varying degrees of testing flexibility. /// diff --git a/src/mutator.rs b/src/mutator.rs index a5158434..f1e50e34 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -231,7 +231,15 @@ pub fn mutate_statement(statement: &Statement, mutator: &mut Mutator) -> bool { mutator.apply_operators_to_statement(statement); match statement { Statement::Block { .. } => true, - Statement::VariableDecl(_, _, _, _) => true, + Statement::VariableDecl(_, _, _, expr) => { + match expr { + Some(e) => e.recurse(mutator, mutate_expression), + None => (), + } + + true + } + Statement::If(_, _, c, _, _) => { c.recurse(mutator, mutate_expression); true From c686ec934f69de24d8bb0e1c4544783951b500c5 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 30 May 2023 18:21:32 -0700 Subject: [PATCH 013/200] UOR --- benchmarks/LVR/LVR.sol | 2 +- benchmarks/UOR/UOR.sol | 21 +++++++++++++++++++++ src/mutation.rs | 26 +++++++++++++++++++++++++- 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 benchmarks/UOR/UOR.sol diff --git a/benchmarks/LVR/LVR.sol b/benchmarks/LVR/LVR.sol index e74ec9eb..9289c077 100644 --- a/benchmarks/LVR/LVR.sol +++ b/benchmarks/LVR/LVR.sol @@ -3,7 +3,7 @@ pragma solidity >0.7.0; pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) -contract ROR { +contract LVR { uint256 one_u = 1; uint256 zero_u = 0; int256 n_one_s = -1; diff --git a/benchmarks/UOR/UOR.sol b/benchmarks/UOR/UOR.sol new file mode 100644 index 00000000..cbf673bc --- /dev/null +++ b/benchmarks/UOR/UOR.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// Unary Operator Replacement +contract UOR { + // Expect no mutants: cannot negate an unsigned integer + function unsigned_bw_not(uint256 x) public pure returns (uint256) { + return ~x; + } + + // Expect a single mutant: -x + function signed_bw_not(int256 x) public pure returns (int256) { + return ~x; + } + + // Expect a single mutant: ~x + function signed_neg(int256 x) public pure returns (int256) { + return -x; + } +} diff --git a/src/mutation.rs b/src/mutation.rs index a6842752..aadea50e 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -213,7 +213,7 @@ impl Mutation for MutationType { MutationType::LogicalOperatorReplacement => logical_op_replacement(self, expr, source), // Other MutationType::LiteralValueReplacement => literal_value_replacement(self, expr, source), - MutationType::UnaryOperatorReplacement => todo!(), + MutationType::UnaryOperatorReplacement => unary_op_replacement(self, expr, source), MutationType::ExpressionValueReplacement => todo!(), // Old Operators @@ -365,6 +365,30 @@ fn shift_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) -> Vec { + let loc = expr.loc(); + let bitwise_op = get_operator(expr); + let rs = vec!["-", "~"]; + let replacements: Vec<&&str> = rs.iter().filter(|x| **x != bitwise_op).collect(); + + if let None = loc.try_file_no() { + return vec![]; + } + let muts = match expr { + Expression::BitwiseNot { expr: rand, .. } | Expression::Negate { expr: rand, .. } => { + let start = expr.loc().start(); + let end = rand.loc().start(); + let muts = replacements + .iter() + .map(|r| Mutant::new(source.clone(), op.clone(), start, end, format!(" {} ", r))) + .collect(); + muts + } + _ => vec![], + }; + muts +} + fn rel_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) -> Vec { let loc = expr.loc(); if let None = loc.try_file_no() { From de1a528361e930a10501f17c40482371f3e2a67c Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 30 May 2023 18:24:04 -0700 Subject: [PATCH 014/200] Typo, comments in LOR --- benchmarks/LOR/LOR.sol | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/benchmarks/LOR/LOR.sol b/benchmarks/LOR/LOR.sol index 8baa24eb..d6f58fcc 100644 --- a/benchmarks/LOR/LOR.sol +++ b/benchmarks/LOR/LOR.sol @@ -3,16 +3,18 @@ pragma solidity >0.7.0; pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) -contract ROR { +contract LOR { + // Expect three mutants: a, b, false function and(bool a, bool b) public pure returns (bool) { return a && b; } + // Expect three mutants: a, b, true function or(bool a, bool b) public pure returns (bool) { return a || b; } - // To test LHS and RHS operators + // Expect three mutants, x < y, a != (x >= y), true function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } From 80655bebab267e20b9f550cedf25dc33b051a1b4 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 30 May 2023 18:26:02 -0700 Subject: [PATCH 015/200] Commented LVR benchmark --- benchmarks/LVR/LVR.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/benchmarks/LVR/LVR.sol b/benchmarks/LVR/LVR.sol index 9289c077..a9669e33 100644 --- a/benchmarks/LVR/LVR.sol +++ b/benchmarks/LVR/LVR.sol @@ -10,26 +10,31 @@ contract LVR { int256 one_s = 1; int256 zero_s = 0; + // Expect 1 mutant: 1 function unsigned_zero() public pure returns (uint256) { uint256 zero = 0; return zero; } + // Expect 2 mutant: 0, 2 function unsigned_one() public pure returns (uint256) { uint256 one = 1; return one; } + // Expect 2 mutants: 0, 1 function signed_neg_one() public pure returns (int256) { int256 neg_one = -1; return neg_one; } + // Expect 2 mutants: -1, 0 function signed_pos_one() public pure returns (int256) { int256 pos_one = 1; return pos_one; } + // Expect 2 mutants: -1, 1 function signed_zero() public pure returns (int256) { int256 zero = 0; return zero; From ba9e5b074604d4118f0c029098daf077b43c197e Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 30 May 2023 19:42:52 -0700 Subject: [PATCH 016/200] Update traversal to handle not-equals --- benchmarks/ROR/ROR.sol | 26 +++++++++++ benchmarks/ROR/expected.sol | 31 ------------- src/mutator.rs | 87 +++++++++---------------------------- 3 files changed, 46 insertions(+), 98 deletions(-) delete mode 100644 benchmarks/ROR/expected.sol diff --git a/benchmarks/ROR/ROR.sol b/benchmarks/ROR/ROR.sol index 914c82a7..7b214436 100644 --- a/benchmarks/ROR/ROR.sol +++ b/benchmarks/ROR/ROR.sol @@ -4,35 +4,61 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { + // Expect 3 mutants: x <= y, x != y, false function less(uint256 x, uint256 y) public pure returns (bool) { return x < y; } + // Expect 3 mutants: x < y, x == y, true function less_equal(uint256 x, uint256 y) public pure returns (bool) { return x <= y; } + // Expect 3 mutants: x >= y, x != y, false function more(uint256 x, uint256 y) public pure returns (bool) { return x > y; } + // Expect 3 mutants: x > y, x == y, true function more_equal(uint256 x, uint256 y) public pure returns (bool) { return x >= y; } + // Expect 3 mutants: x >= y, x <= y, false function equal_ord(uint256 x, uint256 y) public pure returns (bool) { return x == y; } + // Expect 2 mutants: true, false function equal_not_ord(bool x, bool y) public pure returns (bool) { return x == y; } + // Expect 3 mutants: x > y, x < y, true function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { return x != y; } + // Expect 2 mutants: true, false function not_equal_not_ord(bool x, bool y) public pure returns (bool) { return x != y; } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } } diff --git a/benchmarks/ROR/expected.sol b/benchmarks/ROR/expected.sol deleted file mode 100644 index 4a9a6371..00000000 --- a/benchmarks/ROR/expected.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation of: return x - y; - return x + y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/src/mutator.rs b/src/mutator.rs index f1e50e34..7b472d6a 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -281,75 +281,28 @@ pub fn mutate_statement(statement: &Statement, mutator: &mut Mutator) -> bool { } pub fn mutate_expression(expr: &Expression, mutator: &mut Mutator) -> bool { - mutator.apply_operators_to_expression(expr); match expr { - Expression::BoolLiteral { .. } => true, - Expression::BytesLiteral { .. } => true, - Expression::CodeLiteral { .. } => true, - Expression::NumberLiteral { .. } => true, - Expression::RationalNumberLiteral { .. } => true, - Expression::StructLiteral { .. } => true, - Expression::ArrayLiteral { .. } => true, - Expression::ConstArrayLiteral { .. } => true, - Expression::Add { .. } => true, - Expression::Subtract { loc: _, ty, .. } => { - println!("Type: {:?}", ty); + // Special case `Not{ Equal { left, right}}`: this is how `NotEqual` is + // represented after a parse, and if we special case mutation of this + // operator the `Equal {left, right}` node is visited again later, + // leading to too many mutants + Expression::Not { loc, expr } => { + if let Expression::Equal { loc, left, right } = expr.as_ref() { + Expression::NotEqual { + loc: *loc, + left: left.clone(), + right: right.clone(), + } + .recurse(mutator, mutate_expression); + false + } else { + mutator.apply_operators_to_expression(expr); + true + } + } + _ => { + mutator.apply_operators_to_expression(expr); true } - Expression::Multiply { .. } => true, - Expression::Divide { .. } => true, - Expression::Modulo { .. } => true, - Expression::Power { .. } => true, - Expression::BitwiseOr { .. } => true, - Expression::BitwiseAnd { .. } => true, - Expression::BitwiseXor { .. } => true, - Expression::ShiftLeft { .. } => true, - Expression::ShiftRight { .. } => true, - Expression::Variable { .. } => true, - Expression::ConstantVariable { .. } => true, - Expression::StorageVariable { .. } => true, - Expression::Load { .. } => true, - Expression::GetRef { .. } => true, - Expression::StorageLoad { .. } => true, - Expression::ZeroExt { .. } => true, - Expression::SignExt { .. } => true, - Expression::Trunc { .. } => true, - Expression::CheckingTrunc { .. } => true, - Expression::Cast { .. } => true, - Expression::BytesCast { .. } => true, - Expression::PreIncrement { .. } => true, - Expression::PreDecrement { .. } => true, - Expression::PostIncrement { .. } => true, - Expression::PostDecrement { .. } => true, - Expression::Assign { .. } => true, - Expression::More { .. } => true, - Expression::Less { .. } => true, - Expression::MoreEqual { .. } => true, - Expression::LessEqual { .. } => true, - Expression::Equal { .. } => true, - Expression::NotEqual { .. } => true, - Expression::Not { .. } => true, - Expression::BitwiseNot { .. } => true, - Expression::Negate { .. } => true, - Expression::ConditionalOperator { .. } => true, - Expression::Subscript { .. } => true, - Expression::StructMember { .. } => true, - Expression::AllocDynamicBytes { .. } => true, - Expression::StorageArrayLength { .. } => true, - Expression::StringCompare { .. } => true, - Expression::StringConcat { .. } => false, - Expression::Or { .. } => true, - Expression::And { .. } => true, - Expression::InternalFunction { .. } => true, - Expression::ExternalFunction { .. } => todo!(), - Expression::InternalFunctionCall { .. } => todo!(), - Expression::ExternalFunctionCall { .. } => todo!(), - Expression::ExternalFunctionCallRaw { .. } => todo!(), - Expression::Constructor { .. } => true, - Expression::FormatString { .. } => true, - Expression::Builtin { .. } => true, - Expression::InterfaceId { .. } => true, - Expression::List { .. } => true, - Expression::UserDefinedOperator { .. } => true, } } From 896c8cfbf36c247906ab014cc9647c01cc920040 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 31 May 2023 17:06:47 -0700 Subject: [PATCH 017/200] fixed bug in operator locations --- benchmarks/AOR/AOR.sol | 60 ++++++++++ benchmarks/BOR/BOR.sol | 24 ++++ src/mutation.rs | 262 ++++++++++++++++++++++++++++------------- src/mutator.rs | 2 +- 4 files changed, 264 insertions(+), 84 deletions(-) create mode 100644 benchmarks/AOR/AOR.sol create mode 100644 benchmarks/BOR/BOR.sol diff --git a/benchmarks/AOR/AOR.sol b/benchmarks/AOR/AOR.sol new file mode 100644 index 00000000..c659050a --- /dev/null +++ b/benchmarks/AOR/AOR.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/benchmarks/BOR/BOR.sol b/benchmarks/BOR/BOR.sol new file mode 100644 index 00000000..2eb51bff --- /dev/null +++ b/benchmarks/BOR/BOR.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Bitwise Operator Replacement (BOR) +contract BOR { + // Expect 1 mutants: + // a & b; + function bw_or(int256 a, int256 b) public pure returns (int256) { + return a | b; + } + + // Expect 1 mutants: + // a | b; + function bw_and(int256 a, int256 b) public pure returns (int256) { + return a & b; + } + + // Expect 1 mutants: + // a | b; + function bw_xor(int256 a, int256 b) public pure returns (int256) { + return a ^ b; + } +} diff --git a/src/mutation.rs b/src/mutation.rs index aadea50e..84bfb307 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -3,8 +3,8 @@ use clap::ValueEnum; use num_bigint::BigInt; use num_traits::{One, Zero}; use serde::{Deserialize, Serialize}; -use solang::sema::ast::{Expression, RetrieveType, Statement}; -use solang_parser::pt::CodeLocation; +use solang::sema::ast::{Expression, RetrieveType, Statement, Type}; +use solang_parser::pt::{CodeLocation, Loc}; use std::{error, fmt::Display, rc::Rc}; /// This struct describes a mutant. @@ -248,6 +248,85 @@ impl MutationType { } } +/// Find the location of an operator. This is not explicitly represented in an +/// AST node, so we have to do some digging. +fn get_op_loc(expr: &Expression, source: &Rc) -> Loc { + match expr { + // Regular Binary operator + Expression::Add { left, right, .. } + | Expression::Subtract { left, right, .. } + | Expression::Multiply { left, right, .. } + | Expression::Divide { left, right, .. } + | Expression::Modulo { left, right, .. } + | Expression::BitwiseOr { left, right, .. } + | Expression::BitwiseAnd { left, right, .. } + | Expression::BitwiseXor { left, right, .. } + | Expression::ShiftLeft { left, right, .. } + | Expression::ShiftRight { left, right, .. } + | Expression::Assign { left, right, .. } + | Expression::More { left, right, .. } + | Expression::Less { left, right, .. } + | Expression::MoreEqual { left, right, .. } + | Expression::LessEqual { left, right, .. } + | Expression::Equal { left, right, .. } + | Expression::NotEqual { left, right, .. } + | Expression::Or { left, right, .. } + | Expression::And { left, right, .. } => { + let start = left.loc().end(); + let end = right.loc().start(); + let op = get_operator(expr); + let substr = source.contents_between_offsets(start, end); + let first_op_char = op.as_bytes().to_vec()[0]; + let op_offset_in_substr = substr.iter().position(|c| *c == first_op_char).unwrap(); + let op_start = start + (op_offset_in_substr as usize); + let op_end = op_start + op.len(); + left.loc().with_start(op_start).with_end(op_end) + } + Expression::StringConcat { .. } | Expression::StringCompare { .. } => todo!(), + + Expression::Power { base, exp, .. } => { + let start = base.loc().end(); + let end = exp.loc().start(); + let op = get_operator(expr); + let substr = source.contents_between_offsets(start, end); + let first_op_char = op.as_bytes().to_vec()[0]; + let op_offset_in_substr = substr.iter().position(|c| *c == first_op_char).unwrap(); + let op_start = start + (op_offset_in_substr as usize); + let op_end = op_start + op.len(); + base.loc().with_start(op_start).with_end(op_end) + } + Expression::PreIncrement { loc, expr, .. } | Expression::PreDecrement { loc, expr, .. } => { + loc.with_end(loc.start() + get_operator(expr).len()) + } + Expression::PostIncrement { loc, expr, .. } + | Expression::PostDecrement { loc, expr, .. } => { + loc.with_start(loc.end() - get_operator(expr).len()) + } + + Expression::Not { loc, expr, .. } + | Expression::BitwiseNot { loc, expr, .. } + | Expression::Negate { loc, expr, .. } => { + loc.with_end(loc.start() + get_operator(expr).len()) + } + + Expression::ConditionalOperator { + cond, true_option, .. + } => { + let start = cond.loc().end(); + let end = true_option.loc().start(); + let op = get_operator(expr); + let substr = source.contents_between_offsets(start, end); + let first_op_char = op.as_bytes().to_vec()[0]; + let op_offset_in_substr = substr.iter().position(|c| *c == first_op_char).unwrap(); + let op_start = start + (op_offset_in_substr as usize); + let op_end = op_start + op.len(); + cond.loc().with_start(op_start).with_end(op_end) + } + + _ => panic!("No op location for {:?}", expr), + } +} + /// Get a string representation of an operator fn get_operator(expr: &Expression) -> &str { match expr { @@ -286,28 +365,43 @@ fn arith_op_replacement(op: &MutationType, expr: &Expression, source: &Rc = rs.iter().filter(|x| **x != arith_op).collect(); + let mut replacements: Vec<&str> = rs.iter().filter(|x| **x != arith_op).map(|x| *x).collect(); if let None = loc.try_file_no() { return vec![]; } match expr { - Expression::BitwiseOr { left, right, .. } - | Expression::BitwiseAnd { left, right, .. } - | Expression::BitwiseXor { left, right, .. } - | Expression::Divide { left, right, .. } - | Expression::Modulo { left, right, .. } - | Expression::Multiply { left, right, .. } - | Expression::Subtract { left, right, .. } - | Expression::Add { left, right, .. } => { - let (start, end) = (left.loc().end(), right.loc().start()); + Expression::BitwiseOr { .. } + | Expression::BitwiseAnd { .. } + | Expression::BitwiseXor { .. } + | Expression::Divide { .. } + | Expression::Modulo { .. } + | Expression::Multiply { .. } + | Expression::Subtract { .. } + | Expression::Add { .. } => { + let is_signed_int = if let Type::Int(_) = expr.ty() { + true + } else { + false + }; + if is_signed_int { + replacements = replacements + .iter() + .filter(|x| **x != "**") + .map(|x| *x) + .collect(); + } + + let op_loc = get_op_loc(expr, source); + let (start, end) = (op_loc.start(), op_loc.end()); replacements .iter() - .map(|r| Mutant::new(source.clone(), op.clone(), start, end, format!(" {} ", r))) + .map(|r| Mutant::new(source.clone(), op.clone(), start, end, format!("{}", r))) .collect() } - Expression::Power { base, exp, .. } => { - let (start, end) = (base.loc().end(), exp.loc().start()); + Expression::Power { .. } => { + let op_loc = get_op_loc(expr, source); + let (start, end) = (op_loc.start(), op_loc.end()); replacements .iter() .map(|r| Mutant::new(source.clone(), op.clone(), start, end, format!(" {} ", r))) @@ -323,22 +417,42 @@ fn bitwise_op_replacement( source: &Rc, ) -> Vec { let loc = expr.loc(); - let bitwise_op = get_operator(expr); - let rs = vec!["|", "&", "^"]; - let replacements: Vec<&&str> = rs.iter().filter(|x| **x != bitwise_op).collect(); - if let None = loc.try_file_no() { return vec![]; } match expr { - Expression::BitwiseOr { left, right, .. } - | Expression::BitwiseAnd { left, right, .. } - | Expression::BitwiseXor { left, right, .. } => { - let (start, end) = (left.loc().end(), right.loc().start()); - replacements - .iter() - .map(|r| Mutant::new(source.clone(), op.clone(), start, end, format!(" {} ", r))) - .collect() + Expression::BitwiseOr { .. } => { + let op_loc = get_op_loc(expr, source); + let (start, end) = (op_loc.start(), op_loc.end()); + vec![Mutant::new( + source.clone(), + op.clone(), + start, + end, + "&".to_string(), + )] + } + Expression::BitwiseAnd { .. } => { + let op_loc = get_op_loc(expr, source); + let (start, end) = (op_loc.start(), op_loc.end()); + vec![Mutant::new( + source.clone(), + op.clone(), + start, + end, + "|".to_string(), + )] + } + Expression::BitwiseXor { .. } => { + let op_loc = get_op_loc(expr, source); + let (start, end) = (op_loc.start(), op_loc.end()); + vec![Mutant::new( + source.clone(), + op.clone(), + start, + end, + "&".to_string(), + )] } _ => vec![], } @@ -346,20 +460,31 @@ fn bitwise_op_replacement( fn shift_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) -> Vec { let loc = expr.loc(); - let shift_op = get_operator(expr); - let rs = vec!["<<", ">>"]; - let replacements: Vec<&&str> = rs.iter().filter(|x| **x != shift_op).collect(); - if let None = loc.try_file_no() { return vec![]; } match expr { - Expression::ShiftLeft { left, right, .. } | Expression::ShiftRight { left, right, .. } => { - let (start, end) = (left.loc().end(), right.loc().start()); - replacements - .iter() - .map(|r| Mutant::new(source.clone(), op.clone(), start, end, format!(" {} ", r))) - .collect() + Expression::ShiftLeft { .. } => { + let op_loc = get_op_loc(expr, source); + let (start, end) = (op_loc.start(), op_loc.end()); + vec![Mutant::new( + source.clone(), + op.clone(), + start, + end, + ">>".to_string(), + )] + } + Expression::ShiftRight { .. } => { + let op_loc = get_op_loc(expr, source); + let (start, end) = (op_loc.start(), op_loc.end()); + vec![Mutant::new( + source.clone(), + op.clone(), + start, + end, + "<<".to_string(), + )] } _ => vec![], } @@ -395,78 +520,49 @@ fn rel_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) return vec![]; } - // We need to know two things to perform a mutation: - // 1. The replacement string - // 2. The start, stop of each replacement - // - // For true and false replacements we are replacing the full expression, and - // we can get bounds from `expr`. For relational replacements we need to - // know the bounds of the binary operator, which we get from left and right. - // - // Thus, replacements is a tuple of (replacements, (start, end)), where - // (start, end) are the binary operator's start and end locations (note, - // these are only used for replacing with another operator, otherwise the - // `expr.loc` values are used) - let (replacements, bounds) = match expr { - Expression::Less { left, right, .. } => ( - vec!["<=", "!=", "false"], - (left.loc().end(), right.loc().start()), - ), - Expression::LessEqual { left, right, .. } => ( - vec!["<", "==", "true"], - (left.loc().end(), right.loc().start()), - ), - Expression::More { left, right, .. } => ( - vec![">=", "!=", "false"], - (left.loc().end(), right.loc().start()), - ), - Expression::MoreEqual { left, right, .. } => ( - vec![">", "==", "true"], - (left.loc().end(), right.loc().start()), - ), - Expression::Equal { left, right, .. } => { + let replacements = match expr { + Expression::Less { .. } => vec!["<=", "!=", "false"], + Expression::LessEqual { .. } => vec!["<", "==", "true"], + Expression::More { .. } => vec![">=", "!=", "false"], + Expression::MoreEqual { .. } => vec![">", "==", "true"], + Expression::Equal { left, .. } => { // Assuming that we only need the left type to determine legal mutations match left.ty() { // The following types are orderable, so we use those for better mutation operators solang::sema::ast::Type::Int(_) | solang::sema::ast::Type::Uint(_) - | solang::sema::ast::Type::Rational => ( - vec!["<=", ">=", "false"], - (left.loc().end(), right.loc().start()), - ), + | solang::sema::ast::Type::Rational => vec!["<=", ">=", "false"], // The following types are not orderable, so we replace with true and false // TODO: Can Addresses be ordered? - solang::sema::ast::Type::Address(_) => (vec!["true", "false"], (0, 0)), - _ => (vec!["true", "false"], (0, 0)), + solang::sema::ast::Type::Address(_) => vec!["true", "false"], + _ => vec!["true", "false"], } } - Expression::NotEqual { left, right, .. } => { + Expression::NotEqual { left, .. } => { // Assuming that we only need the left type to determine legal mutations match left.ty() { // The following types are orderable, so we use those for better mutation operators solang::sema::ast::Type::Int(_) | solang::sema::ast::Type::Uint(_) - | solang::sema::ast::Type::Rational => ( - vec!["< ", "> ", "true"], - (left.loc().end(), right.loc().start()), - ), + | solang::sema::ast::Type::Rational => vec!["< ", "> ", "true"], // The following types are not orderable, so we replace with true and false // TODO: Can Addresses be ordered? - solang::sema::ast::Type::Address(_) => (vec!["true", "false"], (0, 0)), - _ => (vec!["true", "false"], (0, 0)), + solang::sema::ast::Type::Address(_) => vec!["true", "false"], + _ => vec!["true", "false"], } } - _ => (vec![], (0, 0)), + _ => return vec![], }; // Now, apply the replacements let mut mutants = vec![]; let expr_start = expr.loc().start(); let expr_end = expr.loc().end(); - let op_start = bounds.0; - let op_end = bounds.1; + let op_loc = get_op_loc(expr, source); + let op_start = op_loc.start(); + let op_end = op_loc.end(); for r in replacements { mutants.push(match r { "true" | "false" => Mutant::new( diff --git a/src/mutator.rs b/src/mutator.rs index 7b472d6a..c25997db 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -286,7 +286,7 @@ pub fn mutate_expression(expr: &Expression, mutator: &mut Mutator) -> bool { // represented after a parse, and if we special case mutation of this // operator the `Equal {left, right}` node is visited again later, // leading to too many mutants - Expression::Not { loc, expr } => { + Expression::Not { loc: _, expr } => { if let Expression::Equal { loc, left, right } = expr.as_ref() { Expression::NotEqual { loc: *loc, From c444d75cfebebbc58dc0efcd6e8b0614c9c06234 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 5 Jun 2023 15:15:02 -0700 Subject: [PATCH 018/200] Removed llvm dependency --- Cargo.toml | 4 +-- benchmarks/config-jsons/aor.json | 9 ++++++ src/mutator.rs | 51 +++++++++++++++++++++++++------- 3 files changed, 51 insertions(+), 13 deletions(-) create mode 100644 benchmarks/config-jsons/aor.json diff --git a/Cargo.toml b/Cargo.toml index 3e08d0bd..2a41c1d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ authors = [ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +solang = { git = "https://github.com/hyperledger/solang.git", rev = "15f20d8ed49f6a26b51c9783caec1cbddbd9167c", default-features = false } ansi_term = "0.12" clap = { version = "4.0.29", features = ["derive"] } clap_complete = "4.0.6" @@ -29,8 +30,7 @@ scanner-rust = "2.0.16" serde = { version = "1", features = ["derive"] } serde_json = "1" similar = "2" -solang = { version = "0.3", features = [] } -solang-parser = "0.3" +solang-parser = { git = "https://github.com/hyperledger/solang.git", rev = "15f20d8ed49f6a26b51c9783caec1cbddbd9167c" } strum = "0.24.1" strum_macros = "0.24.3" tempfile = "3" diff --git a/benchmarks/config-jsons/aor.json b/benchmarks/config-jsons/aor.json new file mode 100644 index 00000000..a152dccc --- /dev/null +++ b/benchmarks/config-jsons/aor.json @@ -0,0 +1,9 @@ +[ + { + "filename": "../AOR/AOR.sol", + "sourceroot": "..", + "mutations": [ + "arithmetic-operator-replacement" + ] + } +] \ No newline at end of file diff --git a/src/mutator.rs b/src/mutator.rs index c25997db..1fa48fb6 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -52,7 +52,6 @@ impl From<&MutateParams> for MutatorConf { } /// The mutator performs the actual logic of mutating a program, writes -#[derive(Debug)] pub struct Mutator { /// Configuration for this mutator pub conf: MutatorConf, @@ -66,10 +65,25 @@ pub struct Mutator { /// The current source being mutated pub current_source: Option>, + /// The file resolver + pub file_resolver: FileResolver, + /// A temporary directory to store intermediate work _tmp: PathBuf, } +impl std::fmt::Debug for Mutator { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("Mutator") + .field("conf", &self.conf) + .field("sources", &self.sources) + .field("mutants", &self.mutants) + .field("current_source", &self.current_source) + .field("_tmp", &self._tmp) + .finish() + } +} + impl From<&MutateParams> for Mutator { fn from(value: &MutateParams) -> Self { let conf = MutatorConf::from(value); @@ -119,7 +133,22 @@ impl From<&MutateParams> for Mutator { .unwrap_or_else(|_| panic!("Couldn't read source {}", filename)), )) } - Mutator::new(conf, sources, solc) + let mut mutator = Mutator::new(conf, sources, solc); + match &value.solc_base_path { + Some(base_path) => { + mutator + .file_resolver + .add_import_path(&PathBuf::from(base_path)) + .unwrap(); + } + None => { + mutator + .file_resolver + .add_import_path(&PathBuf::from(".")) + .unwrap(); + } + } + mutator } } @@ -136,6 +165,7 @@ impl Mutator { sources, mutants: vec![], current_source: None, + file_resolver: FileResolver::new(), _tmp: "".into(), } } @@ -160,9 +190,8 @@ impl Mutator { for source in sources.iter() { log::info!("Mutating source {}", source.filename().display()); - self.current_source = Some(source.clone()); - match self.mutate_file(source.clone()) { + match self.mutate_file(&source) { Ok(file_mutants) => { log::info!(" Generated {} mutants from source", file_mutants.len()); } @@ -171,8 +200,6 @@ impl Mutator { log::warn!("Encountered error: {}", e); } } - - self.current_source = None; } self.mutants.append(&mut mutants); @@ -180,11 +207,13 @@ impl Mutator { } /// Mutate a single file. - fn mutate_file(&mut self, source: Rc) -> Result, Box> { - let mut resolver = FileResolver::new(); - resolver.add_import_path(&PathBuf::from("."))?; - let target = solang::Target::EVM; - let ns = parse_and_resolve(&OsStr::new(source.filename()), &mut resolver, target); + fn mutate_file(&mut self, source: &Rc) -> Result, Box> { + self.current_source = Some(source.clone()); + let ns = parse_and_resolve( + &OsStr::new(source.filename()), + &mut self.file_resolver, + solang::Target::EVM, + ); // mutate functions for function in ns.functions.iter() { if function.has_body { From ee703f572455f771713e7b7c30ae59688503b943 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 5 Jun 2023 15:19:48 -0700 Subject: [PATCH 019/200] Removed hack from not-equals relational op after pointing to fixed solang version --- src/mutator.rs | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/src/mutator.rs b/src/mutator.rs index 1fa48fb6..06df9b00 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -310,28 +310,6 @@ pub fn mutate_statement(statement: &Statement, mutator: &mut Mutator) -> bool { } pub fn mutate_expression(expr: &Expression, mutator: &mut Mutator) -> bool { - match expr { - // Special case `Not{ Equal { left, right}}`: this is how `NotEqual` is - // represented after a parse, and if we special case mutation of this - // operator the `Equal {left, right}` node is visited again later, - // leading to too many mutants - Expression::Not { loc: _, expr } => { - if let Expression::Equal { loc, left, right } = expr.as_ref() { - Expression::NotEqual { - loc: *loc, - left: left.clone(), - right: right.clone(), - } - .recurse(mutator, mutate_expression); - false - } else { - mutator.apply_operators_to_expression(expr); - true - } - } - _ => { - mutator.apply_operators_to_expression(expr); - true - } - } + mutator.apply_operators_to_expression(expr); + true } From 549efc19c0ebf6ca368833e5f246af4858018dca Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 5 Jun 2023 15:19:57 -0700 Subject: [PATCH 020/200] config-jsons --- benchmarks/config-jsons/lor.json | 9 +++++++++ benchmarks/config-jsons/ror.json | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 benchmarks/config-jsons/lor.json create mode 100644 benchmarks/config-jsons/ror.json diff --git a/benchmarks/config-jsons/lor.json b/benchmarks/config-jsons/lor.json new file mode 100644 index 00000000..8a1d4e0d --- /dev/null +++ b/benchmarks/config-jsons/lor.json @@ -0,0 +1,9 @@ +[ + { + "filename": "../LOR/LOR.sol", + "sourceroot": "..", + "mutations": [ + "logical-operator-replacement" + ] + } +] \ No newline at end of file diff --git a/benchmarks/config-jsons/ror.json b/benchmarks/config-jsons/ror.json new file mode 100644 index 00000000..32d10a1b --- /dev/null +++ b/benchmarks/config-jsons/ror.json @@ -0,0 +1,9 @@ +[ + { + "filename": "../ROR/ROR.sol", + "sourceroot": "..", + "mutations": [ + "relational-operator-replacement" + ] + } +] \ No newline at end of file From 621554d36ef4acb7f5f1ecea9d04fec490c52d0d Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 5 Jun 2023 15:36:16 -0700 Subject: [PATCH 021/200] Added nicer mutation operator names --- src/mutator.rs | 6 +++--- src/util.rs | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/mutator.rs b/src/mutator.rs index 06df9b00..918605dc 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -1,6 +1,6 @@ use crate::{ - default_gambit_output_directory, mutation::MutationType, source::Source, Mutant, MutateParams, - Mutation, Solc, + default_gambit_output_directory, mutation::MutationType, normalize_mutation_operator_name, + source::Source, Mutant, MutateParams, Mutation, Solc, }; use clap::ValueEnum; use solang::{ @@ -36,7 +36,7 @@ impl From<&MutateParams> for MutatorConf { let mutation_operators = if let Some(ops) = &mutate_params.mutations { ops.iter() .map(|op| { - MutationType::from_str(op.as_str(), true) + MutationType::from_str(normalize_mutation_operator_name(op).as_str(), true) .unwrap_or_else(|_| panic!("Unrecognized mutation operator {op}")) }) .collect() diff --git a/src/util.rs b/src/util.rs index c65db935..65d61d71 100644 --- a/src/util.rs +++ b/src/util.rs @@ -347,3 +347,22 @@ pub fn normalize_path(path: &Path) -> PathBuf { } ret } + +pub fn normalize_mutation_operator_name(op_name: &String) -> String { + let tmp = op_name.to_lowercase(); + let tmp = tmp.replace("_", "-"); + let op_name_lower = tmp.as_str(); + match op_name_lower { + "aor" | "arithmetic-operator-replacement" => "logical-operator-replacement", + "bor" | "bitwise-operator-replacement" => "bitwise-operator-replacement", + "evr" | "expression-value-replacement" => "expression-value-replacement", + "lor" | "logical-operator-replacement" => "logical-operator-replacement", + "lvr" | "literal-value-replacement" => "literal-value-replacement", + "ror" | "relational-operator-replacement" => "relational-operator-replacement", + "sor" | "shift-operator-replacement" => "shift-operator-replacement", + "std" | "statement-deletion" => "statement-deletion", + "uor" | "unary-operator-replacement" => "unary-operator-replacement", + _ => op_name_lower, + } + .to_string() +} From 547c0ad293417fe639e27eab91a86d8a7a288d7f Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 6 Jun 2023 15:15:03 -0700 Subject: [PATCH 022/200] Many updates --- src/cli.rs | 9 ++ src/filter.rs | 31 +++-- src/lib.rs | 46 +++++-- src/mutant_writer.rs | 2 +- src/mutation.rs | 292 ++++++++++++++++--------------------------- src/mutator.rs | 37 +++++- 6 files changed, 206 insertions(+), 211 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 9f5d94e2..34ce8652 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -6,6 +6,7 @@ static DEFAULT_NO_OVERWRITE: bool = false; static DEFAULT_RANDOM_SEED: bool = false; static DEFAULT_SEED: u64 = 0; static DEFAULT_SKIP_VALIDATE: bool = false; +static DEFAULT_LOG_INVALID: bool = false; static DEFAULT_SOLC_OPTIMIZE: bool = false; static DEFAULT_SOLC: &str = "solc"; @@ -29,6 +30,10 @@ fn default_skip_validate() -> bool { DEFAULT_SKIP_VALIDATE } +fn default_log_invalid() -> bool { + DEFAULT_LOG_INVALID +} + fn default_solc_optimize() -> bool { DEFAULT_SOLC_OPTIMIZE } @@ -165,6 +170,10 @@ pub struct MutateParams { #[arg(long, default_value = "false")] #[serde(default = "default_skip_validate")] pub skip_validate: bool, + + #[arg(long, default_value = "false")] + #[serde(default = "default_log_invalid")] + pub log_invalid: bool, } #[derive(Debug, Deserialize, Serialize)] diff --git a/src/filter.rs b/src/filter.rs index 783c4683..e8fead35 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -10,12 +10,13 @@ use crate::{Mutant, MutantWriter, Mutator, Solc}; /// Implement this trait to filter mutants after they have been created. pub trait MutantFilter { /// Filter the mutants of a mutator, validating them via compilation if - /// `self.validate()` returns `true`. + /// `self.validate()` returns `true`. When successful, return an + /// Ok((valid-mutants, invalid-mutants)) fn filter_mutants( &self, mutator: &Mutator, num_mutants: usize, - ) -> Result, Box>; + ) -> Result<(Vec, Vec), Box>; fn validate(&self) -> bool; } @@ -46,13 +47,14 @@ impl MutantFilter for RandomDownSampleFilter { &self, mutator: &Mutator, num_mutants: usize, - ) -> Result, Box> { + ) -> Result<(Vec, Vec), Box> { // Make a copy that we can mutate - let mutants = mutator.mutants(); - let mut mutants: Vec<(usize, Mutant)> = mutants.iter().cloned().enumerate().collect(); + let mut mutants: Vec<(usize, Mutant)> = + mutator.mutants().iter().cloned().enumerate().collect(); // The sampled mutants. We want to sort by the original index into let mut sampled: Vec<(usize, Mutant)> = vec![]; + let mut invalid: Vec<(usize, Mutant)> = vec![]; let mut r = match self.seed { None => ChaCha8Rng::from_entropy(), @@ -66,6 +68,8 @@ impl MutantFilter for RandomDownSampleFilter { if self.validate() { if let Ok(true) = self.validator.validate_mutant(&mutant.1) { sampled.push(mutant) + } else { + invalid.push(mutant) } } else { sampled.push(mutant); @@ -74,7 +78,10 @@ impl MutantFilter for RandomDownSampleFilter { sampled.sort_by(|m1, m2| m1.0.partial_cmp(&m2.0).unwrap()); - Ok(sampled.iter().map(|m| m.1.clone()).collect()) + Ok(( + sampled.iter().map(|m| m.1.clone()).collect(), + invalid.iter().map(|m| m.1.clone()).collect(), + )) } fn validate(&self) -> bool { @@ -102,21 +109,25 @@ impl Validator { ); let dir = tempdir()?; MutantWriter::write_mutant_to_file(mutant_file_path, mutant)?; - let code = match self.solc.compile(mutant_file_path, dir.path()) { + let was_success = match self.solc.compile(mutant_file_path, dir.path()) { Ok((code, _, _)) => code == 0, Err(_) => false, }; - Ok(code) + Ok(was_success) } - pub fn get_valid_mutants(&self, mutants: &[Mutant]) -> Vec { + /// Return a tuple of (valid-mutants, invalid-mutants) + pub fn get_valid_mutants(&self, mutants: &[Mutant]) -> (Vec, Vec) { log::info!("Validating mutants..."); let mut valid_mutants = vec![]; + let mut invalid_mutants: Vec = vec![]; for m in mutants.iter() { if let Ok(true) = self.validate_mutant(m) { valid_mutants.push(m.clone()) + } else { + invalid_mutants.push(m.clone()) } } - valid_mutants + (valid_mutants, invalid_mutants) } } diff --git a/src/lib.rs b/src/lib.rs index 7c8914e1..3e705080 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,6 +7,7 @@ mod compile; pub use compile::*; mod filter; +use csv::Writer; pub use filter::*; mod mutation; @@ -134,7 +135,7 @@ pub fn run_mutate( let validator = Validator { solc: Solc::new(params.solc.clone(), outdir_path.clone()), }; - let mutants = if let Some(num_mutants) = params.num_mutants { + let (sampled, invalid) = if let Some(num_mutants) = params.num_mutants { log::info!("Filtering down to {} mutants", num_mutants); log::debug!(" seed: {:?}", params.seed); log::debug!(" validating?: {}", !params.skip_validate); @@ -144,28 +145,47 @@ pub fn run_mutate( Some(params.seed) }; let filter = RandomDownSampleFilter::new(seed, !params.skip_validate, validator); - let mutants = filter.filter_mutants(&mutator, num_mutants)?; - log::info!("Filtering resulted in {} mutants", mutants.len()); - mutants + let (sampled, invalid) = filter.filter_mutants(&mutator, num_mutants)?; + log::info!("Filtering resulted in {} mutants", sampled.len()); + (sampled, invalid) } else if params.skip_validate { log::info!("Skipping validation"); - mutants + (mutants, vec![]) } else { - let mutants = validator.get_valid_mutants(&mutants); - log::info!("Validation resulted in {} mutants", mutants.len()); - mutants + let (sampled, invalid) = validator.get_valid_mutants(&mutants); + log::info!("Validation resulted in {} mutants", sampled.len()); + (sampled, invalid) }; - total_num_mutants += mutants.len(); - log::info!("Adding {} mutants to global mutant pool", mutants.len()); - let mut mutants: Vec<(Mutant, bool)> = - mutants.iter().map(|m| (m.clone(), export)).collect(); + if params.log_invalid { + let invalid_log = &outdir_path.join("invalid.log"); + let mut w = Writer::from_path(invalid_log)?; + for (i, mutant) in invalid.iter().enumerate() { + let mid = i + 1; + let (lineno, colno) = mutant.get_line_column()?; + let line_col = format!("{}:{}", lineno, colno); + w.write_record([ + mid.to_string().as_str(), + mutant.op.short_name().as_str(), + mutant.source.relative_filename()?.to_str().unwrap(), + line_col.as_str(), + mutant.orig.as_str(), + mutant.repl.as_str(), + ])?; + } + } + + total_num_mutants += sampled.len(); + log::info!("Adding {} mutants to global mutant pool", sampled.len()); + + let mut sampled: Vec<(Mutant, bool)> = + sampled.iter().map(|m| (m.clone(), export)).collect(); if !mutants_by_out_dir.contains_key(outdir) { mutants_by_out_dir.insert(outdir.clone(), vec![]); } let ms: &mut Vec<(Mutant, bool)> = mutants_by_out_dir.get_mut(outdir).unwrap(); - ms.append(&mut mutants); + ms.append(&mut sampled); } } diff --git a/src/mutant_writer.rs b/src/mutant_writer.rs index 578613d0..502b3859 100644 --- a/src/mutant_writer.rs +++ b/src/mutant_writer.rs @@ -54,7 +54,7 @@ impl MutantWriter { let line_col = format!("{}:{}", lineno, colno); w.write_record([ mid.to_string().as_str(), - mutant.op.to_string().as_str(), + mutant.op.short_name().as_str(), mutant.source.relative_filename()?.to_str().unwrap(), line_col.as_str(), mutant.orig.as_str(), diff --git a/src/mutation.rs b/src/mutation.rs index 84bfb307..eecdd8a1 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -145,16 +145,7 @@ pub enum MutationType { StatementDeletion, // # Old Operators (Deprecated) - AssignmentMutation, - BinaryOpMutation, - DeleteExpressionMutation, ElimDelegateMutation, - FunctionCallMutation, - // IfStatementMutation, - RequireMutation, - SwapArgumentsFunctionMutation, - SwapArgumentsOperatorMutation, - UnaryOperatorMutation, } impl ToString for MutationType { @@ -170,16 +161,7 @@ impl ToString for MutationType { MutationType::ExpressionValueReplacement => "ExpressionOperatorReplacement", MutationType::StatementDeletion => "StatementDeletion", - MutationType::AssignmentMutation => "AssignmentMutation", - MutationType::BinaryOpMutation => "BinaryOpMutation", - MutationType::DeleteExpressionMutation => "DeleteExpressionMutation", MutationType::ElimDelegateMutation => "ElimDelegateMutation", - MutationType::FunctionCallMutation => "FunctionCallMutation", - // MutationType::IfStatementMutation => "IfStatementMutation", - MutationType::RequireMutation => "RequireMutation", - MutationType::SwapArgumentsFunctionMutation => "SwapArgumentsFunctionMutation", - MutationType::SwapArgumentsOperatorMutation => "SwapArgumentsOperatorMutation", - MutationType::UnaryOperatorMutation => "UnaryOperatorMutation", }; str.into() } @@ -189,16 +171,11 @@ impl Mutation for MutationType { fn mutate_statement(&self, stmt: &Statement, source: &Rc) -> Vec { let loc = stmt.loc(); if let None = loc.try_file_no() { + println!("No file"); return vec![]; } match self { - MutationType::StatementDeletion => vec![Mutant::new( - source.clone(), - self.clone(), - stmt.loc().start(), - stmt.loc().end() + 1, - "".to_string(), - )], + MutationType::StatementDeletion => statement_deletion(self, stmt, source), _ => vec![], } } @@ -214,18 +191,12 @@ impl Mutation for MutationType { // Other MutationType::LiteralValueReplacement => literal_value_replacement(self, expr, source), MutationType::UnaryOperatorReplacement => unary_op_replacement(self, expr, source), - MutationType::ExpressionValueReplacement => todo!(), + MutationType::ExpressionValueReplacement => { + expression_value_replacement(self, expr, source) + } // Old Operators - MutationType::AssignmentMutation => todo!(), - MutationType::BinaryOpMutation => todo!(), - MutationType::DeleteExpressionMutation => todo!(), - MutationType::ElimDelegateMutation => todo!(), - MutationType::FunctionCallMutation => todo!(), - MutationType::RequireMutation => todo!(), - MutationType::SwapArgumentsFunctionMutation => todo!(), - MutationType::SwapArgumentsOperatorMutation => todo!(), - MutationType::UnaryOperatorMutation => todo!(), + MutationType::ElimDelegateMutation => elim_delegate_mutation(self, expr, source), _ => vec![], } } @@ -234,18 +205,34 @@ impl Mutation for MutationType { impl MutationType { pub fn default_mutation_operators() -> Vec { vec![ - MutationType::AssignmentMutation, - MutationType::BinaryOpMutation, - MutationType::DeleteExpressionMutation, + MutationType::ArithmeticOperatorReplacement, + MutationType::BitwiseOperatorReplacement, + MutationType::ExpressionValueReplacement, MutationType::ElimDelegateMutation, - MutationType::FunctionCallMutation, - // MutationType::IfStatementMutation, - MutationType::RequireMutation, - // MutationType::SwapArgumentsFunctionMutation, - MutationType::SwapArgumentsOperatorMutation, - MutationType::UnaryOperatorMutation, + MutationType::LiteralValueReplacement, + MutationType::LogicalOperatorReplacement, + MutationType::RelationalOperatorReplacement, + MutationType::ShiftOperatorReplacement, + MutationType::StatementDeletion, + MutationType::UnaryOperatorReplacement, ] } + + pub fn short_name(&self) -> String { + match self { + MutationType::ArithmeticOperatorReplacement => "AOR", + MutationType::BitwiseOperatorReplacement => "BOR", + MutationType::ElimDelegateMutation => "EDM", + MutationType::ExpressionValueReplacement => "EVR", + MutationType::LiteralValueReplacement => "LOR", + MutationType::LogicalOperatorReplacement => "LOR", + MutationType::RelationalOperatorReplacement => "ROR", + MutationType::ShiftOperatorReplacement => "SOR", + MutationType::StatementDeletion => "STD", + MutationType::UnaryOperatorReplacement => "UOR", + } + .to_string() + } } /// Find the location of an operator. This is not explicitly represented in an @@ -277,7 +264,17 @@ fn get_op_loc(expr: &Expression, source: &Rc) -> Loc { let op = get_operator(expr); let substr = source.contents_between_offsets(start, end); let first_op_char = op.as_bytes().to_vec()[0]; - let op_offset_in_substr = substr.iter().position(|c| *c == first_op_char).unwrap(); + let op_offset_in_substr = substr.iter().position(|c| *c == first_op_char).expect( + format!( + "Error finding start/end to operator {:?} in substring {}\nExpression: {:?}\nFile: {}, Pos: {:?}", + op, + std::str::from_utf8(substr).unwrap_or("UNREADABLE STRING"), + expr, + left.loc().file_no(), + (start, end) + ) + .as_str(), + ); let op_start = start + (op_offset_in_substr as usize); let op_end = op_start + op.len(); left.loc().with_start(op_start).with_end(op_end) @@ -682,6 +679,68 @@ fn literal_value_replacement( mutants } +fn statement_deletion(op: &MutationType, stmt: &Statement, source: &Rc) -> Vec { + match stmt { + // Do not delete complex/nested statements + Statement::Block { .. } + | Statement::VariableDecl(..) + | Statement::If(..) + | Statement::While(..) + | Statement::For { .. } + | Statement::DoWhile(..) + | Statement::Assembly(..) + | Statement::TryCatch(..) => vec![], + + // Also, do not mutate underscore statement + Statement::Underscore(_) => vec![], + + Statement::Expression(loc, ..) + | Statement::Delete(loc, ..) + | Statement::Destructure(loc, ..) + | Statement::Continue(loc) + | Statement::Break(loc) + | Statement::Revert { loc, .. } + | Statement::Emit { loc, .. } => vec![Mutant::new( + source.clone(), + op.clone(), + loc.start(), + loc.end(), + "assert(true)".to_string(), + )], + + // Returns are special: we should perform some analysis to figure out if + // we can delete this without making an invalid program. For now we + // delete and hope for the best :) + Statement::Return(loc, _) => vec![Mutant::new( + source.clone(), + op.clone(), + loc.start(), + loc.end(), + "assert(true)".to_string(), + )], + } +} + +#[allow(dead_code)] +fn elim_delegate_mutation( + _op: &MutationType, + _expr: &Expression, + _source: &Rc, +) -> Vec { + // TODO: implement + vec![] +} + +#[allow(dead_code)] +fn expression_value_replacement( + _op: &MutationType, + _expr: &Expression, + _source: &Rc, +) -> Vec { + // TODO: implement + vec![] +} + /// This testing module defines and uses the testing infrastructure, allowing /// for varying degrees of testing flexibility. /// @@ -723,76 +782,6 @@ mod test { use std::{error, path::Path}; use tempfile::Builder; - #[test] - pub fn test_assignment_mutation() -> Result<(), Box> { - let ops = vec![AssignmentMutation]; - assert_exact_mutants_for_statements( - &vec!["uint256 x;", "x = 3;"], - &ops, - &vec!["(-1)", "0", "1"], - ); - assert_exact_mutants_for_statements(&vec!["int256 x;", "x = 1;"], &ops, &vec!["(-1)", "0"]); - assert_exact_mutants_for_statements(&vec!["int256 x;", "x = 0;"], &ops, &vec!["(-1)", "1"]); - // FIXME: The following three test cases are BROKEN!! Currently these - // all get mutated to [-1, 1, 0, false, true] because they are not - // 'number's. Validation would strip out the true/false. We would want - // constant propagation to strip out the 0 in `x = -0` - assert_num_mutants_for_statements( - &vec!["int256 x;", "x = -2;"], - &vec![AssignmentMutation], - 5, - ); - assert_num_mutants_for_statements( - &vec!["int256 x;", "x = -1;"], - &vec![AssignmentMutation], - 5, - ); - assert_num_mutants_for_statements( - &vec!["int256 x;", "x = -0;"], - &vec![AssignmentMutation], - 5, - ); - - assert_exact_mutants_for_statements(&vec!["bool b;", "b = true;"], &ops, &vec!["false"]); - assert_exact_mutants_for_statements(&vec!["bool b;", "b = false;"], &ops, &vec!["true"]); - - Ok(()) - } - - #[test] - pub fn test_binary_op_mutation() -> Result<(), Box> { - let ops = vec![BinaryOpMutation]; - let repls = vec!["+", "-", "*", "/", "%", "**"]; - // Closure to drop the given operator for he set of replacements - let without = |s: &str| { - let r: Vec<&str> = repls - .iter() - .filter(|r| !s.eq(**r)) - .map(|s| s.clone()) - .collect(); - r - }; - assert_exact_mutants_for_statements(&vec!["uint256 x = 1 + 2;"], &ops, &without("+")); - assert_exact_mutants_for_statements(&vec!["uint256 x = 2 - 1;"], &ops, &without("-")); - assert_exact_mutants_for_statements(&vec!["uint256 x = 1 * 2;"], &ops, &without("*")); - assert_exact_mutants_for_statements(&vec!["uint256 x = 2 / 1;"], &ops, &without("/")); - assert_exact_mutants_for_statements(&vec!["uint256 x = 1 % 2;"], &ops, &without("%")); - assert_exact_mutants_for_statements(&vec!["uint256 x = 1 ** 2;"], &ops, &without("**")); - Ok(()) - } - - #[test] - pub fn test_delete_expression_mutation() -> Result<(), Box> { - let ops = vec![DeleteExpressionMutation]; - assert_exact_mutants_for_statements(&vec!["gasleft();"], &ops, &vec!["/* gasleft() */"]); - assert_exact_mutants_for_statements( - &vec!["uint256 x = 0;", "x = 3;"], - &ops, - &vec!["/* x = 3 */"], - ); - Ok(()) - } - #[test] pub fn test_elim_delegate_mutation() -> Result<(), Box> { let _ops = vec![ElimDelegateMutation]; @@ -836,13 +825,6 @@ contract A { Ok(()) } - #[test] - pub fn test_function_call_mutation() -> Result<(), Box> { - let _ops = vec![FunctionCallMutation]; - // TODO: how should I test this? - Ok(()) - } - // #[test] // pub fn test_if_statement_mutation() -> Result<(), Box> { // let ops = vec![IfStatementMutation]; @@ -855,70 +837,7 @@ contract A { // Ok(()) // } - #[test] - pub fn test_require_mutation() -> Result<(), Box> { - let ops = vec![RequireMutation]; - assert_num_mutants_for_statements(&vec!["bool c = true;", "require(c);"], &ops, 2); - assert_num_mutants_for_statements(&vec!["require(true);"], &ops, 1); - assert_num_mutants_for_statements( - &vec!["bool a = true;", "bool b = false;", "require(a && b);"], - &ops, - 2, - ); - Ok(()) - } - - #[test] - pub fn test_unary_op_mutation() -> Result<(), Box> { - let ops = vec![UnaryOperatorMutation]; - let prefix = vec!["++", "--", "~"]; - let suffix = vec!["++", "--"]; - - // Closure to drop the given operator for he set of replacements - let without_prefix = |s: &str| { - let r: Vec<&str> = prefix - .iter() - .filter(|r| !s.eq(**r)) - .map(|s| s.clone()) - .collect(); - r - }; - let without_suffix = |s: &str| { - let r: Vec<&str> = suffix - .iter() - .filter(|r| !s.eq(**r)) - .map(|s| s.clone()) - .collect(); - r - }; - assert_exact_mutants_for_statements( - &vec!["uint256 a = 10;", "uint256 x = ++a;"], - &ops, - &without_prefix("++"), - ); - assert_exact_mutants_for_statements( - &vec!["uint256 a = 10;", "uint256 x = --a;"], - &ops, - &without_prefix("--"), - ); - assert_exact_mutants_for_statements( - &vec!["uint256 a = 10;", "uint256 x = ~a;"], - &ops, - &without_prefix("~"), - ); - assert_exact_mutants_for_statements( - &vec!["uint256 a = 10;", "uint256 x = a--;"], - &ops, - &without_suffix("--"), - ); - assert_exact_mutants_for_statements( - &vec!["uint256 a = 10;", "uint256 x = a++;"], - &ops, - &without_suffix("++"), - ); - Ok(()) - } - + #[allow(dead_code)] fn assert_num_mutants_for_statements( statements: &Vec<&str>, ops: &Vec, @@ -939,6 +858,7 @@ contract A { ); } + #[allow(dead_code)] fn assert_exact_mutants_for_statements( statements: &Vec<&str>, ops: &Vec, diff --git a/src/mutator.rs b/src/mutator.rs index 918605dc..11a300f4 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -11,7 +11,12 @@ use solang::{ Recurse, }, }; -use std::{error, ffi::OsStr, path::PathBuf, rc::Rc}; +use std::{ + error, + ffi::{OsStr, OsString}, + path::PathBuf, + rc::Rc, +}; /// This module is responsible for high level logic of running mutation over /// Solidity programs. @@ -133,7 +138,10 @@ impl From<&MutateParams> for Mutator { .unwrap_or_else(|_| panic!("Couldn't read source {}", filename)), )) } + let mut mutator = Mutator::new(conf, sources, solc); + + // Add base path to file resolver match &value.solc_base_path { Some(base_path) => { mutator @@ -148,6 +156,20 @@ impl From<&MutateParams> for Mutator { .unwrap(); } } + + // Add any remappings to file resolver + if let Some(remappings) = &value.solc_remappings { + for rm in remappings { + let split_rm: Vec<&str> = rm.split("=").collect(); + if split_rm.len() != 2 { + panic!("Invalid remapping: {}", rm); + } + mutator + .file_resolver + .add_import_map(OsString::from(split_rm[0]), PathBuf::from(split_rm[1])) + .unwrap(); + } + } mutator } } @@ -214,8 +236,21 @@ impl Mutator { &mut self.file_resolver, solang::Target::EVM, ); + println!("All files: {:?}", ns.files); // mutate functions for function in ns.functions.iter() { + let file = ns.files.get(function.loc.file_no()); + match file { + Some(file) => { + if file.file_name() != source.filename().to_str().unwrap().to_string() { + continue; + } + } + None => { + continue; + } + } + println!("Mutating function {}", function.name); if function.has_body { for statement in function.body.iter() { statement.recurse(self, mutate_statement); From c44e9943af507751a21313ae871f6d06bfee8b0e Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 6 Jun 2023 15:27:20 -0700 Subject: [PATCH 023/200] Do not delete destructure statements --- src/mutation.rs | 2 +- src/mutator.rs | 1 - src/util.rs | 24 ++++++++++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/mutation.rs b/src/mutation.rs index eecdd8a1..0ffd1c0b 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -683,6 +683,7 @@ fn statement_deletion(op: &MutationType, stmt: &Statement, source: &Rc) match stmt { // Do not delete complex/nested statements Statement::Block { .. } + | Statement::Destructure(..) | Statement::VariableDecl(..) | Statement::If(..) | Statement::While(..) @@ -696,7 +697,6 @@ fn statement_deletion(op: &MutationType, stmt: &Statement, source: &Rc) Statement::Expression(loc, ..) | Statement::Delete(loc, ..) - | Statement::Destructure(loc, ..) | Statement::Continue(loc) | Statement::Break(loc) | Statement::Revert { loc, .. } diff --git a/src/mutator.rs b/src/mutator.rs index 11a300f4..57be7333 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -236,7 +236,6 @@ impl Mutator { &mut self.file_resolver, solang::Target::EVM, ); - println!("All files: {:?}", ns.files); // mutate functions for function in ns.functions.iter() { let file = ns.files.get(function.loc.file_no()); diff --git a/src/util.rs b/src/util.rs index 65d61d71..7b766139 100644 --- a/src/util.rs +++ b/src/util.rs @@ -6,6 +6,7 @@ use std::{ }; use ansi_term::{ANSIGenericString, Color, Style}; +use solang::sema::ast::Statement; static EQUAL: &str = "="; pub static DEFAULT_GAMBIT_OUTPUT_DIRECTORY: &str = "gambit_out"; @@ -366,3 +367,26 @@ pub fn normalize_mutation_operator_name(op_name: &String) -> String { } .to_string() } + +/// Return a simple string representation of the type of statement +pub fn statement_type(stmt: &Statement) -> &str { + match stmt { + Statement::Block { .. } => "Block", + Statement::VariableDecl(..) => "VariableDecl", + Statement::If(..) => "If", + Statement::While(..) => "While", + Statement::For { .. } => "For", + Statement::DoWhile(..) => "DoWhile", + Statement::Expression(..) => "Expression", + Statement::Delete(..) => "Delete", + Statement::Destructure(..) => "Destructure", + Statement::Continue(..) => "Continue", + Statement::Break(_) => "Break", + Statement::Return(_, _) => "Return", + Statement::Revert { .. } => "Revert", + Statement::Emit { .. } => "Emit", + Statement::TryCatch(_, _, _) => "TryCatch", + Statement::Underscore(_) => "Underscore", + Statement::Assembly(_, _) => "Assembly", + } +} From 4119747e0b0e93f393a4d048e1ed7c5840278800 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 28 Jun 2023 14:06:01 -0700 Subject: [PATCH 024/200] Logging --- src/lib.rs | 13 +++++++++++-- src/mutator.rs | 1 - 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 3e705080..206271fa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -146,14 +146,23 @@ pub fn run_mutate( }; let filter = RandomDownSampleFilter::new(seed, !params.skip_validate, validator); let (sampled, invalid) = filter.filter_mutants(&mutator, num_mutants)?; - log::info!("Filtering resulted in {} mutants", sampled.len()); + if !params.skip_validate { + log::info!( + "Filtering and Validation resulted in {} valid mutants", + sampled.len() + ); + log::info!(" and {} invalid mutants", invalid.len()); + } else { + log::info!("Filtering resulted in {} mutants", sampled.len()); + } (sampled, invalid) } else if params.skip_validate { log::info!("Skipping validation"); (mutants, vec![]) } else { let (sampled, invalid) = validator.get_valid_mutants(&mutants); - log::info!("Validation resulted in {} mutants", sampled.len()); + log::info!("Validation resulted in {} valid mutants", sampled.len()); + log::info!(" and {} invalid mutants", invalid.len()); (sampled, invalid) }; diff --git a/src/mutator.rs b/src/mutator.rs index 57be7333..379d5483 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -249,7 +249,6 @@ impl Mutator { continue; } } - println!("Mutating function {}", function.name); if function.has_body { for statement in function.body.iter() { statement.recurse(self, mutate_statement); From f716f6faba9cd2432f2e29e04c1defb9059788d5 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 28 Jun 2023 14:09:23 -0700 Subject: [PATCH 025/200] Updated solang version --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2a41c1d5..3880f7dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ authors = [ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -solang = { git = "https://github.com/hyperledger/solang.git", rev = "15f20d8ed49f6a26b51c9783caec1cbddbd9167c", default-features = false } +solang = { git = "https://github.com/hyperledger/solang.git", rev = "d48fcf663d3e62f43297f9e708eabe18bd8bb08a", default-features = false } ansi_term = "0.12" clap = { version = "4.0.29", features = ["derive"] } clap_complete = "4.0.6" @@ -30,7 +30,7 @@ scanner-rust = "2.0.16" serde = { version = "1", features = ["derive"] } serde_json = "1" similar = "2" -solang-parser = { git = "https://github.com/hyperledger/solang.git", rev = "15f20d8ed49f6a26b51c9783caec1cbddbd9167c" } +solang-parser = { git = "https://github.com/hyperledger/solang.git", rev = "d48fcf663d3e62f43297f9e708eabe18bd8bb08a" } strum = "0.24.1" strum_macros = "0.24.3" tempfile = "3" From e91b74b5ebad53e05cf405bc232eaf5ff1d92ffa Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 29 Jun 2023 11:16:09 -0700 Subject: [PATCH 026/200] Updated solang version (again) --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3880f7dd..1ccaff92 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ authors = [ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -solang = { git = "https://github.com/hyperledger/solang.git", rev = "d48fcf663d3e62f43297f9e708eabe18bd8bb08a", default-features = false } +solang = { git = "https://github.com/hyperledger/solang.git", rev = "940ca3ce682091c1c8f25803705483e75f900ae0", default-features = false } ansi_term = "0.12" clap = { version = "4.0.29", features = ["derive"] } clap_complete = "4.0.6" @@ -30,7 +30,7 @@ scanner-rust = "2.0.16" serde = { version = "1", features = ["derive"] } serde_json = "1" similar = "2" -solang-parser = { git = "https://github.com/hyperledger/solang.git", rev = "d48fcf663d3e62f43297f9e708eabe18bd8bb08a" } +solang-parser = { git = "https://github.com/hyperledger/solang.git", rev = "940ca3ce682091c1c8f25803705483e75f900ae0" } strum = "0.24.1" strum_macros = "0.24.3" tempfile = "3" From 3e5085fed91a43425509fdaaebfdd0959c81cd6f Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 30 Jun 2023 13:37:29 -0700 Subject: [PATCH 027/200] Temp commit: got things to build again after lots of refactors --- src/filter.rs | 2 +- src/lib.rs | 19 +- src/mutant_writer.rs | 29 +- src/mutation.rs | 648 ++++++++++++++++++++++++++++--------------- src/mutator.rs | 128 +++++---- src/source.rs | 125 --------- 6 files changed, 512 insertions(+), 439 deletions(-) delete mode 100644 src/source.rs diff --git a/src/filter.rs b/src/filter.rs index e8fead35..8e60dba2 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -98,7 +98,7 @@ impl Validator { /// validate a mutant by writing it to disk and compiling it. If compilation /// fails then this is an invalid mutant. pub fn validate_mutant(&self, mutant: &Mutant) -> Result> { - let source_filename = mutant.source.filename(); + let source_filename = mutant.path(); let source_parent_dir = source_filename.parent().unwrap(); let mutant_file = NamedTempFile::new_in(source_parent_dir)?; let mutant_file_path = mutant_file.path(); diff --git a/src/lib.rs b/src/lib.rs index 206271fa..a1ac1cd3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,10 +19,8 @@ pub use mutant_writer::*; mod mutator; pub use mutator::*; -mod source; -pub use source::*; - mod summary; +use solang_parser::pt::Loc; pub use summary::*; mod test_util; @@ -117,7 +115,7 @@ pub fn run_mutate( log::info!("Creating mutator"); let mut mutator = Mutator::from(params); log::info!("Generating mutants"); - let sources = mutator.sources().clone(); + let sources = mutator.filenames().clone(); let mutants = mutator.mutate(sources)?.clone(); log::info!( "(pre filter/validate) Generated {} mutants for {}", @@ -170,13 +168,20 @@ pub fn run_mutate( let invalid_log = &outdir_path.join("invalid.log"); let mut w = Writer::from_path(invalid_log)?; for (i, mutant) in invalid.iter().enumerate() { + let mutant_loc = &mutant.mutant_loc; + let file_no = match mutant_loc.loc { + Loc::File(file_no, _, _) => file_no, + _ => panic!(), + }; + let ns = &mutator.namespace.clone().unwrap(); + let file = ns.files.get(file_no).unwrap(); + let (line_no, col_no) = mutant.get_line_column(); let mid = i + 1; - let (lineno, colno) = mutant.get_line_column()?; - let line_col = format!("{}:{}", lineno, colno); + let line_col = format!("{}:{}", line_no, col_no); w.write_record([ mid.to_string().as_str(), mutant.op.short_name().as_str(), - mutant.source.relative_filename()?.to_str().unwrap(), + file.path.to_str().unwrap(), line_col.as_str(), mutant.orig.as_str(), mutant.repl.as_str(), diff --git a/src/mutant_writer.rs b/src/mutant_writer.rs index 502b3859..5cf2339c 100644 --- a/src/mutant_writer.rs +++ b/src/mutant_writer.rs @@ -50,12 +50,12 @@ impl MutantWriter { for (i, (mutant, _)) in mutants.iter().enumerate() { let mid = i + 1; - let (lineno, colno) = mutant.get_line_column()?; + let (lineno, colno) = mutant.get_line_column(); let line_col = format!("{}:{}", lineno, colno); w.write_record([ mid.to_string().as_str(), mutant.op.short_name().as_str(), - mutant.source.relative_filename()?.to_str().unwrap(), + mutant.path().to_str().unwrap(), line_col.as_str(), mutant.orig.as_str(), mutant.repl.as_str(), @@ -75,14 +75,14 @@ impl MutantWriter { let mut json: Vec = Vec::new(); for (i, ((mutant, _), diff)) in mutants.iter().zip(diffs).enumerate() { let mid = i + 1; - let sourceroot = mutant.source.sourceroot().to_str().unwrap().to_string(); + let sourceroot = ""; // mutant.source.sourceroot().to_str().unwrap().to_string(); json.push(serde_json::json!({ "name": Self::get_mutant_filename(&PathBuf::from("mutants"), mid, mutant), "description": mutant.op.to_string(), "id": mid.to_string(), "diff": diff, "sourceroot": sourceroot, - "original": mutant.source.relative_filename()?, + "original": mutant.path(), })); } @@ -110,8 +110,8 @@ impl MutantWriter { mutants_dir: &Path, mutant: &Mutant, ) -> Result> { - let filename = mutants_dir.join(mutant.source.filename().file_name().unwrap()); - let mutant_contents = mutant.as_source_string()?; + let filename = mutants_dir.join(mutant.path().to_str().unwrap()); + let mutant_contents = mutant.mutant_source()?; log::debug!("Writing mutant {:?} to {}", mutant, &filename.display()); @@ -131,7 +131,7 @@ impl MutantWriter { filename: &Path, mutant: &Mutant, ) -> Result<(), Box> { - let mutant_contents = mutant.as_source_string()?; + let mutant_contents = mutant.mutant_source()?; log::debug!("Writing mutant {:?} to {}", mutant, &filename.display()); @@ -160,7 +160,7 @@ impl MutantWriter { mutant: &Mutant, ) -> Result> { let filename = Self::get_mutant_filename(mutants_dir, mid, mutant); - let mutant_contents = mutant.as_source_string()?; + let mutant_contents = mutant.mutant_source()?; log::debug!( "Writing mutant (mid={}) {:?} to {}", @@ -180,13 +180,8 @@ impl MutantWriter { /// This is computed from the relative path of the original sourcefile, relative to /// the specified `sourceroot`, and is computed with `Source.relative_filename()` fn get_mutant_filename(mutants_dir: &Path, mid: usize, mutant: &Mutant) -> PathBuf { - let rel_filename = match mutant.source.relative_filename() { - Ok(rel_fn) => rel_fn, - Err(e) => panic!( - "Error getting relative filename from {:?}\n\nError:{:?}", - &mutant.source, e - ), - }; + // TODO: Make this a relative file name + let rel_filename = mutant.path(); mutants_dir .join(Path::new(&mid.to_string())) .join(rel_filename) @@ -194,8 +189,8 @@ impl MutantWriter { /// Get the diff of the mutant and the original file fn diff_mutant(mutant: &Mutant) -> Result> { - let orig_contents: String = String::from_utf8_lossy(mutant.source.contents()).into(); - let mutant_contents = mutant.as_source_string().unwrap(); + let orig_contents = mutant.original_source().to_string(); + let mutant_contents = mutant.mutant_source().unwrap(); let diff = TextDiff::from_lines(&orig_contents, &mutant_contents) .unified_diff() diff --git a/src/mutation.rs b/src/mutation.rs index 0ffd1c0b..e066d740 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -1,31 +1,71 @@ -use crate::{get_indent, Source}; +use crate::{get_indent, Mutator}; use clap::ValueEnum; use num_bigint::BigInt; use num_traits::{One, Zero}; use serde::{Deserialize, Serialize}; -use solang::sema::ast::{Expression, RetrieveType, Statement, Type}; +use solang::{ + file_resolver::FileResolver, + sema::ast::{Expression, Namespace, RetrieveType, Statement, Type}, +}; use solang_parser::pt::{CodeLocation, Loc}; -use std::{error, fmt::Display, rc::Rc}; +use std::{ + error, + fmt::{Debug, Display}, + path::PathBuf, + rc::Rc, + sync::Arc, +}; + +/// MutantLoc describes all location-based data of a mutant, including which +/// file the mutant mutates, the original solang Loc, and the line and column +/// numbers +#[derive(Clone)] +pub struct MutantLoc { + pub loc: Loc, + pub line_no: usize, + pub col_no: usize, + pub path: PathBuf, +} + +impl Debug for MutantLoc { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("MutantLoc") + .field("path", &self.path.display()) + .field("loc", &self.loc) + .field("line_no", &self.line_no) + .field("col_no", &self.col_no) + .finish() + } +} + +impl MutantLoc { + pub fn new(loc: Loc, resolver: &FileResolver, namespace: Rc) -> MutantLoc { + let file = namespace.files.get(loc.file_no()).unwrap(); + let (_, line_no, col_no, _) = resolver.get_line_and_offset_from_loc(file, &loc); + let path = file.path.clone(); + MutantLoc { + loc, + line_no, + col_no, + path, + } + } +} /// This struct describes a mutant. -#[derive(Debug, Clone)] +#[derive(Clone)] pub struct Mutant { - /// The original program's source - pub source: Rc, + /// The location of the mutant (including file number, start, and end) + pub mutant_loc: MutantLoc, /// The mutation operator that was applied to generate this mutant pub op: MutationType, - /// The string representation of the original node - pub orig: String, - - /// The index into the program source marking the beginning (inclusive) of - /// the source to be replaced - pub start: usize, + /// Original file's source + pub source: Arc, - /// The index into the program source marking the end (inclusive) of the - /// source to be replaced - pub end: usize, + /// Original text to be replaced + pub orig: String, /// The string replacement pub repl: String, @@ -33,53 +73,77 @@ pub struct Mutant { impl Mutant { pub fn new( - source: Rc, + resolver: &FileResolver, + namespace: Rc, + loc: Loc, op: MutationType, - start: usize, - end: usize, + orig: String, repl: String, ) -> Mutant { - let orig = String::from_utf8(source.contents()[start..end].to_vec()).unwrap(); - Mutant { - source, - op, - orig, - start, - end, - repl, + if let Loc::File(file_no, _, _) = loc { + let source = resolver.get_contents_of_file_no(file_no).unwrap(); + let mutant_loc = MutantLoc::new(loc, resolver, namespace); + Mutant { + mutant_loc, + op, + source, + orig, + repl, + } + } else { + panic!("Location must be Loc::File(...), but found {:?}", loc) } } + pub fn loc(&self) -> &Loc { + &self.mutant_loc.loc + } + + pub fn path(&self) -> &PathBuf { + &self.mutant_loc.path + } + + pub fn get_line_column(&self) -> (usize, usize) { + let mloc = &self.mutant_loc; + (mloc.line_no, mloc.col_no) + } + /// Render this mutant as String with the full source file contents /// /// TODO: Cache these contents: this data might be needed multiple times, /// and if so this should be cached as it currently involves file IO (though /// Source::contents() should also be cached) - pub fn as_source_string(&self) -> Result> { - let contents = self.source.contents(); - let prelude = &contents[0..self.start]; - let postlude = &contents[self.end..contents.len()]; + pub fn mutant_source(&self) -> Result> { + let loc = self.loc(); + let start = loc.start(); + let end = loc.end(); + + let contents: Arc = self.source.clone(); + let orig = &contents[start..end]; + + let prelude = &contents[0..start]; + let postlude = &contents[end..contents.len()]; + + let (line_no, _) = self.get_line_column(); - let res = [prelude, self.repl.as_bytes(), postlude].concat(); - let mut_string = String::from_utf8(res)?; + let res = [prelude, self.repl.as_str(), postlude].concat(); + let mut_string = res; let mut lines = mut_string.lines(); - let (line, _) = self.source.get_line_column(self.start)?; let mut lines2 = vec![]; - for _ in 1..line { + for _ in 1..line_no { lines2.push(lines.next().unwrap()); } let mut_line = lines.next().unwrap(); - let orig_string = String::from_utf8(contents.to_vec())?; - let orig_line = orig_string.lines().nth(line - 1).unwrap(); + let orig_line = contents.lines().nth(line_no - 1).unwrap(); let indent = get_indent(mut_line); let comment = format!( "{}/// {}(`{}` |==> `{}`) of: `{}`", indent, self.op.to_string(), - self.orig.trim(), + orig.trim(), self.repl, orig_line.trim() ); @@ -91,39 +155,46 @@ impl Mutant { } // XXX: this is a hack to avoid trailing newline diffs - if contents.last().unwrap() == &b'\n' { + if contents.chars().last().unwrap() == '\n' { lines2.push(""); } Ok(lines2.join("\n")) } - pub fn get_line_column(&self) -> Result<(usize, usize), Box> { - self.source.get_line_column(self.start) + pub fn original_source(&self) -> Arc { + self.source.clone() } } impl Display for Mutant { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let contents = self.source.contents(); - let (start, end) = (self.start, self.end); - let orig = &contents[start..end]; - let repl = &self.repl; write!( f, "{}: {} |==> {}", self.op.to_string(), - String::from_utf8_lossy(orig), - repl + &self.orig, + &self.repl ) } } +impl Debug for Mutant { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("Mutant") + .field("op", &self.op) + .field("orig", &self.orig) + .field("repl", &self.repl) + .field("mutant_loc", &self.mutant_loc) + .finish() + } +} + /// Every kind of mutation implements this trait. A mutation can check if it /// applies to an AST node, and can mutate an AST node. pub trait Mutation { - fn mutate_statement(&self, _stmt: &Statement, source: &Rc) -> Vec; + fn mutate_statement(&self, mutator: &Mutator, stmt: &Statement) -> Vec; - fn mutate_expression(&self, _expr: &Expression, source: &Rc) -> Vec; + fn mutate_expression(&self, mutator: &Mutator, expr: &Expression) -> Vec; } /// Kinds of mutations. @@ -168,35 +239,69 @@ impl ToString for MutationType { } impl Mutation for MutationType { - fn mutate_statement(&self, stmt: &Statement, source: &Rc) -> Vec { + fn mutate_statement(&self, mutator: &Mutator, stmt: &Statement) -> Vec { + let file_no = stmt.loc().file_no(); + let resolver = &mutator.file_resolver; + let ns = mutator + .namespace + .as_ref() + .expect("Cannot mutate an expression without a set namespace") + .clone(); + let contents = resolver.get_contents_of_file_no(file_no).unwrap(); let loc = stmt.loc(); if let None = loc.try_file_no() { println!("No file"); return vec![]; } match self { - MutationType::StatementDeletion => statement_deletion(self, stmt, source), + MutationType::StatementDeletion => { + statement_deletion(self, resolver, ns, stmt, &contents) + } _ => vec![], } } - fn mutate_expression(&self, expr: &Expression, source: &Rc) -> Vec { + fn mutate_expression(&self, mutator: &Mutator, expr: &Expression) -> Vec { + let file_no = expr.loc().file_no(); + let resolver = &mutator.file_resolver; + let contents = &resolver.get_contents_of_file_no(file_no).unwrap(); + let ns = mutator + .namespace + .as_ref() + .expect("Cannot mutate an expression without a set namespace") + .clone(); match self { // Binary Operators - MutationType::ArithmeticOperatorReplacement => arith_op_replacement(self, expr, source), - MutationType::ShiftOperatorReplacement => shift_op_replacement(self, expr, source), - MutationType::BitwiseOperatorReplacement => bitwise_op_replacement(self, expr, source), - MutationType::RelationalOperatorReplacement => rel_op_replacement(self, expr, source), - MutationType::LogicalOperatorReplacement => logical_op_replacement(self, expr, source), + MutationType::ArithmeticOperatorReplacement => { + arith_op_replacement(self, resolver, ns, expr, contents) + } + MutationType::ShiftOperatorReplacement => { + shift_op_replacement(self, resolver, ns, expr, contents) + } + MutationType::BitwiseOperatorReplacement => { + bitwise_op_replacement(self, resolver, ns, expr, contents) + } + MutationType::RelationalOperatorReplacement => { + rel_op_replacement(self, resolver, ns, expr, contents) + } + MutationType::LogicalOperatorReplacement => { + logical_op_replacement(self, resolver, ns, expr, contents) + } // Other - MutationType::LiteralValueReplacement => literal_value_replacement(self, expr, source), - MutationType::UnaryOperatorReplacement => unary_op_replacement(self, expr, source), + MutationType::LiteralValueReplacement => { + literal_value_replacement(self, resolver, ns, expr, contents) + } + MutationType::UnaryOperatorReplacement => { + unary_op_replacement(self, resolver, ns, expr, contents) + } MutationType::ExpressionValueReplacement => { - expression_value_replacement(self, expr, source) + expression_value_replacement(self, resolver, ns, expr, contents) } // Old Operators - MutationType::ElimDelegateMutation => elim_delegate_mutation(self, expr, source), + MutationType::ElimDelegateMutation => { + elim_delegate_mutation(self, resolver, ns, expr, contents) + } _ => vec![], } } @@ -237,7 +342,7 @@ impl MutationType { /// Find the location of an operator. This is not explicitly represented in an /// AST node, so we have to do some digging. -fn get_op_loc(expr: &Expression, source: &Rc) -> Loc { +fn get_op_loc(expr: &Expression, source: &Arc) -> Loc { match expr { // Regular Binary operator Expression::Add { left, right, .. } @@ -262,13 +367,13 @@ fn get_op_loc(expr: &Expression, source: &Rc) -> Loc { let start = left.loc().end(); let end = right.loc().start(); let op = get_operator(expr); - let substr = source.contents_between_offsets(start, end); - let first_op_char = op.as_bytes().to_vec()[0]; - let op_offset_in_substr = substr.iter().position(|c| *c == first_op_char).expect( + let substr = &source[start..end]; + let first_op_char = op.chars().next().unwrap(); + let op_offset_in_substr = substr.chars().position(|c| c == first_op_char).expect( format!( "Error finding start/end to operator {:?} in substring {}\nExpression: {:?}\nFile: {}, Pos: {:?}", op, - std::str::from_utf8(substr).unwrap_or("UNREADABLE STRING"), + substr, expr, left.loc().file_no(), (start, end) @@ -285,9 +390,9 @@ fn get_op_loc(expr: &Expression, source: &Rc) -> Loc { let start = base.loc().end(); let end = exp.loc().start(); let op = get_operator(expr); - let substr = source.contents_between_offsets(start, end); - let first_op_char = op.as_bytes().to_vec()[0]; - let op_offset_in_substr = substr.iter().position(|c| *c == first_op_char).unwrap(); + let substr = &source[start..end]; + let first_op_char = op.chars().next().unwrap(); + let op_offset_in_substr = substr.chars().position(|c| c == first_op_char).unwrap(); let op_start = start + (op_offset_in_substr as usize); let op_end = op_start + op.len(); base.loc().with_start(op_start).with_end(op_end) @@ -312,9 +417,9 @@ fn get_op_loc(expr: &Expression, source: &Rc) -> Loc { let start = cond.loc().end(); let end = true_option.loc().start(); let op = get_operator(expr); - let substr = source.contents_between_offsets(start, end); - let first_op_char = op.as_bytes().to_vec()[0]; - let op_offset_in_substr = substr.iter().position(|c| *c == first_op_char).unwrap(); + let substr = &source[start..end]; + let first_op_char = op.chars().next().unwrap(); + let op_offset_in_substr = substr.chars().position(|c| c == first_op_char).unwrap(); let op_start = start + (op_offset_in_substr as usize); let op_end = op_start + op.len(); cond.loc().with_start(op_start).with_end(op_end) @@ -358,7 +463,13 @@ fn get_operator(expr: &Expression) -> &str { } } -fn arith_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) -> Vec { +fn arith_op_replacement( + op: &MutationType, + file_resolver: &FileResolver, + namespace: Rc, + expr: &Expression, + contents: &Arc, +) -> Vec { let loc = expr.loc(); let arith_op = get_operator(expr); let rs = vec!["+", "-", "*", "/", "**", "%"]; @@ -389,19 +500,35 @@ fn arith_op_replacement(op: &MutationType, expr: &Expression, source: &Rc { - let op_loc = get_op_loc(expr, source); - let (start, end) = (op_loc.start(), op_loc.end()); + let op_loc = get_op_loc(expr, contents); replacements .iter() - .map(|r| Mutant::new(source.clone(), op.clone(), start, end, format!(" {} ", r))) + .map(|r| { + Mutant::new( + file_resolver, + namespace.clone(), + op_loc, + op.clone(), + arith_op.to_string(), + format!(" {} ", r), + ) + }) .collect() } _ => vec![], @@ -410,8 +537,10 @@ fn arith_op_replacement(op: &MutationType, expr: &Expression, source: &Rc, expr: &Expression, - source: &Rc, + source: &Arc, ) -> Vec { let loc = expr.loc(); if let None = loc.try_file_no() { @@ -420,34 +549,34 @@ fn bitwise_op_replacement( match expr { Expression::BitwiseOr { .. } => { let op_loc = get_op_loc(expr, source); - let (start, end) = (op_loc.start(), op_loc.end()); vec![Mutant::new( - source.clone(), + file_resolver, + namespace, + op_loc, op.clone(), - start, - end, + "|".to_string(), "&".to_string(), )] } Expression::BitwiseAnd { .. } => { let op_loc = get_op_loc(expr, source); - let (start, end) = (op_loc.start(), op_loc.end()); vec![Mutant::new( - source.clone(), + file_resolver, + namespace, + op_loc, op.clone(), - start, - end, + "&".to_string(), "|".to_string(), )] } Expression::BitwiseXor { .. } => { let op_loc = get_op_loc(expr, source); - let (start, end) = (op_loc.start(), op_loc.end()); vec![Mutant::new( - source.clone(), + file_resolver, + namespace, + op_loc, op.clone(), - start, - end, + "^".to_string(), "&".to_string(), )] } @@ -455,7 +584,13 @@ fn bitwise_op_replacement( } } -fn shift_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) -> Vec { +fn shift_op_replacement( + op: &MutationType, + file_resolver: &FileResolver, + namespace: Rc, + expr: &Expression, + source: &Arc, +) -> Vec { let loc = expr.loc(); if let None = loc.try_file_no() { return vec![]; @@ -463,23 +598,23 @@ fn shift_op_replacement(op: &MutationType, expr: &Expression, source: &Rc { let op_loc = get_op_loc(expr, source); - let (start, end) = (op_loc.start(), op_loc.end()); vec![Mutant::new( - source.clone(), + file_resolver, + namespace, + op_loc, op.clone(), - start, - end, + "<<".to_string(), ">>".to_string(), )] } Expression::ShiftRight { .. } => { let op_loc = get_op_loc(expr, source); - let (start, end) = (op_loc.start(), op_loc.end()); vec![Mutant::new( - source.clone(), + file_resolver, + namespace, + op_loc, op.clone(), - start, - end, + ">>".to_string(), "<<".to_string(), )] } @@ -487,7 +622,13 @@ fn shift_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) -> Vec { +fn unary_op_replacement( + op: &MutationType, + file_resolver: &FileResolver, + namespace: Rc, + expr: &Expression, + source: &Arc, +) -> Vec { let loc = expr.loc(); let bitwise_op = get_operator(expr); let rs = vec!["-", "~"]; @@ -497,12 +638,20 @@ fn unary_op_replacement(op: &MutationType, expr: &Expression, source: &Rc { - let start = expr.loc().start(); - let end = rand.loc().start(); + Expression::BitwiseNot { expr, .. } | Expression::Negate { expr, .. } => { + let op_loc = get_op_loc(expr, source); let muts = replacements .iter() - .map(|r| Mutant::new(source.clone(), op.clone(), start, end, format!(" {} ", r))) + .map(|r| { + Mutant::new( + file_resolver, + namespace.clone(), + op_loc, + op.clone(), + "~".to_string(), + format!(" {} ", r), + ) + }) .collect(); muts } @@ -511,7 +660,13 @@ fn unary_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) -> Vec { +fn rel_op_replacement( + op: &MutationType, + file_resolver: &FileResolver, + namespace: Rc, + expr: &Expression, + source: &Arc, +) -> Vec { let loc = expr.loc(); if let None = loc.try_file_no() { return vec![]; @@ -553,23 +708,41 @@ fn rel_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) _ => return vec![], }; - // Now, apply the replacements + // Now, apply the replacements. Some replacements will replace the entire + // expression, while others will replace only the operator. let mut mutants = vec![]; - let expr_start = expr.loc().start(); - let expr_end = expr.loc().end(); - let op_loc = get_op_loc(expr, source); - let op_start = op_loc.start(); - let op_end = op_loc.end(); + let expr_start = loc.start(); + let expr_end = loc.end(); + let expr_string = &source[expr_start..expr_end].to_string(); + + let rel_op_loc = get_op_loc(expr, source); + let rel_op_start = rel_op_loc.start(); + let rel_op_end = rel_op_loc.end(); + let rel_op_string = source[rel_op_start..rel_op_end].to_string(); for r in replacements { mutants.push(match r { + // true and false replacements replace the entire expression, so use + // the expression's location (`loc`) and the expression's raw strin + // (`expr_string`) "true" | "false" => Mutant::new( - source.clone(), + file_resolver, + namespace.clone(), + loc, + op.clone(), + expr_string.to_string(), + r.to_string(), + ), + // other replacements replace only the relational operator, so use + // the rel op location (`rel_op_loc`) and the rel op's raw string + // (`expr_string`) + _ => Mutant::new( + file_resolver, + namespace.clone(), + rel_op_loc, op.clone(), - expr_start, - expr_end, + rel_op_string.clone(), r.to_string(), ), - _ => Mutant::new(source.clone(), op.clone(), op_start, op_end, r.to_string()), }); } mutants @@ -577,45 +750,54 @@ fn rel_op_replacement(op: &MutationType, expr: &Expression, source: &Rc) fn logical_op_replacement( op: &MutationType, + file_resolver: &FileResolver, + namespace: Rc, expr: &Expression, - source: &Rc, + source: &Arc, ) -> Vec { let loc = expr.loc(); if let None = loc.try_file_no() { return vec![]; } + // First, compile a list of replacements for this logical operator. Each replacement is either + // LHS, RHS, true, or false, as well as the location of the replacing + // expression (this is only used for RHS and LHS, since we need to compute + // the replacement value) let replacements = match expr { - Expression::And { left, right, .. } => vec![ - ("LHS", left.loc().start(), left.loc().end()), - ("RHS", right.loc().start(), right.loc().end()), - ("false", 0, 0), - ], - Expression::Or { left, right, .. } => vec![ - ("LHS", left.loc().start(), left.loc().end()), - ("RHS", right.loc().start(), right.loc().end()), - ("true", 0, 0), - ], - _ => vec![], + Expression::And { left, right, .. } => { + vec![("LHS", left.loc()), ("RHS", right.loc()), ("false", loc)] + } + Expression::Or { left, right, .. } => { + vec![("LHS", left.loc()), ("RHS", right.loc()), ("true", loc)] + } + _ => { + return vec![]; + } }; - // Now, apply the replacements + // Now, apply each replacement to create a mutant let mut mutants = vec![]; - let expr_start = expr.loc().start(); - let expr_end = expr.loc().end(); - for (r, s, e) in replacements { + let orig = source[loc.start()..loc.end()].to_string(); + for (r, sub_loc) in replacements { mutants.push(match r { "LHS" | "RHS" => { - let repl = std::str::from_utf8(source.contents_between_offsets(s, e)) - .unwrap() - .to_string(); - Mutant::new(source.clone(), op.clone(), expr_start, expr_end, repl) + let repl = source[sub_loc.start()..sub_loc.end()].to_string(); + Mutant::new( + file_resolver, + namespace.clone(), + loc, + op.clone(), + orig.clone(), + repl, + ) } "true" | "false" => Mutant::new( - source.clone(), + file_resolver, + namespace.clone(), + loc, op.clone(), - expr_start, - expr_end, + orig.clone(), r.to_string(), ), _ => panic!("Illegal State"), @@ -626,10 +808,13 @@ fn logical_op_replacement( fn literal_value_replacement( op: &MutationType, + file_resolver: &FileResolver, + namespace: Rc, expr: &Expression, - source: &Rc, + source: &Arc, ) -> Vec { let loc = expr.loc(); + let orig = source[loc.start()..loc.end()].to_string(); if let None = loc.try_file_no() { return vec![]; } @@ -665,21 +850,28 @@ fn literal_value_replacement( _ => vec![], }; let mut mutants = vec![]; - let expr_start = expr.loc().start(); - let expr_end = expr.loc().end(); for r in replacements { mutants.push(Mutant::new( - source.clone(), + file_resolver, + namespace.clone(), + loc, op.clone(), - expr_start, - expr_end, + orig.clone(), r.clone(), )); } mutants } -fn statement_deletion(op: &MutationType, stmt: &Statement, source: &Rc) -> Vec { +fn statement_deletion( + op: &MutationType, + file_resolver: &FileResolver, + namespace: Rc, + stmt: &Statement, + source: &Arc, +) -> Vec { + let loc = stmt.loc(); + let orig = source[loc.start()..loc.end()].to_string(); match stmt { // Do not delete complex/nested statements Statement::Block { .. } @@ -695,27 +887,29 @@ fn statement_deletion(op: &MutationType, stmt: &Statement, source: &Rc) // Also, do not mutate underscore statement Statement::Underscore(_) => vec![], - Statement::Expression(loc, ..) - | Statement::Delete(loc, ..) - | Statement::Continue(loc) - | Statement::Break(loc) - | Statement::Revert { loc, .. } - | Statement::Emit { loc, .. } => vec![Mutant::new( - source.clone(), + Statement::Expression(..) + | Statement::Delete(..) + | Statement::Continue(..) + | Statement::Break(..) + | Statement::Revert { .. } + | Statement::Emit { .. } => vec![Mutant::new( + file_resolver, + namespace, + loc, op.clone(), - loc.start(), - loc.end(), + orig, "assert(true)".to_string(), )], // Returns are special: we should perform some analysis to figure out if // we can delete this without making an invalid program. For now we // delete and hope for the best :) - Statement::Return(loc, _) => vec![Mutant::new( - source.clone(), + Statement::Return(..) => vec![Mutant::new( + file_resolver, + namespace, + loc, op.clone(), - loc.start(), - loc.end(), + orig, "assert(true)".to_string(), )], } @@ -724,8 +918,10 @@ fn statement_deletion(op: &MutationType, stmt: &Statement, source: &Rc) #[allow(dead_code)] fn elim_delegate_mutation( _op: &MutationType, + _file_resolver: &FileResolver, + _namespace: Rc, _expr: &Expression, - _source: &Rc, + _source: &Arc, ) -> Vec { // TODO: implement vec![] @@ -734,8 +930,10 @@ fn elim_delegate_mutation( #[allow(dead_code)] fn expression_value_replacement( _op: &MutationType, + _file_resolver: &FileResolver, + _namespace: Rc, _expr: &Expression, - _source: &Rc, + _source: &Arc, ) -> Vec { // TODO: implement vec![] @@ -775,11 +973,11 @@ fn expression_value_replacement( #[cfg(test)] mod test { use crate::test_util::*; - use crate::{MutationType, MutationType::*, Mutator, MutatorConf, Solc, Source}; + use crate::{MutationType, MutationType::*, Mutator, MutatorConf, Solc}; + use solang::file_resolver::FileResolver; use std::collections::HashSet; + use std::error; use std::path::PathBuf; - use std::rc::Rc; - use std::{error, path::Path}; use tempfile::Builder; #[test] @@ -841,21 +1039,22 @@ contract A { fn assert_num_mutants_for_statements( statements: &Vec<&str>, ops: &Vec, - expected: usize, + _expected: usize, ) { - let mutator = apply_mutation_to_statements(statements, None, ops).unwrap(); - assert_eq!( - expected, - mutator.mutants().len(), - "Error: applied ops\n -> {:?}\nto program\n -> {:?}\nat {:?} for more info", - ops, - statements.join(" "), - mutator - .sources - .iter() - .map(|s| s.filename()) - .collect::>() - ); + let _mutator = apply_mutation_to_statements(statements, None, ops).unwrap(); + panic!(); + // assert_eq!( + // expected, + // mutator.mutants().len(), + // "Error: applied ops\n -> {:?}\nto program\n -> {:?}\nat {:?} for more info", + // ops, + // statements.join(" "), + // mutator + // .filenames() + // .iter() + // .map(|s| PathBuf::from(s).as_path()) + // .collect::>() + // ); } #[allow(dead_code)] @@ -865,22 +1064,23 @@ contract A { expected: &Vec<&str>, ) { let mutator = apply_mutation_to_statements(statements, None, ops).unwrap(); - assert_eq!( - expected.len(), - mutator.mutants().len(), - "Error: applied ops\n -> {:?}\nto program\n -> {:?}\nat {:?} for more info", - ops, - statements.join(" "), - mutator - .sources - .iter() - .map(|s| s.filename()) - .collect::>() - ); - - let actuals: HashSet<&str> = mutator.mutants().iter().map(|m| m.repl.as_str()).collect(); - let expected: HashSet<&str> = expected.iter().map(|s| *s).collect(); - assert_eq!(actuals, expected); + panic!(); + // assert_eq!( + // expected.len(), + // mutator.mutants().len(), + // "Error: applied ops\n -> {:?}\nto program\n -> {:?}\nat {:?} for more info", + // ops, + // statements.join(" "), + // mutator + // .filenames() + // .iter() + // .map(|s| PathBuf::from(s).as_path()) + // .collect::>() + // ); + + // let actuals: HashSet<&str> = mutator.mutants().iter().map(|m| m.repl.as_str()).collect(); + // let expected: HashSet<&str> = expected.iter().map(|s| *s).collect(); + // assert_eq!(actuals, expected); } fn apply_mutation_to_statements( @@ -894,7 +1094,7 @@ contract A { .rand_bytes(5) .tempdir()?; let mut mutator = make_mutator(ops, source, outdir.into_path()); - let sources = mutator.sources().clone(); + let sources = mutator.filenames().clone(); mutator.mutate(sources)?; Ok(mutator) @@ -902,18 +1102,19 @@ contract A { fn _assert_num_mutants_for_source(source: &str, ops: &Vec, expected: usize) { let mutator = apply_mutation_to_source(source, ops).unwrap(); - assert_eq!( - expected, - mutator.mutants().len(), - "Error: applied ops\n -> {:?}\nto program\n -> {:?}\n\nSee {:?} for more info", - ops, - source, - mutator - .sources - .iter() - .map(|s| s.filename()) - .collect::>() - ); + panic!(); + // assert_eq!( + // expected, + // mutator.mutants().len(), + // "Error: applied ops\n -> {:?}\nto program\n -> {:?}\n\nSee {:?} for more info", + // ops, + // source, + // mutator + // .filenames() + // .iter() + // .map(|s| PathBuf::from(s).as_path()) + // .collect::>() + // ); } fn assert_exact_mutants_for_source( @@ -922,18 +1123,19 @@ contract A { expected: &Vec<&str>, ) { let mutator = apply_mutation_to_source(source, ops).unwrap(); - assert_eq!( - expected.len(), - mutator.mutants().len(), - "Error: applied ops\n -> {:?}\nto program\n -> {:?}\nat {:?} for more info", - ops, - source, - mutator - .sources - .iter() - .map(|s| s.filename()) - .collect::>() - ); + panic!(); + // assert_eq!( + // expected.len(), + // mutator.mutants().len(), + // "Error: applied ops\n -> {:?}\nto program\n -> {:?}\nat {:?} for more info", + // ops, + // source, + // mutator + // .filenames() + // .iter() + // .map(|s| PathBuf::from(s).as_path()) + // .collect::>() + // ); let actuals: HashSet<&str> = mutator.mutants().iter().map(|m| m.repl.as_str()).collect(); let expected: HashSet<&str> = expected.iter().map(|s| *s).collect(); @@ -950,7 +1152,7 @@ contract A { .rand_bytes(5) .tempdir()?; let mut mutator = make_mutator(ops, source, outdir.into_path()); - let sources = mutator.sources().clone(); + let sources = mutator.filenames().clone(); mutator.mutate(sources)?; Ok(mutator) @@ -966,10 +1168,8 @@ contract A { }; let sourceroot = filename.parent().unwrap(); - let source = Source::new(filename.clone(), sourceroot.to_path_buf()) - .expect(format!("Could not build source from {}", filename.display()).as_str()); - let sources = vec![Rc::new(source)]; + let sources = vec![filename.to_str().unwrap().to_string()]; let solc = Solc::new("solc".into(), PathBuf::from(outdir)); - Mutator::new(conf, sources, solc) + Mutator::new(conf, FileResolver::new(), sources, solc) } } diff --git a/src/mutator.rs b/src/mutator.rs index 379d5483..0c7cae34 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -1,16 +1,17 @@ use crate::{ default_gambit_output_directory, mutation::MutationType, normalize_mutation_operator_name, - source::Source, Mutant, MutateParams, Mutation, Solc, + Mutant, MutateParams, Mutation, Solc, }; use clap::ValueEnum; use solang::{ file_resolver::FileResolver, parse_and_resolve, sema::{ - ast::{Expression, Statement}, + ast::{Expression, Namespace, Statement}, Recurse, }, }; +use solang_parser::pt::CodeLocation; use std::{ error, ffi::{OsStr, OsString}, @@ -62,17 +63,17 @@ pub struct Mutator { pub conf: MutatorConf, /// The original sources - pub sources: Vec>, + pub filenames: Vec, /// The mutants, in order of generation pub mutants: Vec, - /// The current source being mutated - pub current_source: Option>, - /// The file resolver pub file_resolver: FileResolver, + /// The namespace being mutated + pub namespace: Option>, + /// A temporary directory to store intermediate work _tmp: PathBuf, } @@ -81,9 +82,8 @@ impl std::fmt::Debug for Mutator { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("Mutator") .field("conf", &self.conf) - .field("sources", &self.sources) + .field("file_names", &self.filenames) .field("mutants", &self.mutants) - .field("current_source", &self.current_source) .field("_tmp", &self._tmp) .finish() } @@ -111,49 +111,42 @@ impl From<&MutateParams> for Mutator { solc.with_remappings(remappings); } - let sourceroot = match &value.sourceroot { - Some(sourceroot) => PathBuf::from(sourceroot), - None => { - // Attempt to use CWD as the sourceroot. Ensuer that the - // filename belongs to (is prefixed by) the sourceroot - let sourceroot = PathBuf::from(".").canonicalize().unwrap(); - let filename = &value - .filename - .as_ref() - .unwrap_or_else(|| panic!("Found unresolved filename in params: {:?}", value)); - let filepath = PathBuf::from(filename).canonicalize().unwrap(); - if !&filepath.starts_with(&sourceroot) { - panic!("Unresolved sourceroot! Attempted to use the current working directory {} but filename {} was not a descendent.", sourceroot.display(), filepath.display()); - } - - sourceroot - } - }; - - let mut sources: Vec> = vec![]; + // let sourceroot = match &value.sourceroot { + // Some(sourceroot) => PathBuf::from(sourceroot), + // None => { + // // Attempt to use CWD as the sourceroot. Ensuer that the + // // filename belongs to (is prefixed by) the sourceroot + // let sourceroot = PathBuf::from(".").canonicalize().unwrap(); + // let filename = &value + // .filename + // .as_ref() + // .unwrap_or_else(|| panic!("Found unresolved filename in params: {:?}", value)); + // let filepath = PathBuf::from(filename).canonicalize().unwrap(); + // if !&filepath.starts_with(&sourceroot) { + // panic!("Unresolved sourceroot! Attempted to use the current working directory {} but filename {} was not a descendent.", sourceroot.display(), filepath.display()); + // } + + // sourceroot + // } + // }; + + let mut filenames: Vec = vec![]; if let Some(filename) = &value.filename { log::info!("Creating Source from filename: {}", filename); - sources.push(Rc::new( - Source::new(filename.into(), sourceroot) - .unwrap_or_else(|_| panic!("Couldn't read source {}", filename)), - )) + filenames.push(filename.clone()); } - let mut mutator = Mutator::new(conf, sources, solc); + let mut file_resolver = FileResolver::new(); // Add base path to file resolver match &value.solc_base_path { Some(base_path) => { - mutator - .file_resolver + file_resolver .add_import_path(&PathBuf::from(base_path)) .unwrap(); } None => { - mutator - .file_resolver - .add_import_path(&PathBuf::from(".")) - .unwrap(); + file_resolver.add_import_path(&PathBuf::from(".")).unwrap(); } } @@ -164,30 +157,35 @@ impl From<&MutateParams> for Mutator { if split_rm.len() != 2 { panic!("Invalid remapping: {}", rm); } - mutator - .file_resolver + file_resolver .add_import_map(OsString::from(split_rm[0]), PathBuf::from(split_rm[1])) .unwrap(); } } + let mutator = Mutator::new(conf, file_resolver, filenames, solc); mutator } } impl Mutator { - pub fn new(conf: MutatorConf, sources: Vec>, solc: Solc) -> Mutator { + pub fn new( + conf: MutatorConf, + file_resolver: FileResolver, + filenames: Vec, + solc: Solc, + ) -> Mutator { log::info!( "Creating mutator:\n conf: {:#?}\n sources: {:?}\n solc: {:#?}", conf, - sources, + filenames, solc ); Mutator { conf, - sources, + filenames, mutants: vec![], - current_source: None, - file_resolver: FileResolver::new(), + file_resolver, + namespace: None, _tmp: "".into(), } } @@ -206,19 +204,19 @@ impl Mutator { /// be further validated, suppressed, and downsampled as desired. pub fn mutate( &mut self, - sources: Vec>, + filenames: Vec, ) -> Result<&Vec, Box> { let mut mutants: Vec = vec![]; - for source in sources.iter() { - log::info!("Mutating source {}", source.filename().display()); + for filename in filenames.iter() { + log::info!("Mutating file {}", filename); - match self.mutate_file(&source) { + match self.mutate_file(&filename) { Ok(file_mutants) => { - log::info!(" Generated {} mutants from source", file_mutants.len()); + log::info!(" Generated {} mutants from file", file_mutants.len()); } Err(e) => { - log::warn!("Couldn't mutate source {}", source.filename().display()); + log::warn!("Couldn't mutate file {}", filename); log::warn!("Encountered error: {}", e); } } @@ -229,19 +227,19 @@ impl Mutator { } /// Mutate a single file. - fn mutate_file(&mut self, source: &Rc) -> Result, Box> { - self.current_source = Some(source.clone()); - let ns = parse_and_resolve( - &OsStr::new(source.filename()), + fn mutate_file(&mut self, filename: &String) -> Result, Box> { + let ns = Rc::new(parse_and_resolve( + &OsStr::new(filename), &mut self.file_resolver, solang::Target::EVM, - ); + )); + self.namespace = Some(ns.clone()); // mutate functions for function in ns.functions.iter() { let file = ns.files.get(function.loc.file_no()); match file { Some(file) => { - if file.file_name() != source.filename().to_str().unwrap().to_string() { + if &file.file_name() != filename { continue; } } @@ -255,6 +253,7 @@ impl Mutator { } } } + self.namespace = None; Ok(self.mutants.clone()) } @@ -263,26 +262,25 @@ impl Mutator { &self.mutants } - pub fn sources(&self) -> &Vec> { - &self.sources + pub fn filenames(&self) -> &Vec { + &self.filenames } pub fn apply_operators_to_expression(&mut self, expr: &Expression) { - if let Some(source) = &self.current_source { + if let Some(_) = expr.loc().try_file_no() { let mut mutants = vec![]; for op in self.mutation_operators() { - mutants.append(&mut op.mutate_expression(expr, source)); + mutants.append(&mut op.mutate_expression(self, expr)); } self.mutants.append(&mut mutants); } } pub fn apply_operators_to_statement(&mut self, stmt: &Statement) { - log::debug!("applying ops {:?} to {:?}", self.mutation_operators(), stmt); - if let Some(source) = &self.current_source { + if let Some(_) = stmt.loc().try_file_no() { let mut mutants = vec![]; for op in self.mutation_operators() { - mutants.append(&mut op.mutate_statement(stmt, source)); + mutants.append(&mut op.mutate_statement(self, stmt)); } self.mutants.append(&mut mutants); } diff --git a/src/source.rs b/src/source.rs deleted file mode 100644 index 9fd45755..00000000 --- a/src/source.rs +++ /dev/null @@ -1,125 +0,0 @@ -use crate::{read_source, simplify_path, util}; -use std::{ - error, fmt, - path::{Path, PathBuf}, -}; - -#[derive(Debug)] -pub enum SourceError { - /// Indicate an out of bound position in a source file - PositionOutOfBoundsError(usize, String), - /// Indicate that we couldn't find a line/column number at a given position for a source file - LineColumnLookupError(usize, String), -} - -impl fmt::Display for SourceError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "SourceError") - } -} - -impl error::Error for SourceError {} - -/// A source file, including its name, contents, and source root, to be mutated. -pub struct Source { - filename: PathBuf, - sourceroot: PathBuf, - contents: Vec, - newlines: Vec, -} - -impl std::fmt::Debug for Source { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { - f.debug_struct("Source") - .field("filename", &self.filename) - .field("sourceroot", &self.sourceroot) - .field("contents", &String::from("[...]")) - .field("newlines", &String::from("[...]")) - .finish() - } -} - -impl Source { - pub fn new(filename: PathBuf, sourceroot: PathBuf) -> Result> { - let filename = simplify_path(&filename)?; - let contents = read_source(&filename)?; - let newlines: Vec = contents - .iter() - .enumerate() - .filter(|(_, c)| **c == b'\n') - .map(|(i, _)| i + 2) - .collect(); - - Ok(Source { - filename, - sourceroot, - contents, - newlines, - }) - } - - /// Get the filename of this source - pub fn filename(&self) -> &Path { - self.filename.as_path() - } - - /// Get the filename of this source as a string - pub fn filename_as_str(&self) -> String { - self.filename.to_str().unwrap().into() - } - - pub fn relative_filename(&self) -> Result> { - util::rel_path_from_base(self.filename.as_path(), self.sourceroot.as_path()) - } - - /// Get the contents of this source, computing from `filename` if necessary - pub fn contents(&self) -> &[u8] { - &self.contents - } - - pub fn contents_before_offset(&self, offset: usize) -> &[u8] { - &self.contents[..offset] - } - - pub fn contents_after_offset(&self, offset: usize) -> &[u8] { - &self.contents[offset..] - } - - pub fn contents_between_offsets(&self, start: usize, end: usize) -> &[u8] { - &self.contents[start..end] - } - - /// Get the sourceroot for this source file - pub fn sourceroot(&self) -> &Path { - self.sourceroot.as_path() - } - - /// Get a (line, column) pair that represents which line and column this - /// mutant occurs at. Lines and columns are both 1-indexed. - pub fn get_line_column(&self, pos: usize) -> Result<(usize, usize), Box> { - if pos >= self.contents.len() { - return Err(Box::new(SourceError::PositionOutOfBoundsError( - pos, - self.filename_as_str(), - ))); - } - - let newlines = &self.newlines; - if let Some((lineno, nlpos)) = newlines - .iter() - .enumerate() - .rev() - .find(|(_, nlpos)| nlpos < &&pos) - { - let columnno = pos - nlpos + 2; - Ok((lineno + 2, columnno)) - } else if &pos < newlines.first().unwrap() { - Ok((1, pos + 1)) - } else { - Err(Box::new(SourceError::LineColumnLookupError( - pos, - self.filename_as_str(), - ))) - } - } -} From b3f81e834fc57215213786073922488ef7c494f5 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 10 Jul 2023 15:02:23 -0700 Subject: [PATCH 028/200] Logging --- src/mutator.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mutator.rs b/src/mutator.rs index 0c7cae34..6e7aa439 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -228,18 +228,25 @@ impl Mutator { /// Mutate a single file. fn mutate_file(&mut self, filename: &String) -> Result, Box> { + log::info!("Parsing file {}", filename); let ns = Rc::new(parse_and_resolve( &OsStr::new(filename), &mut self.file_resolver, solang::Target::EVM, )); + log::info!("Parsed namespace with:"); + log::info!(" {} files", ns.files.len()); + log::info!(" {} contracts", ns.contracts.len()); + log::info!(" {} functions", ns.functions.len()); self.namespace = Some(ns.clone()); + + let file_path = PathBuf::from(filename); // mutate functions for function in ns.functions.iter() { let file = ns.files.get(function.loc.file_no()); match file { Some(file) => { - if &file.file_name() != filename { + if &file.path != &file_path { continue; } } @@ -248,6 +255,7 @@ impl Mutator { } } if function.has_body { + log::info!("Processing function body"); for statement in function.body.iter() { statement.recurse(self, mutate_statement); } From 4ceecd3ce37a05967a3c6053adcab2a16e202af6 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 14 Jul 2023 14:24:39 -0700 Subject: [PATCH 029/200] Updated solang rev --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1ccaff92..283c6e4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ authors = [ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -solang = { git = "https://github.com/hyperledger/solang.git", rev = "940ca3ce682091c1c8f25803705483e75f900ae0", default-features = false } +solang = { git = "https://github.com/hyperledger/solang.git", rev = "08128dffcb4ce18e7de2cfc61c84a75e1650c061", default-features = false } ansi_term = "0.12" clap = { version = "4.0.29", features = ["derive"] } clap_complete = "4.0.6" @@ -30,7 +30,7 @@ scanner-rust = "2.0.16" serde = { version = "1", features = ["derive"] } serde_json = "1" similar = "2" -solang-parser = { git = "https://github.com/hyperledger/solang.git", rev = "940ca3ce682091c1c8f25803705483e75f900ae0" } +solang-parser = { git = "https://github.com/hyperledger/solang.git", rev = "08128dffcb4ce18e7de2cfc61c84a75e1650c061" } strum = "0.24.1" strum_macros = "0.24.3" tempfile = "3" From 28d1176c5c4b052b656e555b8504e296962506a5 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 17 Jul 2023 17:38:37 -0700 Subject: [PATCH 030/200] Got new paths and imports working for lor --- benchmarks/config-jsons/lor.json | 2 +- src/main.rs | 314 ++++++------------------------- src/mutant_writer.rs | 7 +- src/mutation.rs | 22 ++- src/mutator.rs | 28 ++- src/util.rs | 10 +- 6 files changed, 120 insertions(+), 263 deletions(-) diff --git a/benchmarks/config-jsons/lor.json b/benchmarks/config-jsons/lor.json index 8a1d4e0d..9d77444b 100644 --- a/benchmarks/config-jsons/lor.json +++ b/benchmarks/config-jsons/lor.json @@ -1,7 +1,7 @@ [ { "filename": "../LOR/LOR.sol", - "sourceroot": "..", + "solc-base-path": "..", "mutations": [ "logical-operator-replacement" ] diff --git a/src/main.rs b/src/main.rs index dd8dc696..ea116fac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,56 +51,10 @@ fn main() -> Result<(), Box> { }; log::debug!("Deserialized JSON into MutateParams: {:#?}", &mutate_params); - // # Path Resolutions in Configuration Files - // - // All paths specified _in a configuration file_ are relative to - // the parent directory of the configuration file. This means - // that they will always resolve to the same canonical path, - // regardless of which directory Gambit is called from. - // - // ## Source Root Resolution - // - // The _source root_ describes where the conceptual root of the - // file source tree is. This is used for outputting relative - // paths when Gambit reports on a mutation run and exports - // mutants to disk. - // - // If a "sourceroot" field is provided in the configration file, - // Gambit resolves it according to the following rules: - // - // 1. A **relative** source root path is resolved with respect to - // the parent directory of the configuration file and - // canonicalized. - // - // 2. An **absolute** source root path resolves to itself - // - // If no source root is provided in the configuration file, - // Gambit uses the current working directory as the source root. - // - // ## Filename Resolution - // - // After Source Root Resolution is performed, Gambit performs - // Filename Resolution. First, Gambit resolves each filename - // according to the following rules: - // - // 1. A **relative** filename is resolved with respect to the - // parent directory of the configuration file. - // - // 2. An **absolute** filename resolves to itself - // - // After Filename Resolution, Gambit ensures that each - // parameter's `filename` value is prefixed by (or belongs to) - // it's source root. - // - // NOTE: not all files need to belong to `sourceroot`! Only the - // `param.filename`, since this is written to logs. In - // particular, compiler arguments (e.g., specified by the - // `--solc-allowpaths` flag) will not be checked for inclusion - // in `sourceroot`. let config_pb = PathBuf::from(&json_path); - log::info!("config: {}", config_pb.display()); + log::info!("config: {:?}", config_pb); let config_pb = config_pb.canonicalize()?; - log::info!("canonical config: {}", config_pb.display()); + log::info!("canonical config: {:?}", config_pb); let config_parent_pb = config_pb.parent().unwrap(); log::info!("config parent: {}", config_parent_pb.display()); let json_parent_directory = config_parent_pb.canonicalize()?; @@ -111,86 +65,31 @@ fn main() -> Result<(), Box> { for (i, params) in mutate_params.iter_mut().enumerate() { // Source Root Resolution log::info!("Configuration {}", i + 1); - log::info!(" Performing Source Root Resolution"); - let source_root_path: PathBuf = match params.sourceroot.clone() { - Some(sr) => { - let raw_source_root_path = PathBuf::from(&sr); - let resolved_source_root_path = if raw_source_root_path.is_absolute() { - raw_source_root_path.canonicalize()? - } else { - json_parent_directory - .join(raw_source_root_path) - .canonicalize()? - }; - log::info!( - " [->] Resolved sourceroot `{}` to `{}`", - &sr, - resolved_source_root_path.display() - ); - resolved_source_root_path - } - None => { - let resolved_source_root_path = PathBuf::from(".").canonicalize()?; - log::info!(" No sourceroot provided in configration"); - log::info!( - " [->] Resolved sourceroot to current working directory `{}`", - resolved_source_root_path.display() - ); - resolved_source_root_path - } - }; - let source_root_string = source_root_path.to_str().unwrap().to_string(); - - // Filename Resolution - // - // We need to check for the following filenames to resolve - // with respect to the config file's parent directory: - // - // | Parameter | Resolve WRT Conf? | Sourceroot Inclusion? | - // | --------------- | ----------------- | --------------------- | - // | filename | Yes | Yes | - // | outdir | If not None | No | - // | solc_allowpaths | Yes | No | - // | solc_basepath | Yes | No | - // | solc_remapping | Yes | No | - log::info!(" Performing Filename Resolution"); // PARAM: Filename log::info!(" [.] Resolving params.filename"); - let filename_path: PathBuf = match params.filename.clone() { - Some(filename) => { - resolve_config_file_path(&filename, &json_parent_directory)? - } - None => { - log::error!("[!!] Found a configuration without a filename!"); - log::error!("[!!] Parameters: {:#?}", params); - log::error!("[!!] Exiting."); - // TODO: Replace exit with an error - std::process::exit(1); - } + let filename = params + .filename + .clone() + .expect("No filename in configuration"); + let filepath = PathBuf::from(&filename); + println!("filepath: {:?}", filepath); + let filepath = if filepath.is_absolute() { + filepath + } else { + let joined = config_parent_pb.join(filepath); + println!("joined: {:?}", &joined); + joined.canonicalize().unwrap() }; - let filename_string = filename_path.to_str().unwrap().to_string(); - - // Check that filename is a member of sourceroot - if !filename_path.starts_with(&source_root_path) { - log::error!( "[!!] Illegal Configuration: Resolved filename `{}` is not prefixed by the derived sourceroot {}", - &filename_string, - &source_root_string, - ); - log::error!("[!!] Parameters:\n{:#?}", params); - log::error!("[!!] Exiting."); - // TODO: Replace exit with an error - std::process::exit(1); - } - log::info!( - " [->] Resolved filename `{}` belongs to sourceroot `{}`", - &filename_string, - &source_root_string - ); // PARAM: Outdir - // We can't use `resolve_config_file_path` because it might - // not exist yet, so we can't canonicalize + // + If an absolute `outdir` is specified, normalize it + // + If a relative (non-absolute) `outdir` is specified, + // normalize it with respect to the JSON parent directory + // + If no `outdir` is specified, use `$CWD/gambit_out` + // + // Note: we cannot use `resolve_config_file_path` because + // `outdir` might not exist yet log::info!(" [.] Resolving params.outdir"); let outdir_path = match ¶ms.outdir { @@ -208,16 +107,13 @@ fn main() -> Result<(), Box> { }; let outdir = outdir_path.to_str().unwrap().to_string(); log::info!( - " [->] Resolved path `{}` to `{}`", - ¶ms - .outdir - .clone() - .unwrap_or(default_gambit_output_directory()), + " [->] Resolved path `{:?}` to `{}`", + ¶ms.outdir.clone(), &outdir, ); // PARAM: solc_allowpaths - log::info!(" [.] Resolving params.allow_paths"); + log::info!(" [.] Resolving params.solc_allow_paths"); let allow_paths = if let Some(allow_paths) = ¶ms.solc_allow_paths { Some(resolve_config_file_paths( allow_paths, @@ -228,7 +124,7 @@ fn main() -> Result<(), Box> { }; // PARAM: solc_basepath - log::info!(" [.] Resolving params.solc_basepath"); + log::info!(" [.] Resolving params.solc_base_path"); let basepath = if let Some(basepaths) = ¶ms.solc_base_path { Some(resolve_config_file_path(basepaths, &json_parent_directory)?) .map(|bp| bp.to_str().unwrap().to_string()) @@ -256,8 +152,7 @@ fn main() -> Result<(), Box> { // for error reporting: reporting the parsed in value of // `params` will be more helpful to the end user than // reporting the modified value of params). - params.sourceroot = Some(source_root_string.clone()); - params.filename = Some(filename_string.clone()); + params.filename = Some(filepath.to_str().unwrap().to_string()); params.outdir = Some(outdir); params.solc_allow_paths = allow_paths; params.solc_base_path = basepath; @@ -266,137 +161,33 @@ fn main() -> Result<(), Box> { run_mutate(mutate_params)?; } else { log::debug!("Running CLI MutateParams: {:#?}", ¶ms); - // # Path Resolution for CLI Provided Parameters - // - // All relative paths specified _from the CLI_ are relative to - // the current working directory. This means that relative paths - // will resolve to different canonical paths depending on where - // they are called from. - // - // ## Source Root Resolution - // - // The _source root_ describes where the conceptual root of the - // file source tree is. This is used for outputting relative - // paths when Gambit reports on a mutation run and exports - // mutants to disk. - // - // If the `--sourceroot` parameter is provided by the user, - // Gambit resolves it according to the following rules: - // - // 1. A **relative** source root path is resolved with respect to - // the current working directory - // - // 2. An **absolute** source root path resolves to itself - // - // If no source root is provided, Gambit uses the current - // working directory as the source root. - // - // ## Filename Resolution - // - // After Source Root Resolution is performed, Gambit performs - // Filename Resolution. First, Gambit resolves each filename - // according to the following rules: - // - // 1. A **relative** filename is resolved with respect to the - // current working directory. - // - // 2. An **absolute** filename resolves to itself - // - // If no filename is provided, Gambit reports an error and - // exits. - // - // After Filename Resolution, Gambit ensures that each - // parameter's filename is prefixed by (or belongs to) it's - // source root. If not, Gambit reports an error and exits. - - // Source Root Resolution - log::info!("Performing Path Resolution for CLI"); - log::info!(" Performing Source Root Resolution"); - let source_root_path: PathBuf = match params.sourceroot.clone() { - Some(sr) => { - let raw_source_root_path = PathBuf::from(&sr); - let resolved_source_root_path = raw_source_root_path.canonicalize()?; - log::info!( - " [->] Resolved sourceroot `{}` to `{}`", - &sr, - resolved_source_root_path.display() - ); - resolved_source_root_path - } - None => { - let resolved_source_root_path = PathBuf::from(".").canonicalize()?; - log::info!(" No sourceroot provided in configration"); - log::info!( - " [->] Resolved sourceroot to current working directory `{}`", - resolved_source_root_path.display() - ); - resolved_source_root_path - } - }; - let source_root_string = source_root_path.to_str().unwrap().to_string(); - // Filename Resolution - // - // We need to canonicalize the following files, possibly - // checking for sourceroot inclusion. - // - // | Parameter | Sourceroot Inclusion? | - // | --------------- | --------------------- | - // | filename | Yes | - // | outdir | No | - // | solc_allowpaths | No | - // | solc_basepath | No | - // | solc_remapping | No | + // # Path Resolution for CLI Provided Parameters log::info!(" Performing Filename Resolution"); + // let filename = params.filename.expect("No provided filename"); log::info!(" [.] Resolving params.filename"); - let filename_path: PathBuf = match params.filename.clone() { - Some(filename) => { - let raw_filename_path = PathBuf::from(&filename); - let resolved_filename_path = raw_filename_path.canonicalize()?; - log::info!( - " [->] Resolved filename `{}` to `{}`", - &filename, - resolved_filename_path.display() - ); - resolved_filename_path - } - None => { - log::error!("[!!] Found a configuration without a filename!"); - log::error!("[!!] Parameters: {:#?}", params); - log::error!("[!!] Exiting."); - // TODO: Replace exit with an error - std::process::exit(1); - } - }; - let filename_string = filename_path.to_str().unwrap().to_string(); - - // Check that filename is a member of sourceroot - if !filename_path.starts_with(&source_root_path) { - log::error!( "[!!] Illegal Configuration: Resolved filename `{}` is not prefixed by the derived sourceroot {}", - &filename_string, - &source_root_string, - ); - log::error!("[!!] Parameters:\n{:#?}", params); - log::error!("[!!] Exiting."); - // TODO: Replace exit with an error - std::process::exit(1); - } - log::info!( - " [->] Resolved filename `{}` belongs to sourceroot `{}`", - &filename_string, - &source_root_string - ); + let filename = params + .filename + .clone() + .expect("No filename in configuration"); + let filepath = PathBuf::from(&filename).canonicalize().unwrap(); + println!("filepath: {:?}", filepath); log::info!(" [.] Resolving params.outdir {:?}", ¶ms.outdir); + let outdir = normalize_path(&PathBuf::from( ¶ms.outdir.unwrap_or(default_gambit_output_directory()), )) .to_str() .unwrap() .to_string(); + log::info!(" [.] Resolved params.outdir to {}", outdir); - log::info!(" [.] Resolving params.solc_allowpaths"); + log::info!( + " [.] Resolving params.solc_allowpaths: {:?}", + params.solc_allow_paths + ); let solc_allowpaths = params.solc_allow_paths.map(|aps| { aps.iter() .map(|p| { @@ -409,9 +200,16 @@ fn main() -> Result<(), Box> { }) .collect() }); + log::info!( + " [.] Resolved params.solc_allowpaths to {:?}", + solc_allowpaths + ); - log::info!(" [.] Resolving params.solc_basepath"); - let solc_basepath = params.solc_base_path.map(|bp| { + log::info!( + " [.] Resolving params.solc_base_path: {:?}", + params.solc_base_path + ); + let solc_base_path = params.solc_base_path.map(|bp| { PathBuf::from(bp) .canonicalize() .unwrap() @@ -419,6 +217,10 @@ fn main() -> Result<(), Box> { .unwrap() .to_string() }); + log::info!( + " [.] Resolved params.solc_base_path to {:?}", + solc_base_path + ); log::info!(" [.] Resolving params.solc_remapping"); let solc_remapping = params.solc_remappings.as_ref().map(|rms| { @@ -427,7 +229,7 @@ fn main() -> Result<(), Box> { .collect() }); log::info!( - " [->] Resolved solc-remapping:\n {:#?} to \n {:#?}", + " [->] Resolved params.solc_remapping:\n {:#?} to \n {:#?}", ¶ms.solc_remappings, &solc_remapping ); @@ -437,11 +239,10 @@ fn main() -> Result<(), Box> { // for error reporting: reporting the parsed in value of // `params` will be more helpful to the end user than // reporting the modified value of params). - params.sourceroot = Some(source_root_string); - params.filename = Some(filename_string); + params.filename = Some(filepath.to_str().unwrap().to_string()); params.outdir = Some(outdir); params.solc_allow_paths = solc_allowpaths; - params.solc_base_path = solc_basepath; + params.solc_base_path = solc_base_path; params.solc_remappings = solc_remapping; run_mutate(vec![*params])?; @@ -455,6 +256,7 @@ fn main() -> Result<(), Box> { } /// Resolve a filename with respect to the directory containing the config file +/// and canonicalize fn resolve_config_file_path( path: &String, json_parent_directory: &Path, @@ -465,7 +267,7 @@ fn resolve_config_file_path( } else { json_parent_directory.join(&path).canonicalize()? }; - log::info!( + log::debug!( " [->] Resolved path `{}` to `{}`", path.display(), result.display() diff --git a/src/mutant_writer.rs b/src/mutant_writer.rs index 5cf2339c..e9b63a8f 100644 --- a/src/mutant_writer.rs +++ b/src/mutant_writer.rs @@ -180,8 +180,11 @@ impl MutantWriter { /// This is computed from the relative path of the original sourcefile, relative to /// the specified `sourceroot`, and is computed with `Source.relative_filename()` fn get_mutant_filename(mutants_dir: &Path, mid: usize, mutant: &Mutant) -> PathBuf { - // TODO: Make this a relative file name - let rel_filename = mutant.path(); + let rel_filename = match mutant.sol_path() { + Some(sol_path) => sol_path, + None => mutant.path().strip_prefix("/").unwrap(), + }; + println!("Mutant filename: {:?} => {:?}", mutant.path(), rel_filename); mutants_dir .join(Path::new(&mid.to_string())) .join(rel_filename) diff --git a/src/mutation.rs b/src/mutation.rs index e066d740..18c886b6 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -1,4 +1,4 @@ -use crate::{get_indent, Mutator}; +use crate::{get_import_path, get_indent, Mutator}; use clap::ValueEnum; use num_bigint::BigInt; use num_traits::{One, Zero}; @@ -21,10 +21,17 @@ use std::{ /// numbers #[derive(Clone)] pub struct MutantLoc { + /// The location of the node that is mutated pub loc: Loc, + /// The (starting) line number of the mode being mutated pub line_no: usize, + /// The column number of the node being mutated pub col_no: usize, + /// The full path to the original source file pub path: PathBuf, + /// The solidity path, relative to its import root, to the original source + /// file; if a file path is specified absolutely then this is None + pub sol_path: Option, } impl Debug for MutantLoc { @@ -43,11 +50,20 @@ impl MutantLoc { let file = namespace.files.get(loc.file_no()).unwrap(); let (_, line_no, col_no, _) = resolver.get_line_and_offset_from_loc(file, &loc); let path = file.path.clone(); + let import_path = get_import_path( + resolver, + file.import_no + .expect("Expected an import no but found None"), + ) + .expect("Expected an import path but found None"); + let sol_path = path.strip_prefix(import_path).unwrap().to_path_buf(); + MutantLoc { loc, line_no, col_no, path, + sol_path: Some(sol_path), } } } @@ -103,6 +119,10 @@ impl Mutant { &self.mutant_loc.path } + pub fn sol_path(&self) -> Option<&PathBuf> { + self.mutant_loc.sol_path.as_ref() + } + pub fn get_line_column(&self) -> (usize, usize) { let mloc = &self.mutant_loc; (mloc.line_no, mloc.col_no) diff --git a/src/mutator.rs b/src/mutator.rs index 6e7aa439..cbd0357f 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -143,7 +143,9 @@ impl From<&MutateParams> for Mutator { Some(base_path) => { file_resolver .add_import_path(&PathBuf::from(base_path)) - .unwrap(); + .expect( + format!("Failed to add base_path as import path: {}", base_path).as_str(), + ); } None => { file_resolver.add_import_path(&PathBuf::from(".")).unwrap(); @@ -162,6 +164,17 @@ impl From<&MutateParams> for Mutator { .unwrap(); } } + + if let Some(allow_paths) = &value.solc_allow_paths { + for allow_path in allow_paths.iter() { + file_resolver + .add_import_path(&PathBuf::from(allow_path)) + .expect( + format!("Failed to add allow_path as import path: {}", allow_path).as_str(), + ) + } + } + let mutator = Mutator::new(conf, file_resolver, filenames, solc); mutator } @@ -240,7 +253,18 @@ impl Mutator { log::info!(" {} functions", ns.functions.len()); self.namespace = Some(ns.clone()); - let file_path = PathBuf::from(filename); + let resolved = self + .file_resolver + .resolve_file(None, OsStr::new(filename)) + .expect(format!("Unable to resolve filename {}", filename).as_str()); + + let file_path = resolved.full_path.clone(); + log::info!( + "Resolved {} to {:?} with import path {:?}", + filename, + resolved, + self.file_resolver.get_import_path(resolved.get_import_no()) + ); // mutate functions for function in ns.functions.iter() { let file = ns.files.get(function.loc.file_no()); diff --git a/src/util.rs b/src/util.rs index 7b766139..223b669a 100644 --- a/src/util.rs +++ b/src/util.rs @@ -6,7 +6,7 @@ use std::{ }; use ansi_term::{ANSIGenericString, Color, Style}; -use solang::sema::ast::Statement; +use solang::{file_resolver::FileResolver, sema::ast::Statement}; static EQUAL: &str = "="; pub static DEFAULT_GAMBIT_OUTPUT_DIRECTORY: &str = "gambit_out"; @@ -390,3 +390,11 @@ pub fn statement_type(stmt: &Statement) -> &str { Statement::Assembly(_, _) => "Assembly", } } + +/// Get the import path, if available, from resolver for the import_no +pub fn get_import_path(resolver: &FileResolver, import_no: usize) -> Option { + match resolver.get_import_path(import_no) { + Some(&(_, ref b)) => Some(b.clone()), + _ => None, + } +} From d884f5e8b20725cde79359e656c024a9b9f8a4ff Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 18 Jul 2023 14:45:46 -0700 Subject: [PATCH 031/200] Removed dumb comment --- src/main.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index ea116fac..690f7063 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,6 @@ use gambit::{ Command, MutateParams, }; -/// Entry point fn main() -> Result<(), Box> { let _ = env_logger::builder().try_init(); match Command::parse() { From 983222c6db53bf2f0e1b6bdb3233d0ab1f3b1127 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 18 Jul 2023 14:49:09 -0700 Subject: [PATCH 032/200] Simplified implementation of JSON parsing --- src/main.rs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/main.rs b/src/main.rs index 690f7063..baa14b33 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,22 +29,9 @@ fn main() -> Result<(), Box> { log::info!("Read configuration json: {:#?}", json); let mut mutate_params: Vec = if json.is_array() { - match serde_json::from_str(&json_contents) { - Ok(xs) => xs, - Err(msg) => { - println!("{}", &msg); - std::process::exit(1); - } - } + serde_json::from_str(&json_contents)? } else if json.is_object() { - let single_param: MutateParams = match serde_json::from_str(&json_contents) { - Ok(xs) => xs, - Err(msg) => { - println!("{}", &msg); - std::process::exit(1); - } - }; - vec![single_param] + vec![serde_json::from_str(&json_contents)?] } else { panic!("Invalid configuration file: must be an array or an object") }; From 20fbcd4528034e12023890f16bc86d92744b375a Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 18 Jul 2023 14:49:46 -0700 Subject: [PATCH 033/200] Reorganized so logging is in block --- src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index baa14b33..a6f0e82b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,13 +38,14 @@ fn main() -> Result<(), Box> { log::debug!("Deserialized JSON into MutateParams: {:#?}", &mutate_params); let config_pb = PathBuf::from(&json_path); - log::info!("config: {:?}", config_pb); let config_pb = config_pb.canonicalize()?; - log::info!("canonical config: {:?}", config_pb); let config_parent_pb = config_pb.parent().unwrap(); - log::info!("config parent: {}", config_parent_pb.display()); let json_parent_directory = config_parent_pb.canonicalize()?; + log::info!("config: {:?}", config_pb); + log::info!("canonical config: {:?}", config_pb); + log::info!("config parent: {}", config_parent_pb.display()); + log::info!("Performing Path Resolution for Configurations"); log::info!("Found {} configurations", mutate_params.len()); From 2209314f23b9afebbb7eabebc3757002f8330f2d Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 18 Jul 2023 14:50:44 -0700 Subject: [PATCH 034/200] Removed print statemnts --- src/main.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index a6f0e82b..700c3871 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,12 +60,10 @@ fn main() -> Result<(), Box> { .clone() .expect("No filename in configuration"); let filepath = PathBuf::from(&filename); - println!("filepath: {:?}", filepath); let filepath = if filepath.is_absolute() { filepath } else { let joined = config_parent_pb.join(filepath); - println!("joined: {:?}", &joined); joined.canonicalize().unwrap() }; From 0abee98fa93e10d83d59b70692f947c712e45989 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 18 Jul 2023 15:00:15 -0700 Subject: [PATCH 035/200] Changed logging levels --- src/main.rs | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/main.rs b/src/main.rs index 700c3871..e59627d1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -76,7 +76,7 @@ fn main() -> Result<(), Box> { // Note: we cannot use `resolve_config_file_path` because // `outdir` might not exist yet - log::info!(" [.] Resolving params.outdir"); + log::debug!(" [.] Resolving params.outdir"); let outdir_path = match ¶ms.outdir { Some(outdir) => { let outdir_path = PathBuf::from(outdir); @@ -91,14 +91,14 @@ fn main() -> Result<(), Box> { ), }; let outdir = outdir_path.to_str().unwrap().to_string(); - log::info!( + log::debug!( " [->] Resolved path `{:?}` to `{}`", ¶ms.outdir.clone(), &outdir, ); // PARAM: solc_allowpaths - log::info!(" [.] Resolving params.solc_allow_paths"); + log::debug!(" [.] Resolving params.solc_allow_paths"); let allow_paths = if let Some(allow_paths) = ¶ms.solc_allow_paths { Some(resolve_config_file_paths( allow_paths, @@ -109,7 +109,7 @@ fn main() -> Result<(), Box> { }; // PARAM: solc_basepath - log::info!(" [.] Resolving params.solc_base_path"); + log::debug!(" [.] Resolving params.solc_base_path"); let basepath = if let Some(basepaths) = ¶ms.solc_base_path { Some(resolve_config_file_path(basepaths, &json_parent_directory)?) .map(|bp| bp.to_str().unwrap().to_string()) @@ -118,7 +118,7 @@ fn main() -> Result<(), Box> { }; // PARAM: solc_remappings - log::info!(" [.] Resolving params.solc_remapping"); + log::debug!(" [.] Resolving params.solc_remapping"); let remapping: Option> = params.solc_remappings.as_ref().map(|remapping| { remapping @@ -145,21 +145,20 @@ fn main() -> Result<(), Box> { } run_mutate(mutate_params)?; } else { - log::debug!("Running CLI MutateParams: {:#?}", ¶ms); + log::info!("Running CLI MutateParams: {:#?}", ¶ms); // # Path Resolution for CLI Provided Parameters - log::info!(" Performing Filename Resolution"); + log::info!(" Performing File Resolution"); // let filename = params.filename.expect("No provided filename"); - log::info!(" [.] Resolving params.filename"); + log::debug!(" [.] Resolving params.filename"); let filename = params .filename .clone() .expect("No filename in configuration"); let filepath = PathBuf::from(&filename).canonicalize().unwrap(); - println!("filepath: {:?}", filepath); - log::info!(" [.] Resolving params.outdir {:?}", ¶ms.outdir); + log::debug!(" [.] Resolving params.outdir {:?}", ¶ms.outdir); let outdir = normalize_path(&PathBuf::from( ¶ms.outdir.unwrap_or(default_gambit_output_directory()), @@ -167,9 +166,9 @@ fn main() -> Result<(), Box> { .to_str() .unwrap() .to_string(); - log::info!(" [.] Resolved params.outdir to {}", outdir); + log::debug!(" [.] Resolved params.outdir to {}", outdir); - log::info!( + log::debug!( " [.] Resolving params.solc_allowpaths: {:?}", params.solc_allow_paths ); @@ -185,12 +184,12 @@ fn main() -> Result<(), Box> { }) .collect() }); - log::info!( + log::debug!( " [.] Resolved params.solc_allowpaths to {:?}", solc_allowpaths ); - log::info!( + log::debug!( " [.] Resolving params.solc_base_path: {:?}", params.solc_base_path ); @@ -202,18 +201,18 @@ fn main() -> Result<(), Box> { .unwrap() .to_string() }); - log::info!( + log::debug!( " [.] Resolved params.solc_base_path to {:?}", solc_base_path ); - log::info!(" [.] Resolving params.solc_remapping"); + log::debug!(" [.] Resolving params.solc_remapping"); let solc_remapping = params.solc_remappings.as_ref().map(|rms| { rms.iter() .map(|rm| repair_remapping(rm.as_str(), None)) .collect() }); - log::info!( + log::debug!( " [->] Resolved params.solc_remapping:\n {:#?} to \n {:#?}", ¶ms.solc_remappings, &solc_remapping From c2e6974ce7d075bcb868d7041e9ba9b5eb1781ab Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 18 Jul 2023 15:13:41 -0700 Subject: [PATCH 036/200] Comment --- src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index a1ac1cd3..1ebdbd98 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,8 +29,13 @@ pub use test_util::*; mod util; pub use util::*; -/// Execute the `mutate` command. This returns a mapping from output directories +/// Execute the `mutate` command and return a mapping from output directories /// to generated mutants. +/// +/// `gambit mutate` runs on a vector of mutate parameters. Each mutate parameter +/// specifies an output directory. Parameters with the same output directory are +/// grouped and run together, and will have unique mutant ids between them. +/// Mutant ids may be shared between mutants with different output directories. pub fn run_mutate( mutate_params: Vec, ) -> Result>, Box> { From f71519bff98eb215020b57854f513f6344c16bb0 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 19 Jul 2023 13:20:49 -0700 Subject: [PATCH 037/200] Fixed mutation operator expansion, suppressed debug --- src/mutant_writer.rs | 1 - src/mutation.rs | 2 +- src/mutator.rs | 18 +++++++++++++++++- src/util.rs | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/mutant_writer.rs b/src/mutant_writer.rs index e9b63a8f..e2ed31fc 100644 --- a/src/mutant_writer.rs +++ b/src/mutant_writer.rs @@ -184,7 +184,6 @@ impl MutantWriter { Some(sol_path) => sol_path, None => mutant.path().strip_prefix("/").unwrap(), }; - println!("Mutant filename: {:?} => {:?}", mutant.path(), rel_filename); mutants_dir .join(Path::new(&mid.to_string())) .join(rel_filename) diff --git a/src/mutation.rs b/src/mutation.rs index 18c886b6..970ca145 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -349,7 +349,7 @@ impl MutationType { MutationType::BitwiseOperatorReplacement => "BOR", MutationType::ElimDelegateMutation => "EDM", MutationType::ExpressionValueReplacement => "EVR", - MutationType::LiteralValueReplacement => "LOR", + MutationType::LiteralValueReplacement => "LVR", MutationType::LogicalOperatorReplacement => "LOR", MutationType::RelationalOperatorReplacement => "ROR", MutationType::ShiftOperatorReplacement => "SOR", diff --git a/src/mutator.rs b/src/mutator.rs index cbd0357f..b066b70c 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -267,6 +267,7 @@ impl Mutator { ); // mutate functions for function in ns.functions.iter() { + let start_no_mutants = self.mutants.len(); let file = ns.files.get(function.loc.file_no()); match file { Some(file) => { @@ -279,10 +280,25 @@ impl Mutator { } } if function.has_body { - log::info!("Processing function body"); + let contract_name = if let Some(contract_no) = function.contract_no { + let contract = ns.contracts.get(contract_no).unwrap(); + format!("{}::", &contract.name) + } else { + "".to_string() + }; + log::info!( + "Processing function body for {}{}...", + contract_name, + &function.signature + ); for statement in function.body.iter() { statement.recurse(self, mutate_statement); } + let end_no_mutants = self.mutants.len(); + log::info!( + " ...generated {} mutants", + end_no_mutants - start_no_mutants + ); } } self.namespace = None; diff --git a/src/util.rs b/src/util.rs index 223b669a..6c86d1b2 100644 --- a/src/util.rs +++ b/src/util.rs @@ -354,7 +354,7 @@ pub fn normalize_mutation_operator_name(op_name: &String) -> String { let tmp = tmp.replace("_", "-"); let op_name_lower = tmp.as_str(); match op_name_lower { - "aor" | "arithmetic-operator-replacement" => "logical-operator-replacement", + "aor" | "arithmetic-operator-replacement" => "arithmetic-operator-replacement", "bor" | "bitwise-operator-replacement" => "bitwise-operator-replacement", "evr" | "expression-value-replacement" => "expression-value-replacement", "lor" | "logical-operator-replacement" => "logical-operator-replacement", From d9be1e08c5eb8d0c66228359f7290d1c1ff72275 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 19 Jul 2023 13:21:02 -0700 Subject: [PATCH 038/200] Updated aor.json --- benchmarks/config-jsons/aor.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/config-jsons/aor.json b/benchmarks/config-jsons/aor.json index a152dccc..709561c7 100644 --- a/benchmarks/config-jsons/aor.json +++ b/benchmarks/config-jsons/aor.json @@ -1,9 +1,9 @@ [ { "filename": "../AOR/AOR.sol", - "sourceroot": "..", + "solc-base-path": "..", "mutations": [ - "arithmetic-operator-replacement" + "aor" ] } ] \ No newline at end of file From 960ae54ad5963241c91e626f546a9a50dae76e82 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 24 Jul 2023 12:09:22 -0700 Subject: [PATCH 039/200] Bug fix in conf file basepath --- src/main.rs | 2 +- src/mutation.rs | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index e59627d1..6c9a907c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -114,7 +114,7 @@ fn main() -> Result<(), Box> { Some(resolve_config_file_path(basepaths, &json_parent_directory)?) .map(|bp| bp.to_str().unwrap().to_string()) } else { - None + Some(json_parent_directory.to_str().unwrap().to_string()) }; // PARAM: solc_remappings diff --git a/src/mutation.rs b/src/mutation.rs index 970ca145..fa99dcd6 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -56,7 +56,16 @@ impl MutantLoc { .expect("Expected an import no but found None"), ) .expect("Expected an import path but found None"); - let sol_path = path.strip_prefix(import_path).unwrap().to_path_buf(); + let sol_path = path + .strip_prefix(&import_path) + .expect( + format!( + "Could not strip prefix {:?} from path {:?}", + &import_path, &path + ) + .as_str(), + ) + .to_path_buf(); MutantLoc { loc, From 6672d47d6d9724cd09868038bce015178eea0fd0 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 25 Jul 2023 17:07:07 -0700 Subject: [PATCH 040/200] Updated tests to match new impl --- src/mutation.rs | 796 ++++++++++++++++++++++++++----------- src/mutator.rs | 5 +- src/test_util.rs | 8 +- tests/integration_tests.rs | 330 --------------- 4 files changed, 572 insertions(+), 567 deletions(-) delete mode 100644 tests/integration_tests.rs diff --git a/src/mutation.rs b/src/mutation.rs index fa99dcd6..7f3ecf56 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -5,7 +5,7 @@ use num_traits::{One, Zero}; use serde::{Deserialize, Serialize}; use solang::{ file_resolver::FileResolver, - sema::ast::{Expression, Namespace, RetrieveType, Statement, Type}, + sema::ast::{CallTy, Expression, Namespace, RetrieveType, Statement, Type}, }; use solang_parser::pt::{CodeLocation, Loc}; use std::{ @@ -522,6 +522,7 @@ fn arith_op_replacement( false }; if is_signed_int { + // When we're signed, filter out `**`, which is illegal replacements = replacements .iter() .filter(|x| **x != "**") @@ -555,7 +556,7 @@ fn arith_op_replacement( op_loc, op.clone(), arith_op.to_string(), - format!(" {} ", r), + format!("{}", r), ) }) .collect() @@ -613,7 +614,7 @@ fn bitwise_op_replacement( } } -fn shift_op_replacement( +fn literal_value_replacement( op: &MutationType, file_resolver: &FileResolver, namespace: Rc, @@ -621,37 +622,60 @@ fn shift_op_replacement( source: &Arc, ) -> Vec { let loc = expr.loc(); + let orig = source[loc.start()..loc.end()].to_string(); if let None = loc.try_file_no() { return vec![]; } - match expr { - Expression::ShiftLeft { .. } => { - let op_loc = get_op_loc(expr, source); - vec![Mutant::new( - file_resolver, - namespace, - op_loc, - op.clone(), - "<<".to_string(), - ">>".to_string(), - )] - } - Expression::ShiftRight { .. } => { - let op_loc = get_op_loc(expr, source); - vec![Mutant::new( - file_resolver, - namespace, - op_loc, - op.clone(), - ">>".to_string(), - "<<".to_string(), - )] - } + // We are only replacing BoolLiterals, NumberLiterals, and + // RationalNumberLiterals. It's not clear what other literals we should + // replace + let replacements = match expr { + Expression::BoolLiteral { value, .. } => vec![(!value).to_string()], + Expression::NumberLiteral { ty, value, .. } => match ty { + solang::sema::ast::Type::Address(_) => todo!(), + solang::sema::ast::Type::Int(_) => { + if value.is_zero() { + vec!["-1".to_string(), "1".to_string()] + } else { + vec![ + "0".to_string(), + (-value).to_string(), + (value + BigInt::one()).to_string(), + ] + } + } + solang::sema::ast::Type::Uint(_) => { + if value.is_zero() { + vec!["1".to_string()] + } else { + vec!["0".to_string(), (value + BigInt::one()).to_string()] + } + } + _ => vec![], + }, + Expression::RationalNumberLiteral { value: _, .. } => vec![], + Expression::BytesLiteral { .. } => vec![], + Expression::CodeLiteral { .. } => vec![], + Expression::StructLiteral { .. } => vec![], + Expression::ArrayLiteral { .. } => vec![], + Expression::ConstArrayLiteral { .. } => vec![], _ => vec![], + }; + let mut mutants = vec![]; + for r in replacements { + mutants.push(Mutant::new( + file_resolver, + namespace.clone(), + loc, + op.clone(), + orig.clone(), + r.clone(), + )); } + mutants } -fn unary_op_replacement( +fn logical_op_replacement( op: &MutationType, file_resolver: &FileResolver, namespace: Rc, @@ -659,34 +683,54 @@ fn unary_op_replacement( source: &Arc, ) -> Vec { let loc = expr.loc(); - let bitwise_op = get_operator(expr); - let rs = vec!["-", "~"]; - let replacements: Vec<&&str> = rs.iter().filter(|x| **x != bitwise_op).collect(); - if let None = loc.try_file_no() { return vec![]; } - let muts = match expr { - Expression::BitwiseNot { expr, .. } | Expression::Negate { expr, .. } => { - let op_loc = get_op_loc(expr, source); - let muts = replacements - .iter() - .map(|r| { - Mutant::new( - file_resolver, - namespace.clone(), - op_loc, - op.clone(), - "~".to_string(), - format!(" {} ", r), - ) - }) - .collect(); - muts + + // First, compile a list of replacements for this logical operator. Each replacement is either + // LHS, RHS, true, or false, as well as the location of the replacing + // expression (this is only used for RHS and LHS, since we need to compute + // the replacement value) + let replacements = match expr { + Expression::And { left, right, .. } => { + vec![("LHS", left.loc()), ("RHS", right.loc()), ("false", loc)] + } + Expression::Or { left, right, .. } => { + vec![("LHS", left.loc()), ("RHS", right.loc()), ("true", loc)] + } + _ => { + return vec![]; } - _ => vec![], }; - muts + + // Now, apply each replacement to create a mutant + let mut mutants = vec![]; + let orig = source[loc.start()..loc.end()].to_string(); + for (r, sub_loc) in replacements { + mutants.push(match r { + "LHS" | "RHS" => { + let repl = source[sub_loc.start()..sub_loc.end()].to_string(); + Mutant::new( + file_resolver, + namespace.clone(), + loc, + op.clone(), + orig.clone(), + repl, + ) + } + "true" | "false" => Mutant::new( + file_resolver, + namespace.clone(), + loc, + op.clone(), + orig.clone(), + r.to_string(), + ), + _ => panic!("Illegal State"), + }); + } + mutants } fn rel_op_replacement( @@ -726,7 +770,7 @@ fn rel_op_replacement( // The following types are orderable, so we use those for better mutation operators solang::sema::ast::Type::Int(_) | solang::sema::ast::Type::Uint(_) - | solang::sema::ast::Type::Rational => vec!["< ", "> ", "true"], + | solang::sema::ast::Type::Rational => vec!["<", ">", "true"], // The following types are not orderable, so we replace with true and false // TODO: Can Addresses be ordered? @@ -777,7 +821,7 @@ fn rel_op_replacement( mutants } -fn logical_op_replacement( +fn shift_op_replacement( op: &MutationType, file_resolver: &FileResolver, namespace: Rc, @@ -788,108 +832,31 @@ fn logical_op_replacement( if let None = loc.try_file_no() { return vec![]; } - - // First, compile a list of replacements for this logical operator. Each replacement is either - // LHS, RHS, true, or false, as well as the location of the replacing - // expression (this is only used for RHS and LHS, since we need to compute - // the replacement value) - let replacements = match expr { - Expression::And { left, right, .. } => { - vec![("LHS", left.loc()), ("RHS", right.loc()), ("false", loc)] - } - Expression::Or { left, right, .. } => { - vec![("LHS", left.loc()), ("RHS", right.loc()), ("true", loc)] - } - _ => { - return vec![]; + match expr { + Expression::ShiftLeft { .. } => { + let op_loc = get_op_loc(expr, source); + vec![Mutant::new( + file_resolver, + namespace, + op_loc, + op.clone(), + "<<".to_string(), + ">>".to_string(), + )] } - }; - - // Now, apply each replacement to create a mutant - let mut mutants = vec![]; - let orig = source[loc.start()..loc.end()].to_string(); - for (r, sub_loc) in replacements { - mutants.push(match r { - "LHS" | "RHS" => { - let repl = source[sub_loc.start()..sub_loc.end()].to_string(); - Mutant::new( - file_resolver, - namespace.clone(), - loc, - op.clone(), - orig.clone(), - repl, - ) - } - "true" | "false" => Mutant::new( + Expression::ShiftRight { .. } => { + let op_loc = get_op_loc(expr, source); + vec![Mutant::new( file_resolver, - namespace.clone(), - loc, + namespace, + op_loc, op.clone(), - orig.clone(), - r.to_string(), - ), - _ => panic!("Illegal State"), - }); - } - mutants -} - -fn literal_value_replacement( - op: &MutationType, - file_resolver: &FileResolver, - namespace: Rc, - expr: &Expression, - source: &Arc, -) -> Vec { - let loc = expr.loc(); - let orig = source[loc.start()..loc.end()].to_string(); - if let None = loc.try_file_no() { - return vec![]; - } - // We are only replacing BoolLiterals, NumberLiterals, and - // RationalNumberLiterals. It's not clear what other literals we should - // replace - let replacements = match expr { - Expression::BoolLiteral { value, .. } => vec![(!value).to_string()], - Expression::NumberLiteral { ty, value, .. } => match ty { - solang::sema::ast::Type::Address(_) => todo!(), - solang::sema::ast::Type::Int(_) => { - if value.is_zero() { - vec!["-1".to_string(), "1".to_string()] - } else { - vec!["0".to_string(), (-value).to_string()] - } - } - solang::sema::ast::Type::Uint(_) => { - if value.is_zero() { - vec!["1".to_string()] - } else { - vec!["0".to_string(), (value + BigInt::one()).to_string()] - } - } - _ => vec![], - }, - Expression::RationalNumberLiteral { value: _, .. } => vec![], - Expression::BytesLiteral { .. } => vec![], - Expression::CodeLiteral { .. } => vec![], - Expression::StructLiteral { .. } => vec![], - Expression::ArrayLiteral { .. } => vec![], - Expression::ConstArrayLiteral { .. } => vec![], + ">>".to_string(), + "<<".to_string(), + )] + } _ => vec![], - }; - let mut mutants = vec![]; - for r in replacements { - mutants.push(Mutant::new( - file_resolver, - namespace.clone(), - loc, - op.clone(), - orig.clone(), - r.clone(), - )); } - mutants } fn statement_deletion( @@ -944,16 +911,87 @@ fn statement_deletion( } } +fn unary_op_replacement( + op: &MutationType, + file_resolver: &FileResolver, + namespace: Rc, + expr: &Expression, + source: &Arc, +) -> Vec { + let loc = expr.loc(); + let unary_op = get_operator(expr); + let rs = vec!["-", "~"]; + let replacements: Vec<&&str> = rs.iter().filter(|x| **x != unary_op).collect(); + + if let None = loc.try_file_no() { + return vec![]; + } + let muts = match expr { + Expression::BitwiseNot { .. } | Expression::Negate { .. } => { + let op_loc = get_op_loc(expr, source); + let muts = replacements + .iter() + .map(|r| { + Mutant::new( + file_resolver, + namespace.clone(), + op_loc, + op.clone(), + "~".to_string(), + format!(" {} ", r), + ) + }) + .collect(); + muts + } + _ => vec![], + }; + muts +} + #[allow(dead_code)] fn elim_delegate_mutation( - _op: &MutationType, - _file_resolver: &FileResolver, - _namespace: Rc, - _expr: &Expression, - _source: &Arc, + op: &MutationType, + file_resolver: &FileResolver, + namespace: Rc, + expr: &Expression, + source: &Arc, ) -> Vec { // TODO: implement - vec![] + match expr { + Expression::ExternalFunctionCallRaw { + loc, + ty: CallTy::Delegate, + address, + .. + } => { + // Ugh, okay, so we need to do messy string manipulation to get the + // location of the function name because that isn't tracked in the + // AST. The idea is that we start scanning from the right of the + // address (e.g., `foo` in `foo.bar()`), and look for the first + // index of `delegatecall`. We then add an offset of 12 (length of + // "delegatecall"). + let addr_loc = address.loc(); + let idx = addr_loc.end() + 1; + let no_address = &source[idx..loc.end()]; + let delegate_call_start = idx + no_address.find("delegatecall").unwrap(); + let delegate_call_end = delegate_call_start + 12; + println!( + "Delegate call: `{}`", + &source[delegate_call_start..delegate_call_end] + ); + + vec![Mutant::new( + &file_resolver, + namespace, + Loc::File(loc.file_no(), delegate_call_start, delegate_call_end), + op.clone(), + "delegatecall".to_string(), + "call".to_string(), + )] + } + _ => vec![], + } } #[allow(dead_code)] @@ -1002,7 +1040,7 @@ fn expression_value_replacement( #[cfg(test)] mod test { use crate::test_util::*; - use crate::{MutationType, MutationType::*, Mutator, MutatorConf, Solc}; + use crate::{MutationType, Mutator, MutatorConf, Solc}; use solang::file_resolver::FileResolver; use std::collections::HashSet; use std::error; @@ -1011,7 +1049,10 @@ mod test { #[test] pub fn test_elim_delegate_mutation() -> Result<(), Box> { - let _ops = vec![ElimDelegateMutation]; + let ops = vec![ + MutationType::ElimDelegateMutation, + MutationType::ArithmeticOperatorReplacement, + ]; // TODO: how should I test this? let code = "\ // SPDX-License-Identifier: GPL-3.0-only @@ -1023,6 +1064,8 @@ contract B { uint public value; function setVars(uint _num) public payable { + usize c = 1 + 2; + num = _num; sender = msg.sender; value = msg.value; @@ -1046,83 +1089,360 @@ contract A { } } "; - let ops = vec![MutationType::ElimDelegateMutation]; let expected = vec!["call"]; assert_exact_mutants_for_source(code, &ops, &expected); Ok(()) } - // #[test] - // pub fn test_if_statement_mutation() -> Result<(), Box> { - // let ops = vec![IfStatementMutation]; - // assert_num_mutants_for_statements( - // &vec!["uint256 x;", "if (true) { x = 1; } else { x = 2 ;}"], - // &ops, - // 1, - // ); - // assert_num_mutants_for_statements(&vec!["if (true) {}"], &ops, 1); - // Ok(()) - // } + #[test] + fn test_aor() { + let ops = vec![MutationType::ArithmeticOperatorReplacement]; + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["uint256 c = a + b;"], + &ops, + &vec!["-", "*", "/", "**", "%"], + ); + assert_exact_mutants_for_statements( + &vec!["int256 a", "int256 b"], + &vec!["int256 c = a + b;"], + &ops, + &vec!["-", "*", "/", "%"], + ); + + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["uint256 c = a - b;"], + &ops, + &vec!["+", "*", "/", "**", "%"], + ); + + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["uint256 c = a * b;"], + &ops, + &vec!["+", "-", "/", "**", "%"], + ); + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["uint256 c = a ** b;"], + &ops, + &vec!["+", "-", "/", "*", "%"], + ); + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["uint256 c = a % b;"], + &ops, + &vec!["+", "-", "/", "*", "**"], + ); + } + + #[test] + fn test_bor() { + let ops = vec![MutationType::BitwiseOperatorReplacement]; + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["uint256 c = a | b;"], + &ops, + &vec!["&"], + ); + + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["uint256 c = a & b;"], + &ops, + &vec!["|"], + ); + + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["uint256 c = a ^ b;"], + &ops, + &vec!["&"], + ); + } + + #[test] + fn test_lvr() { + let ops = vec![MutationType::LiteralValueReplacement]; + // Numbers + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["uint256 c = a * b + 11;"], + &ops, + &vec!["0", "12"], + ); + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["uint256 c = a * b + 0;"], + &ops, + &vec!["1"], + ); + assert_exact_mutants_for_statements( + &vec!["int256 a", "int256 b"], + &vec!["int256 c = a * b + 11;"], + &ops, + &vec!["0", "-11", "12"], + ); + assert_exact_mutants_for_statements( + &vec!["int256 a", "int256 b"], + &vec!["int256 c = a * b + 0;"], + &ops, + &vec!["1", "-1"], + ); + + // Booleans + assert_exact_mutants_for_statements(&vec![], &vec!["bool b = true;"], &ops, &vec!["false"]); + assert_exact_mutants_for_statements(&vec![], &vec!["bool b = false;"], &ops, &vec!["true"]); + } + + #[test] + fn test_lor() { + let ops = vec![MutationType::LogicalOperatorReplacement]; + + assert_exact_mutants_for_statements( + &vec!["bool a", "bool b"], + &vec!["bool c = a || b;"], + &ops, + &vec!["a", "b", "true"], + ); + + assert_exact_mutants_for_statements( + &vec!["bool a", "bool b"], + &vec!["bool c = a && b;"], + &ops, + &vec!["a", "b", "false"], + ); + } + + #[test] + fn test_ror() { + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["if (a < b) {}"], + &vec![MutationType::RelationalOperatorReplacement], + &vec!["<=", "false", "!="], + ); + + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["if (a == b) {}"], + &vec![MutationType::RelationalOperatorReplacement], + &vec!["<=", "false", ">="], + ); + + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["if (a > b) {}"], + &vec![MutationType::RelationalOperatorReplacement], + &vec!["!=", "false", ">="], + ); + + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["if (a <= b) {}"], + &vec![MutationType::RelationalOperatorReplacement], + &vec!["<", "true", "=="], + ); + + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["if (a != b) {}"], + &vec![MutationType::RelationalOperatorReplacement], + &vec!["<", "true", ">"], + ); + + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["if (a >= b) {}"], + &vec![MutationType::RelationalOperatorReplacement], + &vec!["==", "true", ">"], + ); + + assert_exact_mutants_for_statements( + &vec!["bool a", "bool b"], + &vec!["if (a != b) {}"], + &vec![MutationType::RelationalOperatorReplacement], + &vec!["true", "false"], + ); + + assert_exact_mutants_for_statements( + &vec!["bool a", "bool b"], + &vec!["if (a == b) {}"], + &vec![MutationType::RelationalOperatorReplacement], + &vec!["true", "false"], + ); + } + + #[test] + fn test_std() { + let ops = vec![MutationType::StatementDeletion]; + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["uint256 c = a + b;"], + &ops, + &vec![], + ); + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["uint256 c;", "c = a + b;"], + &ops, + &vec!["assert(true)"], + ); + assert_exact_mutants_for_statements( + &vec!["bool a"], + &vec!["while (a) { continue; }"], + &ops, + &vec!["assert(true)"], + ); + assert_exact_mutants_for_statements( + &vec!["bool a"], + &vec!["while (a) { break; }"], + &ops, + &vec!["assert(true)"], + ); + assert_exact_mutants_for_statements( + &vec!["bool a"], + &vec!["revert();"], + &ops, + &vec!["assert(true)"], + ); + // TODO: add a test for `delete expr` + // TODO: add a test for `emit ...` + } + + #[test] + fn test_sor() { + let ops = vec![MutationType::ShiftOperatorReplacement]; + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["uint256 c = a << b;"], + &ops, + &vec![">>"], + ); + + assert_exact_mutants_for_statements( + &vec!["uint256 a", "uint256 b"], + &vec!["uint256 c = a >> b;"], + &ops, + &vec!["<<"], + ); + } + + #[test] + fn test_uor() { + let ops = vec![MutationType::UnaryOperatorReplacement]; + assert_exact_mutants_for_statements( + &vec!["int256 a"], + &vec!["int256 b = -a;"], + &ops, + &vec!["~"], + ); + assert_exact_mutants_for_statements( + &vec!["int256 a"], + &vec!["int256 b = ~a;"], + &ops, + &vec!["-"], + ); + } #[allow(dead_code)] fn assert_num_mutants_for_statements( + params: &Vec<&str>, statements: &Vec<&str>, ops: &Vec, - _expected: usize, + expected: usize, ) { - let _mutator = apply_mutation_to_statements(statements, None, ops).unwrap(); - panic!(); - // assert_eq!( - // expected, - // mutator.mutants().len(), - // "Error: applied ops\n -> {:?}\nto program\n -> {:?}\nat {:?} for more info", - // ops, - // statements.join(" "), - // mutator - // .filenames() - // .iter() - // .map(|s| PathBuf::from(s).as_path()) - // .collect::>() - // ); + let mutator = apply_mutation_to_statements(statements, params, None, ops).unwrap(); + assert_eq!( + expected, + mutator.mutants().len(), + "Error: applied ops\n -> {:?}\nto program\n -> {:?}\nat {:?} for more info", + ops, + statements.join(" "), + mutator.filenames().join(" ") + ); } #[allow(dead_code)] fn assert_exact_mutants_for_statements( + params: &Vec<&str>, statements: &Vec<&str>, ops: &Vec, expected: &Vec<&str>, ) { - let mutator = apply_mutation_to_statements(statements, None, ops).unwrap(); - panic!(); - // assert_eq!( - // expected.len(), - // mutator.mutants().len(), - // "Error: applied ops\n -> {:?}\nto program\n -> {:?}\nat {:?} for more info", - // ops, - // statements.join(" "), - // mutator - // .filenames() - // .iter() - // .map(|s| PathBuf::from(s).as_path()) - // .collect::>() - // ); + let mutator = apply_mutation_to_statements(statements, params, None, ops).unwrap(); + let expected_set: HashSet<&str> = expected.iter().map(|s| s.trim()).collect(); + let actuals_set: HashSet<&str> = mutator + .mutants() + .iter() + .map(|m| m.repl.as_str().trim()) + .collect(); + let expected_str = expected_set + .iter() + .cloned() + .collect::>() + .join(", "); + let actuals_str = actuals_set + .iter() + .cloned() + .collect::>() + .join(", "); + let program = + ansi_term::Color::Yellow.paint(format!("```\n{}\n```", statements.join(";\n"))); + assert_eq!( + expected.len(), + mutator.mutants().len(), + "Error: applied ops: + -> {:?} + to program:\n{}\n + [+] Expected mutants: {} + [X] Actual mutants: {} + See {} for more info", + ops, + program, + ansi_term::Color::Green.paint(expected_str), + ansi_term::Color::Red.paint(actuals_str), + mutator.filenames().join(" ") + ); - // let actuals: HashSet<&str> = mutator.mutants().iter().map(|m| m.repl.as_str()).collect(); - // let expected: HashSet<&str> = expected.iter().map(|s| *s).collect(); - // assert_eq!(actuals, expected); + assert_eq!( + actuals_set, + expected_set, + "Error: applied ops: + -> {:?} + to program:\n{}\n + [+] Expected mutants: {} + [X] Actual mutants: {} + See {} for more info", + ops, + program, + ansi_term::Color::Green.paint(expected_str), + ansi_term::Color::Red.paint(actuals_str), + mutator.filenames().join(" ") + ); } fn apply_mutation_to_statements( statements: &Vec<&str>, + params: &Vec<&str>, returns: Option<&str>, ops: &Vec, ) -> Result> { - let source = wrap_and_write_solidity_to_temp_file(statements, returns).unwrap(); + let source = wrap_and_write_solidity_to_temp_file(statements, params, returns).unwrap(); + let prefix = format!( + "gambit-compile-dir-{}", + source.file_name().unwrap().to_str().unwrap() + ); let outdir = Builder::new() - .prefix("gambit-compile-dir") + .prefix(prefix.as_str()) .rand_bytes(5) - .tempdir()?; + .tempdir_in(source.parent().unwrap())?; let mut mutator = make_mutator(ops, source, outdir.into_path()); + mutator + .file_resolver + .add_import_path(&PathBuf::from("/")) + .unwrap(); let sources = mutator.filenames().clone(); mutator.mutate(sources)?; @@ -1131,19 +1451,14 @@ contract A { fn _assert_num_mutants_for_source(source: &str, ops: &Vec, expected: usize) { let mutator = apply_mutation_to_source(source, ops).unwrap(); - panic!(); - // assert_eq!( - // expected, - // mutator.mutants().len(), - // "Error: applied ops\n -> {:?}\nto program\n -> {:?}\n\nSee {:?} for more info", - // ops, - // source, - // mutator - // .filenames() - // .iter() - // .map(|s| PathBuf::from(s).as_path()) - // .collect::>() - // ); + assert_eq!( + expected, + mutator.mutants().len(), + "Error: applied ops\n -> {:?}\nto program\n -> {:?}\n\nSee {:?} for more info", + ops, + source, + mutator.filenames().join(" ") + ); } fn assert_exact_mutants_for_source( @@ -1152,19 +1467,14 @@ contract A { expected: &Vec<&str>, ) { let mutator = apply_mutation_to_source(source, ops).unwrap(); - panic!(); - // assert_eq!( - // expected.len(), - // mutator.mutants().len(), - // "Error: applied ops\n -> {:?}\nto program\n -> {:?}\nat {:?} for more info", - // ops, - // source, - // mutator - // .filenames() - // .iter() - // .map(|s| PathBuf::from(s).as_path()) - // .collect::>() - // ); + assert_eq!( + expected.len(), + mutator.mutants().len(), + "Error: applied ops\n -> {:?}\nto program\n -> {:?}\nat {} for more info", + ops, + source, + mutator.filenames().join(" ") + ); let actuals: HashSet<&str> = mutator.mutants().iter().map(|m| m.repl.as_str()).collect(); let expected: HashSet<&str> = expected.iter().map(|s| *s).collect(); @@ -1180,7 +1490,26 @@ contract A { .prefix("gambit-compile-dir") .rand_bytes(5) .tempdir()?; - let mut mutator = make_mutator(ops, source, outdir.into_path()); + let mut mutator = make_mutator(ops, source.clone(), outdir.into_path()); + // let source_os_str = source.as_os_str(); + // println!("source: {:?}", source_os_str); + // let ns = parse_and_resolve( + // source_os_str, + // &mut mutator.file_resolver, + // solang::Target::EVM, + // ); + // println!("FUNCTIONS"); + // println!("ns: {:?}", ns.files); + // for function in ns.functions { + // println!("[{}]:\n", function.name); + // for (i, s) in function.body.iter().enumerate() { + // println!(" {}: {:?}", i + 1, &s); + // } + // } + mutator + .file_resolver + .add_import_path(&PathBuf::from("/")) + .unwrap(); let sources = mutator.filenames().clone(); mutator.mutate(sources)?; @@ -1195,10 +1524,11 @@ contract A { funcs_to_mutate: None, contract: None, }; - let sourceroot = filename.parent().unwrap(); let sources = vec![filename.to_str().unwrap().to_string()]; let solc = Solc::new("solc".into(), PathBuf::from(outdir)); - Mutator::new(conf, FileResolver::new(), sources, solc) + let mut cache = FileResolver::new(); + cache.add_import_path(&PathBuf::from("/")).unwrap(); + Mutator::new(conf, cache, sources, solc) } } diff --git a/src/mutator.rs b/src/mutator.rs index b066b70c..9d20864c 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -371,7 +371,10 @@ pub fn mutate_statement(statement: &Statement, mutator: &mut Mutator) -> bool { Statement::DoWhile(_, _, _, _) => true, Statement::Expression(_, _, _) => true, Statement::Delete(_, _, _) => true, - Statement::Destructure(_, _, _) => true, + Statement::Destructure(_, _, e) => { + e.recurse(mutator, mutate_expression); + true + } Statement::Continue(_) => true, Statement::Break(_) => true, Statement::Return(_, rv) => { diff --git a/src/test_util.rs b/src/test_util.rs index a818ebb3..ec69cd3e 100644 --- a/src/test_util.rs +++ b/src/test_util.rs @@ -5,10 +5,11 @@ use tempfile::Builder; /// optionally providing a return type pub fn wrap_and_write_solidity_to_temp_file( statements: &[&str], + params: &Vec<&str>, returns: Option<&str>, ) -> std::io::Result { // Wrap statements in a Solidity function and contract - let solidity_code = wrap_solidity(statements, returns); + let solidity_code = wrap_solidity(statements, returns, params); write_solidity_to_temp_file(solidity_code) } @@ -35,7 +36,7 @@ pub fn write_solidity_to_temp_file(sol: String) -> std::io::Result { } /// Wrap solidity code in a contract/function -pub fn wrap_solidity(statements: &[&str], returns: Option<&str>) -> String { +pub fn wrap_solidity(statements: &[&str], returns: Option<&str>, params: &Vec<&str>) -> String { let returns = if let Some(returns) = returns { format!("({})", returns) } else { @@ -47,11 +48,12 @@ pub fn wrap_solidity(statements: &[&str], returns: Option<&str>) -> String { pragma solidity ^0.8.0; contract Wrapper {{ - function wrapped() public {} {{ + function wrapped({}) public {} {{ {} }} }} ", + params.join(", "), returns, statements.join("\n ") ); diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs deleted file mode 100644 index a36f0068..00000000 --- a/tests/integration_tests.rs +++ /dev/null @@ -1,330 +0,0 @@ -use ansi_term::{Color, Style}; -use gambit::MutateParams; -use project_root::get_project_root; -use serde_json; -use std::{collections::HashSet, env, error, path::PathBuf}; - -/// All test cases are generated by running Gambit on the individual files -/// listed in `all.json` and then using `scripts/mutants_log_to_regression.py` -/// to print `gambit_out/mutants.log` as regression test cases -#[test] -fn test_all() { - assert_exact_mutants_from_json( - "all.json", - &vec![ - ("BinaryOpMutation", "+", "-", (7, 10)), - ("BinaryOpMutation", "+", "*", (7, 10)), - ("BinaryOpMutation", "+", "/", (7, 10)), - ("BinaryOpMutation", "+", "%", (7, 10)), - ("BinaryOpMutation", "+", "**", (7, 10)), - ("BinaryOpMutation", "-", "+", (11, 10)), - ("BinaryOpMutation", "-", "*", (11, 10)), - ("BinaryOpMutation", "-", "/", (11, 10)), - ("BinaryOpMutation", "-", "%", (11, 10)), - ("BinaryOpMutation", "-", "**", (11, 10)), - ("BinaryOpMutation", "*", "+", (15, 10)), - ("BinaryOpMutation", "*", "-", (15, 10)), - ("BinaryOpMutation", "*", "/", (15, 10)), - ("BinaryOpMutation", "*", "%", (15, 10)), - ("BinaryOpMutation", "*", "**", (15, 10)), - ("BinaryOpMutation", "/", "+", (19, 10)), - ("BinaryOpMutation", "/", "-", (19, 10)), - ("BinaryOpMutation", "/", "*", (19, 10)), - ("BinaryOpMutation", "/", "%", (19, 10)), - ("BinaryOpMutation", "/", "**", (19, 10)), - ("BinaryOpMutation", "%", "+", (23, 10)), - ("BinaryOpMutation", "%", "-", (23, 10)), - ("BinaryOpMutation", "%", "*", (23, 10)), - ("BinaryOpMutation", "%", "/", (23, 10)), - ("BinaryOpMutation", "%", "**", (23, 10)), - ("BinaryOpMutation", "**", "+", (27, 10)), - ("BinaryOpMutation", "**", "-", (27, 10)), - ("BinaryOpMutation", "**", "*", (27, 10)), - ("BinaryOpMutation", "**", "/", (27, 10)), - ("BinaryOpMutation", "**", "%", (27, 10)), - ("RequireMutation", "cond1", "true", (7, 10)), - ("RequireMutation", "cond1", "false", (7, 10)), - ("RequireMutation", "cond2", "true", (8, 10)), - ("RequireMutation", "cond2", "false", (8, 10)), - ("RequireMutation", "cond3", "true", (9, 10)), - ("RequireMutation", "cond3", "false", (9, 10)), - ("AssignmentMutation", "42", "0", (13, 6)), - ("AssignmentMutation", "42", "1", (13, 6)), - ("AssignmentMutation", "13", "0", (14, 6)), - ("AssignmentMutation", "13", "1", (14, 6)), - ("AssignmentMutation", "3110", "0", (15, 6)), - ("AssignmentMutation", "3110", "1", (15, 6)), - ("AssignmentMutation", "true", "false", (16, 6)), - ("AssignmentMutation", "false", "true", (17, 6)), - ("DeleteExpressionMutation", "i++", "/* i++ */", (9, 29)), - ("IfStatementMutation", "a", "true", (7, 6)), - ("IfStatementMutation", "a", "false", (7, 6)), - ("SwapArgumentsOperatorMutation", "x - y", "y - x", (7, 9)), - ("SwapArgumentsOperatorMutation", "x / y", "y / x", (11, 9)), - ("SwapArgumentsOperatorMutation", "x % y", "y % x", (15, 9)), - ("SwapArgumentsOperatorMutation", "x ** y", "y ** x", (19, 9)), - ("SwapArgumentsOperatorMutation", "x > y", "y > x", (23, 9)), - ("SwapArgumentsOperatorMutation", "x < y", "y < x", (27, 9)), - ("SwapArgumentsOperatorMutation", "x >= y", "y >= x", (31, 9)), - ("SwapArgumentsOperatorMutation", "x <= y", "y <= x", (35, 9)), - ("SwapArgumentsOperatorMutation", "x << y", "y << x", (39, 9)), - ("SwapArgumentsOperatorMutation", "x >> y", "y >> x", (43, 9)), - ("UnaryOperatorMutation", "~", "++", (7, 9)), - ("UnaryOperatorMutation", "~", "--", (7, 9)), - ("UnaryOperatorMutation", "++", "--", (11, 9)), - ("UnaryOperatorMutation", "++", "~", (11, 9)), - ("UnaryOperatorMutation", "--", "++", (15, 9)), - ("UnaryOperatorMutation", "--", "~", (15, 9)), - ("UnaryOperatorMutation", "++", "--", (19, 3)), - ("UnaryOperatorMutation", "--", "++", (24, 3)), - ("ElimDelegateMutation", "delegatecall", "call", (25, 55)), - ], - ); -} - -#[test] -fn multiple_contracts_1() { - assert_exact_mutants_from_json( - "multiple-contracts-1.json", - &vec![ - //C.get10PowerDecimals - ("BinaryOpMutation", "**", "+", (24, 24)), - ("BinaryOpMutation", "**", "-", (24, 24)), - ("BinaryOpMutation", "**", "*", (24, 24)), - ("BinaryOpMutation", "**", "/", (24, 24)), - ("BinaryOpMutation", "**", "%", (24, 24)), - ( - "SwapArgumentsOperatorMutation", - "a ** decimals", - "decimals ** a", - (24, 23), - ), - ], - ) -} - -#[test] -fn multiple_contracts_2() { - assert_exact_mutants_from_json( - "multiple-contracts-2.json", - &vec![ - /* Utils.add */ - ("BinaryOpMutation", "+", "-", (11, 17)), - ("BinaryOpMutation", "+", "*", (11, 17)), - ("BinaryOpMutation", "+", "/", (11, 17)), - ("BinaryOpMutation", "+", "%", (11, 17)), - /* C.get10PowerDecimals */ - ("BinaryOpMutation", "**", "+", (24, 24)), - ("BinaryOpMutation", "**", "-", (24, 24)), - ("BinaryOpMutation", "**", "*", (24, 24)), - ("BinaryOpMutation", "**", "/", (24, 24)), - ("BinaryOpMutation", "**", "%", (24, 24)), - ( - "SwapArgumentsOperatorMutation", - "a ** decimals", - "decimals ** a", - (24, 23), - ), - ], - ) -} - -#[test] -fn multiple_contracts_3() { - assert_exact_mutants_from_json( - "multiple-contracts-3.json", - &vec![ - /* Utils.getarray */ - /* Utils.add */ - ("BinaryOpMutation", "+", "-", (11, 17)), - ("BinaryOpMutation", "+", "*", (11, 17)), - ("BinaryOpMutation", "+", "/", (11, 17)), - ("BinaryOpMutation", "+", "%", (11, 17)), - /* C.get10PowerDecimals */ - ("BinaryOpMutation", "**", "+", (24, 24)), - ("BinaryOpMutation", "**", "-", (24, 24)), - ("BinaryOpMutation", "**", "*", (24, 24)), - ("BinaryOpMutation", "**", "/", (24, 24)), - ("BinaryOpMutation", "**", "%", (24, 24)), - ( - "SwapArgumentsOperatorMutation", - "a ** decimals", - "decimals ** a", - (24, 23), - ), - /* C.getarray */ - /* C.callmyself */ - /* C.add */ - ("BinaryOpMutation", "+", "-", (38, 17)), - ("BinaryOpMutation", "+", "*", (38, 17)), - ("BinaryOpMutation", "+", "/", (38, 17)), - ("BinaryOpMutation", "+", "%", (38, 17)), - ], - ) -} - -#[test] -fn multiple_contracts_4() { - assert_exact_mutants_from_json( - "multiple-contracts-4.json", - &vec![ - /* Utils.getarray */ - /* Utils.add */ - ("BinaryOpMutation", "+", "-", (11, 17)), - ("BinaryOpMutation", "+", "*", (11, 17)), - ("BinaryOpMutation", "+", "/", (11, 17)), - ("BinaryOpMutation", "+", "%", (11, 17)), - /* C.get10PowerDecimals */ - /* C.getarray */ - /* C.callmyself */ - /* C.add */ - ("BinaryOpMutation", "+", "-", (38, 17)), - ("BinaryOpMutation", "+", "*", (38, 17)), - ("BinaryOpMutation", "+", "/", (38, 17)), - ("BinaryOpMutation", "+", "%", (38, 17)), - ], - ) -} - -/// Assert the expected mutations of JSON configuration file located in -/// `benchmarks/config-jsons`. -/// -/// The expected mutants can be order independent: we check that the actual and -/// expected mutants have the same number and are the same when put into a set -/// -/// _(note: the length check on actuals and expected is maybe a little redundant, -/// but this checks against the same mutant being generated multiple times, -/// which will not show up when the mutants are stored in sets for equality -/// checking)_ -/// -/// # Arguments -/// -/// * `json` - name of the json file located in `Gambit/benchmarks/config-jsons` -/// * `expected` - a tuple describing the expected mutants. These tuples have -/// the form `(op, orig, repl, (linenum, colnum))`, -/// where -/// - `op` is the name of mutation operator derived from -/// `MutationType::toString()` -/// - `orig` is the source text of the node being replaced (corresponding to -/// `Mutant.orig`) -/// - `repl` is the source text replacing `orig` during mutation -/// (corresponding to `Mutant.repl`) -/// - `(linenum, colnum)` are the line and column numbers where the mutation -/// took place (corresponding to `Mutant.get_line_column`); we use this -/// information to disambiguate different mutations of similar nodes -fn assert_exact_mutants_from_json(json: &str, expected: &Vec<(&str, &str, &str, (usize, usize))>) { - if let Ok(mutate_params) = get_config_json(json) { - let results = gambit::run_mutate(mutate_params); - assert!(results.is_ok()); - let dir_to_mutants = results.unwrap(); - assert_eq!( - dir_to_mutants.keys().len(), - 1, - "Expected a single output directory" - ); - let mutants = dir_to_mutants.values().next().unwrap(); - let actuals: Vec<(String, &str, &str, (usize, usize))> = mutants - .iter() - .map(|m| { - ( - m.op.to_string(), - m.orig.trim(), - m.repl.trim(), - m.source.get_line_column(m.start).unwrap(), - ) - }) - .collect(); - let actuals: Vec<(&str, &str, &str, (usize, usize))> = actuals - .iter() - .map(|(a, b, c, d)| (a.as_str(), *b, *c, *d)) - .collect(); - assert_eq!( - expected.len(), - actuals.len(), - "\n{} Error: {}: expected {} mutants but found {}.\n {} {}\n {} {}\n", - Color::Red.bold().paint("[ ! ]"), - Style::new().bold().underline().italic().paint(json), - Color::Green.bold().paint(expected.len().to_string()), - Color::Red.bold().paint(actuals.len().to_string()), - Color::Green.bold().paint("Expected Mutants:"), - expected - .iter() - .map(|(op, orig, repl, (line, col))| format!( - "[{}: `{}` -> `{}` ({}:{})]", - op, orig, repl, line, col - )) - .collect::>() - .join(", "), - Color::Red.bold().paint("Actual Mutants:"), - actuals - .iter() - .map(|(op, orig, repl, (line, col))| format!( - "[{}: `{}` -> `{}` ({}:{})]", - op, orig, repl, line, col - )) - .collect::>() - .join(", ") - ); - - let actuals: HashSet<(&str, &str, &str, (usize, usize))> = - actuals.iter().cloned().collect(); - let expected: HashSet<(&str, &str, &str, (usize, usize))> = - expected.iter().cloned().collect(); - assert_eq!( - expected, - actuals, - "\n{} Error: {}\n", - Color::Red.bold().paint("[ ! ]"), - Style::new().bold().underline().italic().paint(json), - ); - } else { - assert!(false, "Couldn't read {}", json); - } -} - -fn get_config_json(config_json: &str) -> Result, Box> { - let cwd = env::current_dir()?; - let project_root = get_project_root()?; - let path_to_config_json = project_root - .join("benchmarks") - .join("config-jsons") - .join(config_json); - let p = path_to_config_json.strip_prefix(&cwd).unwrap(); - let json_contents = std::fs::read_to_string(&p)?; - let json: serde_json::Value = serde_json::from_reader(json_contents.as_bytes())?; - - let mut mutate_params: Vec = if json.is_array() { - serde_json::from_str(&json_contents)? - } else if json.is_object() { - let single_param: MutateParams = serde_json::from_str(&json_contents)?; - vec![single_param] - } else { - panic!("Invalid configuration file: must be an array or an object") - }; - // We also have to include some path update logic: a config file - // uses paths relative to the parent directory of the config file. - // This may be different than the current working directory, so we - // need to compute paths as offsets from the config's parent - // directory. - let pb = PathBuf::from(&p); - let json_parent_directory = pb.parent().unwrap(); - let base_outdir = PathBuf::from("gambit_tests_out"); - let base_outdir = base_outdir.join(format!("test_{}", config_json)); - - for params in mutate_params.iter_mut() { - // Update outdir - let outdir = base_outdir.join(¶ms.outdir.clone().unwrap_or("gambit_out".to_string())); - params.outdir = Some(outdir.to_str().unwrap().to_string()); - params.filename = params.filename.clone().map(|fnm| { - json_parent_directory - .join(fnm) - .to_str() - .unwrap() - .to_string() - }); - // Update overwrite - params.no_overwrite = false; - } - - Ok(mutate_params) -} From 097202ac25562f31e084b2b1fbb54e0b8e13ad86 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 26 Jul 2023 10:30:11 -0700 Subject: [PATCH 041/200] Cleaned up mutation ops, renamed elimdelmutation to elimdelcall --- src/mutation.rs | 29 +++++++++++------------------ src/util.rs | 1 + 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/mutation.rs b/src/mutation.rs index 7f3ecf56..ed2bab0d 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -229,23 +229,16 @@ pub trait Mutation { /// Kinds of mutations. #[derive(Hash, Eq, PartialEq, Clone, Copy, Debug, ValueEnum, Deserialize, Serialize)] pub enum MutationType { - // # New Operators - // ## Literal Value Replacement - LiteralValueReplacement, - // ## Binary Operator Replacement - BitwiseOperatorReplacement, - RelationalOperatorReplacement, ArithmeticOperatorReplacement, + BitwiseOperatorReplacement, + ElimDelegateCall, + LiteralValueReplacement, LogicalOperatorReplacement, + RelationalOperatorReplacement, ShiftOperatorReplacement, - // ## UnaryOperatorReplacement + StatementDeletion, UnaryOperatorReplacement, - // ## Fallback Operators ExpressionValueReplacement, - StatementDeletion, - - // # Old Operators (Deprecated) - ElimDelegateMutation, } impl ToString for MutationType { @@ -254,14 +247,14 @@ impl ToString for MutationType { MutationType::LiteralValueReplacement => "LiteralValueReplacement", MutationType::BitwiseOperatorReplacement => "ConditionalOperatorReplacement", MutationType::RelationalOperatorReplacement => "RelationalOperatorReplacement", - MutationType::ArithmeticOperatorReplacement => "ArithmeticOperatorReplacemnt", + MutationType::ArithmeticOperatorReplacement => "ArithmeticOperatorReplacement", MutationType::LogicalOperatorReplacement => "LogicalOperatorReplacement", MutationType::ShiftOperatorReplacement => "ShiftOperatorReplacement", MutationType::UnaryOperatorReplacement => "UnaryOperatorReplacement", MutationType::ExpressionValueReplacement => "ExpressionOperatorReplacement", MutationType::StatementDeletion => "StatementDeletion", - MutationType::ElimDelegateMutation => "ElimDelegateMutation", + MutationType::ElimDelegateCall => "ElimDelegateCall", }; str.into() } @@ -328,7 +321,7 @@ impl Mutation for MutationType { } // Old Operators - MutationType::ElimDelegateMutation => { + MutationType::ElimDelegateCall => { elim_delegate_mutation(self, resolver, ns, expr, contents) } _ => vec![], @@ -342,7 +335,7 @@ impl MutationType { MutationType::ArithmeticOperatorReplacement, MutationType::BitwiseOperatorReplacement, MutationType::ExpressionValueReplacement, - MutationType::ElimDelegateMutation, + MutationType::ElimDelegateCall, MutationType::LiteralValueReplacement, MutationType::LogicalOperatorReplacement, MutationType::RelationalOperatorReplacement, @@ -356,7 +349,7 @@ impl MutationType { match self { MutationType::ArithmeticOperatorReplacement => "AOR", MutationType::BitwiseOperatorReplacement => "BOR", - MutationType::ElimDelegateMutation => "EDM", + MutationType::ElimDelegateCall => "EDC", MutationType::ExpressionValueReplacement => "EVR", MutationType::LiteralValueReplacement => "LVR", MutationType::LogicalOperatorReplacement => "LOR", @@ -1050,7 +1043,7 @@ mod test { #[test] pub fn test_elim_delegate_mutation() -> Result<(), Box> { let ops = vec![ - MutationType::ElimDelegateMutation, + MutationType::ElimDelegateCall, MutationType::ArithmeticOperatorReplacement, ]; // TODO: how should I test this? diff --git a/src/util.rs b/src/util.rs index 6c86d1b2..40c33247 100644 --- a/src/util.rs +++ b/src/util.rs @@ -357,6 +357,7 @@ pub fn normalize_mutation_operator_name(op_name: &String) -> String { "aor" | "arithmetic-operator-replacement" => "arithmetic-operator-replacement", "bor" | "bitwise-operator-replacement" => "bitwise-operator-replacement", "evr" | "expression-value-replacement" => "expression-value-replacement", + "edc" | "elim-delegate-call" => "elim-delegate-call", "lor" | "logical-operator-replacement" => "logical-operator-replacement", "lvr" | "literal-value-replacement" => "literal-value-replacement", "ror" | "relational-operator-replacement" => "relational-operator-replacement", From 0ac76baaa1dfc082a32b6d98c8c9ec194a1529ab Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 26 Jul 2023 10:30:37 -0700 Subject: [PATCH 042/200] Reorg of benchmarks (tmp commit) --- benchmarks/10Power/TenPower.sol | 12 --- .../AssignmentMutation/AssignmentMutation.sol | 19 ----- benchmarks/AssignmentMutation/expected.sol | 20 ----- .../BinaryOpMutation/BinaryOpMutation.sol | 30 -------- benchmarks/BinaryOpMutation/expected.sol | 31 -------- .../DeleteExpressionMutation.sol | 14 ---- .../DeleteExpressionMutation/expected.sol | 15 ---- .../ElimDelegateMutation.sol | 31 -------- benchmarks/ElimDelegateMutation/expected.sol | 32 -------- .../FunctionCallMutation.sol | 13 ---- benchmarks/FunctionCallMutation/expected.sol | 14 ---- .../IfStatementMutation.sol | 14 ---- benchmarks/IfStatementMutation/expected.sol | 15 ---- benchmarks/{ => Ops}/AOR/AOR.sol | 0 benchmarks/{ => Ops}/BOR/BOR.sol | 0 benchmarks/Ops/EDC/EDC.sol | 21 ++++++ benchmarks/{ => Ops}/LOR/LOR.sol | 0 benchmarks/{ => Ops}/LVR/LVR.sol | 0 benchmarks/{ => Ops}/ROR/ROR.sol | 0 benchmarks/{ => Ops}/UOR/UOR.sol | 0 .../RequireMutation/RequireMutation.sol | 12 --- benchmarks/RequireMutation/expected.sol | 13 ---- .../SwapArgumentsFunctionMutation.sol | 14 ---- .../expected.sol | 15 ---- .../SwapArgumentsOperatorMutation.sol | 45 ------------ .../expected.sol | 46 ------------ .../SwapLinesMutation/SwapLinesMutation.sol | 12 --- benchmarks/SwapLinesMutation/expected.sol | 13 ---- .../UnaryOperatorMutation.sol | 27 ------- benchmarks/UnaryOperatorMutation/expected.sol | 28 ------- benchmarks/config-jsons/all.json | 73 ------------------- benchmarks/config-jsons/all_ops.json | 51 +++++++++++++ benchmarks/config-jsons/bor.json | 9 +++ benchmarks/config-jsons/edc.json | 9 +++ benchmarks/config-jsons/lvr.json | 9 +++ benchmarks/config-jsons/ror.json | 2 +- 36 files changed, 100 insertions(+), 559 deletions(-) delete mode 100644 benchmarks/10Power/TenPower.sol delete mode 100644 benchmarks/AssignmentMutation/AssignmentMutation.sol delete mode 100644 benchmarks/AssignmentMutation/expected.sol delete mode 100644 benchmarks/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 benchmarks/BinaryOpMutation/expected.sol delete mode 100644 benchmarks/DeleteExpressionMutation/DeleteExpressionMutation.sol delete mode 100644 benchmarks/DeleteExpressionMutation/expected.sol delete mode 100644 benchmarks/ElimDelegateMutation/ElimDelegateMutation.sol delete mode 100644 benchmarks/ElimDelegateMutation/expected.sol delete mode 100644 benchmarks/FunctionCallMutation/FunctionCallMutation.sol delete mode 100644 benchmarks/FunctionCallMutation/expected.sol delete mode 100644 benchmarks/IfStatementMutation/IfStatementMutation.sol delete mode 100644 benchmarks/IfStatementMutation/expected.sol rename benchmarks/{ => Ops}/AOR/AOR.sol (100%) rename benchmarks/{ => Ops}/BOR/BOR.sol (100%) create mode 100644 benchmarks/Ops/EDC/EDC.sol rename benchmarks/{ => Ops}/LOR/LOR.sol (100%) rename benchmarks/{ => Ops}/LVR/LVR.sol (100%) rename benchmarks/{ => Ops}/ROR/ROR.sol (100%) rename benchmarks/{ => Ops}/UOR/UOR.sol (100%) delete mode 100644 benchmarks/RequireMutation/RequireMutation.sol delete mode 100644 benchmarks/RequireMutation/expected.sol delete mode 100644 benchmarks/SwapArgumentsFunctionMutation/SwapArgumentsFunctionMutation.sol delete mode 100644 benchmarks/SwapArgumentsFunctionMutation/expected.sol delete mode 100644 benchmarks/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol delete mode 100644 benchmarks/SwapArgumentsOperatorMutation/expected.sol delete mode 100644 benchmarks/SwapLinesMutation/SwapLinesMutation.sol delete mode 100644 benchmarks/SwapLinesMutation/expected.sol delete mode 100644 benchmarks/UnaryOperatorMutation/UnaryOperatorMutation.sol delete mode 100644 benchmarks/UnaryOperatorMutation/expected.sol delete mode 100644 benchmarks/config-jsons/all.json create mode 100644 benchmarks/config-jsons/all_ops.json create mode 100644 benchmarks/config-jsons/bor.json create mode 100644 benchmarks/config-jsons/edc.json create mode 100644 benchmarks/config-jsons/lvr.json diff --git a/benchmarks/10Power/TenPower.sol b/benchmarks/10Power/TenPower.sol deleted file mode 100644 index 38385d13..00000000 --- a/benchmarks/10Power/TenPower.sol +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/benchmarks/AssignmentMutation/AssignmentMutation.sol b/benchmarks/AssignmentMutation/AssignmentMutation.sol deleted file mode 100644 index a409a57b..00000000 --- a/benchmarks/AssignmentMutation/AssignmentMutation.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract AssignmentMutation { - uint256 public x; - uint256 public y; - uint256 public z; - bool public a; - bool public b; - - constructor() { - x = 42; // original: 42 - y = 13; // original: 13 - z = 3110; // original: 3110 - a = true; // original: true - b = false; // original: false - } -} diff --git a/benchmarks/AssignmentMutation/expected.sol b/benchmarks/AssignmentMutation/expected.sol deleted file mode 100644 index c58edba5..00000000 --- a/benchmarks/AssignmentMutation/expected.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract AssignmentMutation { - uint256 public x; - uint256 public y; - uint256 public z; - bool public a; - bool public b; - - constructor() { - x = 42; // original: 42 - y = 13; // original: 13 - z = 3110; // original: 3110 - a = true; // original: true - /// AssignmentMutation of: b = false; // original: false - b = true; // original: false - } -} diff --git a/benchmarks/BinaryOpMutation/BinaryOpMutation.sol b/benchmarks/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 9331079c..00000000 --- a/benchmarks/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,30 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/benchmarks/BinaryOpMutation/expected.sol b/benchmarks/BinaryOpMutation/expected.sol deleted file mode 100644 index 4a9a6371..00000000 --- a/benchmarks/BinaryOpMutation/expected.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation of: return x - y; - return x + y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/benchmarks/DeleteExpressionMutation/DeleteExpressionMutation.sol b/benchmarks/DeleteExpressionMutation/DeleteExpressionMutation.sol deleted file mode 100644 index 6b199df2..00000000 --- a/benchmarks/DeleteExpressionMutation/DeleteExpressionMutation.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract DeleteExpressionMutation { - - function myIdentity(uint256 x) public pure returns (uint256) { - uint256 result = 0; - for (uint256 i = 0; i < x; i++) { - result ++; - } - return result; - } -} diff --git a/benchmarks/DeleteExpressionMutation/expected.sol b/benchmarks/DeleteExpressionMutation/expected.sol deleted file mode 100644 index c0f78b2e..00000000 --- a/benchmarks/DeleteExpressionMutation/expected.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract DeleteExpressionMutation { - - function myIdentity(uint256 x) public pure returns (uint256) { - uint256 result = 0; - /// DeleteExpressionMutation of: for (uint256 i = 0; i < x; i++) { - for (uint256 i = 0; i < x; /*i++*/) { - result ++; - } - return result; - } -} diff --git a/benchmarks/ElimDelegateMutation/ElimDelegateMutation.sol b/benchmarks/ElimDelegateMutation/ElimDelegateMutation.sol deleted file mode 100644 index 9731cfb9..00000000 --- a/benchmarks/ElimDelegateMutation/ElimDelegateMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.13; - -contract B { - uint public num; - address public sender; - uint public value; - - function setVars(uint _num) public payable { - num = _num; - sender = msg.sender; - value = msg.value; - } -} - -contract A { - uint public num; - address public sender; - uint public value; - bool public delegateSuccessful; - bytes public myData; - - - function setVars(address _contract, uint _num) public payable { - (bool success, bytes memory data) = _contract.delegatecall( - abi.encodeWithSignature("setVars(uint256)", _num) - ); - delegateSuccessful = success; - myData = data; - } -} diff --git a/benchmarks/ElimDelegateMutation/expected.sol b/benchmarks/ElimDelegateMutation/expected.sol deleted file mode 100644 index 1aa8acf0..00000000 --- a/benchmarks/ElimDelegateMutation/expected.sol +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.13; - -contract B { - uint public num; - address public sender; - uint public value; - - function setVars(uint _num) public payable { - num = _num; - sender = msg.sender; - value = msg.value; - } -} - -contract A { - uint public num; - address public sender; - uint public value; - bool public delegateSuccessful; - bytes public myData; - - - function setVars(address _contract, uint _num) public payable { - /// ElimDelegateMutation of: (bool success, bytes memory data) = _contract.delegatecall( - (bool success, bytes memory data) = _contract.call( - abi.encodeWithSignature("setVars(uint256)", _num) - ); - delegateSuccessful = success; - myData = data; - } -} diff --git a/benchmarks/FunctionCallMutation/FunctionCallMutation.sol b/benchmarks/FunctionCallMutation/FunctionCallMutation.sol deleted file mode 100644 index 067c4f14..00000000 --- a/benchmarks/FunctionCallMutation/FunctionCallMutation.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract FunctionCallMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function myOtherAddition(uint256 x, uint256 y) public pure returns (uint256) { - return myAddition(x, y); - } -} diff --git a/benchmarks/FunctionCallMutation/expected.sol b/benchmarks/FunctionCallMutation/expected.sol deleted file mode 100644 index 802c5772..00000000 --- a/benchmarks/FunctionCallMutation/expected.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract FunctionCallMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function myOtherAddition(uint256 x, uint256 y) public pure returns (uint256) { - /// FunctionCallMutation of: return myAddition(x, y); - return x; - } -} diff --git a/benchmarks/IfStatementMutation/IfStatementMutation.sol b/benchmarks/IfStatementMutation/IfStatementMutation.sol deleted file mode 100644 index c36144b9..00000000 --- a/benchmarks/IfStatementMutation/IfStatementMutation.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract IfStatementMutation { - function myBooleanNegation(bool a) public pure returns (bool) { - if (a) { - return true; - } - else { - return false; - } - } -} diff --git a/benchmarks/IfStatementMutation/expected.sol b/benchmarks/IfStatementMutation/expected.sol deleted file mode 100644 index 34a76c9f..00000000 --- a/benchmarks/IfStatementMutation/expected.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract IfStatementMutation { - function myBooleanNegation(bool a) public pure returns (bool) { - /// IfStatementMutation of: if (a) { - if (false) { - return true; - } - else { - return false; - } - } -} diff --git a/benchmarks/AOR/AOR.sol b/benchmarks/Ops/AOR/AOR.sol similarity index 100% rename from benchmarks/AOR/AOR.sol rename to benchmarks/Ops/AOR/AOR.sol diff --git a/benchmarks/BOR/BOR.sol b/benchmarks/Ops/BOR/BOR.sol similarity index 100% rename from benchmarks/BOR/BOR.sol rename to benchmarks/Ops/BOR/BOR.sol diff --git a/benchmarks/Ops/EDC/EDC.sol b/benchmarks/Ops/EDC/EDC.sol new file mode 100644 index 00000000..0f6728bc --- /dev/null +++ b/benchmarks/Ops/EDC/EDC.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.13; + +contract B { + function setVars(uint _num) public payable {} +} + +contract A { + uint public num; + address public sender; + uint public value; + bool public delegateSuccessful; + bytes public myData; + + function setVars(address _contract) public payable { + (bool success, ) = _contract.delegatecall( + abi.encodeWithSignature("setVars(uint256)", 1) + ); + require(success, "Delegatecall failed"); + } +} diff --git a/benchmarks/LOR/LOR.sol b/benchmarks/Ops/LOR/LOR.sol similarity index 100% rename from benchmarks/LOR/LOR.sol rename to benchmarks/Ops/LOR/LOR.sol diff --git a/benchmarks/LVR/LVR.sol b/benchmarks/Ops/LVR/LVR.sol similarity index 100% rename from benchmarks/LVR/LVR.sol rename to benchmarks/Ops/LVR/LVR.sol diff --git a/benchmarks/ROR/ROR.sol b/benchmarks/Ops/ROR/ROR.sol similarity index 100% rename from benchmarks/ROR/ROR.sol rename to benchmarks/Ops/ROR/ROR.sol diff --git a/benchmarks/UOR/UOR.sol b/benchmarks/Ops/UOR/UOR.sol similarity index 100% rename from benchmarks/UOR/UOR.sol rename to benchmarks/Ops/UOR/UOR.sol diff --git a/benchmarks/RequireMutation/RequireMutation.sol b/benchmarks/RequireMutation/RequireMutation.sol deleted file mode 100644 index 8517cc25..00000000 --- a/benchmarks/RequireMutation/RequireMutation.sol +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract RequireMutation { - function myRequires(bool cond1, bool cond2, bool cond3) public pure returns (bool) { - require(cond1); - require(cond2); - require(cond3); - return true; - } -} diff --git a/benchmarks/RequireMutation/expected.sol b/benchmarks/RequireMutation/expected.sol deleted file mode 100644 index c0c41e27..00000000 --- a/benchmarks/RequireMutation/expected.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract RequireMutation { - function myRequires(bool cond1, bool cond2, bool cond3) public pure returns (bool) { - require(cond1); - require(cond2); - /// RequireMutation of: require(cond3); - require(!(cond3)); - return true; - } -} diff --git a/benchmarks/SwapArgumentsFunctionMutation/SwapArgumentsFunctionMutation.sol b/benchmarks/SwapArgumentsFunctionMutation/SwapArgumentsFunctionMutation.sol deleted file mode 100644 index c77fb132..00000000 --- a/benchmarks/SwapArgumentsFunctionMutation/SwapArgumentsFunctionMutation.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapArgumentsFunctionMutation { - - function foo(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function bar(uint256 x, uint256 y) public pure returns (uint256) { - return foo(x, y); - } -} diff --git a/benchmarks/SwapArgumentsFunctionMutation/expected.sol b/benchmarks/SwapArgumentsFunctionMutation/expected.sol deleted file mode 100644 index 965f5a96..00000000 --- a/benchmarks/SwapArgumentsFunctionMutation/expected.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapArgumentsFunctionMutation { - - function foo(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function bar(uint256 x, uint256 y) public pure returns (uint256) { - /// SwapArgumentsFunctionMutation of: return foo(x, y); - return foo(y, x); - } -} diff --git a/benchmarks/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol b/benchmarks/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol deleted file mode 100644 index 969f296f..00000000 --- a/benchmarks/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapArgumentsOperatorMutation { - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - - function myGT(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - function myLT(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - function myGE(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - function myLE(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - function mySAL(uint256 x, uint256 y) public pure returns (uint256) { - return x << y; - } - - function mySAR(uint256 x, uint256 y) public pure returns (uint256) { - return x >> y; - } -} diff --git a/benchmarks/SwapArgumentsOperatorMutation/expected.sol b/benchmarks/SwapArgumentsOperatorMutation/expected.sol deleted file mode 100644 index 43fa7218..00000000 --- a/benchmarks/SwapArgumentsOperatorMutation/expected.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapArgumentsOperatorMutation { - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - - function myGT(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - function myLT(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - function myGE(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - function myLE(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - function mySAL(uint256 x, uint256 y) public pure returns (uint256) { - /// SwapArgumentsOperatorMutation of: return x << y; - return y << x; - } - - function mySAR(uint256 x, uint256 y) public pure returns (uint256) { - return x >> y; - } -} diff --git a/benchmarks/SwapLinesMutation/SwapLinesMutation.sol b/benchmarks/SwapLinesMutation/SwapLinesMutation.sol deleted file mode 100644 index 5e24d878..00000000 --- a/benchmarks/SwapLinesMutation/SwapLinesMutation.sol +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapLinesMutation { - uint public num; - - function incTwice() public { - num += 1; - num += 2; - } -} diff --git a/benchmarks/SwapLinesMutation/expected.sol b/benchmarks/SwapLinesMutation/expected.sol deleted file mode 100644 index 0e48db65..00000000 --- a/benchmarks/SwapLinesMutation/expected.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapLinesMutation { - uint public num; - - function incTwice() public { - /// SwapLinesMutation of: num += 1; - num += 2; - num += 1; - } -} diff --git a/benchmarks/UnaryOperatorMutation/UnaryOperatorMutation.sol b/benchmarks/UnaryOperatorMutation/UnaryOperatorMutation.sol deleted file mode 100644 index ff8f1479..00000000 --- a/benchmarks/UnaryOperatorMutation/UnaryOperatorMutation.sol +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract UnaryOperatorMutation { - function myBitwiseNeg(uint256 x) public pure returns (uint256) { - return ~ x; - } - - function myPrefixIncr(uint256 x) public pure returns (uint256) { - return ++x; - } - - function myPrefixDecr(uint256 x) public pure returns (uint256) { - return --x; - } - - function mySuffixIncr(uint256 x) public pure returns (uint256) { - x++; - return x; - } - - function mySuffixDecr(uint256 x) public pure returns (uint256) { - x--; - return x; - } -} diff --git a/benchmarks/UnaryOperatorMutation/expected.sol b/benchmarks/UnaryOperatorMutation/expected.sol deleted file mode 100644 index 2580b7c2..00000000 --- a/benchmarks/UnaryOperatorMutation/expected.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract UnaryOperatorMutation { - function myBitwiseNeg(uint256 x) public pure returns (uint256) { - return ~ x; - } - - function myPrefixIncr(uint256 x) public pure returns (uint256) { - return ++x; - } - - function myPrefixDecr(uint256 x) public pure returns (uint256) { - return --x; - } - - function mySuffixIncr(uint256 x) public pure returns (uint256) { - x++; - return x; - } - - function mySuffixDecr(uint256 x) public pure returns (uint256) { - /// UnaryOperatorMutation of: x--; - x++; - return x; - } -} diff --git a/benchmarks/config-jsons/all.json b/benchmarks/config-jsons/all.json deleted file mode 100644 index 83eee61c..00000000 --- a/benchmarks/config-jsons/all.json +++ /dev/null @@ -1,73 +0,0 @@ -[ - { - "filename": "../BinaryOpMutation/BinaryOpMutation.sol", - "sourceroot": "..", - "mutations": [ - "binary-op-mutation" - ] - }, - { - "filename": "../RequireMutation/RequireMutation.sol", - "sourceroot": "..", - "mutations": [ - "require-mutation" - ] - }, - { - "filename": "../AssignmentMutation/AssignmentMutation.sol", - "sourceroot": "..", - "mutations": [ - "assignment-mutation" - ] - }, - { - "filename": "../DeleteExpressionMutation/DeleteExpressionMutation.sol", - "sourceroot": "..", - "mutations": [ - "delete-expression-mutation" - ] - }, - { - "filename": "../FunctionCallMutation/FunctionCallMutation.sol", - "sourceroot": "..", - "mutations": [ - "function-call-mutation" - ] - }, - { - "filename": "../IfStatementMutation/IfStatementMutation.sol", - "sourceroot": "..", - "mutations": [ - "if-statement-mutation" - ], - "solc-optimize": true - }, - { - "filename": "../SwapArgumentsFunctionMutation/SwapArgumentsFunctionMutation.sol", - "sourceroot": "..", - "mutations": [ - "swap-arguments-function-mutation" - ] - }, - { - "filename": "../SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "sourceroot": "..", - "mutations": [ - "swap-arguments-operator-mutation" - ] - }, - { - "filename": "../UnaryOperatorMutation/UnaryOperatorMutation.sol", - "sourceroot": "..", - "mutations": [ - "unary-operator-mutation" - ] - }, - { - "filename": "../ElimDelegateMutation/ElimDelegateMutation.sol", - "sourceroot": "..", - "mutations": [ - "elim-delegate-mutation" - ] - } -] \ No newline at end of file diff --git a/benchmarks/config-jsons/all_ops.json b/benchmarks/config-jsons/all_ops.json new file mode 100644 index 00000000..a98d91a8 --- /dev/null +++ b/benchmarks/config-jsons/all_ops.json @@ -0,0 +1,51 @@ +[ + { + "filename": "../Ops/AOR/AOR.sol", + "solc-base-path": "../Ops", + "mutations": [ + "AOR" + ] + }, + { + "filename": "../Ops/BOR/BOR.sol", + "solc-base-path": "../Ops", + "mutations": [ + "BOR" + ] + }, + { + "filename": "../Ops/EDC/EDC.sol", + "solc-base-path": "../Ops", + "mutations": [ + "EDC" + ] + }, + { + "filename": "../Ops/LOR/LOR.sol", + "solc-base-path": "../Ops", + "mutations": [ + "LOR" + ] + }, + { + "filename": "../Ops/LVR/LVR.sol", + "solc-base-path": "../Ops", + "mutations": [ + "LVR" + ] + }, + { + "filename": "../Ops/ROR/ROR.sol", + "solc-base-path": "../Ops", + "mutations": [ + "ROR" + ] + }, + { + "filename": "../Ops/UOR/UOR.sol", + "solc-base-path": "../Ops", + "mutations": [ + "UOR" + ] + } +] \ No newline at end of file diff --git a/benchmarks/config-jsons/bor.json b/benchmarks/config-jsons/bor.json new file mode 100644 index 00000000..347f8cc5 --- /dev/null +++ b/benchmarks/config-jsons/bor.json @@ -0,0 +1,9 @@ +[ + { + "filename": "../BOR/BOR.sol", + "solc-base-path": "..", + "mutations": [ + "bor" + ] + } +] \ No newline at end of file diff --git a/benchmarks/config-jsons/edc.json b/benchmarks/config-jsons/edc.json new file mode 100644 index 00000000..beb214dc --- /dev/null +++ b/benchmarks/config-jsons/edc.json @@ -0,0 +1,9 @@ +[ + { + "filename": "../EDM/EDM.sol", + "solc-base-path": "..", + "mutations": [ + "edm" + ] + } +] \ No newline at end of file diff --git a/benchmarks/config-jsons/lvr.json b/benchmarks/config-jsons/lvr.json new file mode 100644 index 00000000..38dd5bc5 --- /dev/null +++ b/benchmarks/config-jsons/lvr.json @@ -0,0 +1,9 @@ +[ + { + "filename": "../LVR/LVR.sol", + "solc-base-path": "..", + "mutations": [ + "lvr" + ] + } +] \ No newline at end of file diff --git a/benchmarks/config-jsons/ror.json b/benchmarks/config-jsons/ror.json index 32d10a1b..bf98e496 100644 --- a/benchmarks/config-jsons/ror.json +++ b/benchmarks/config-jsons/ror.json @@ -1,7 +1,7 @@ [ { "filename": "../ROR/ROR.sol", - "sourceroot": "..", + "solc-base-path": "..", "mutations": [ "relational-operator-replacement" ] From 343da73c62b77a98351e82a2175543b650d5dfed Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 26 Jul 2023 10:35:27 -0700 Subject: [PATCH 043/200] Better error message on bad file path --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 6c9a907c..68c4829c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -64,7 +64,9 @@ fn main() -> Result<(), Box> { filepath } else { let joined = config_parent_pb.join(filepath); - joined.canonicalize().unwrap() + joined + .canonicalize() + .expect(format!("Couldn't find file at {}", joined.display()).as_str()) }; // PARAM: Outdir From 5252edc4cf7ebcea4694d60fb2a7687ab6d58cdc Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 26 Jul 2023 10:37:43 -0700 Subject: [PATCH 044/200] operator config jsons working --- benchmarks/config-jsons/aor.json | 2 +- benchmarks/config-jsons/bor.json | 2 +- benchmarks/config-jsons/edc.json | 4 ++-- benchmarks/config-jsons/lor.json | 2 +- benchmarks/config-jsons/lvr.json | 2 +- benchmarks/config-jsons/ror.json | 2 +- benchmarks/config-jsons/uor.json | 9 +++++++++ 7 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 benchmarks/config-jsons/uor.json diff --git a/benchmarks/config-jsons/aor.json b/benchmarks/config-jsons/aor.json index 709561c7..5937a06d 100644 --- a/benchmarks/config-jsons/aor.json +++ b/benchmarks/config-jsons/aor.json @@ -1,6 +1,6 @@ [ { - "filename": "../AOR/AOR.sol", + "filename": "../Ops/AOR/AOR.sol", "solc-base-path": "..", "mutations": [ "aor" diff --git a/benchmarks/config-jsons/bor.json b/benchmarks/config-jsons/bor.json index 347f8cc5..73688b9f 100644 --- a/benchmarks/config-jsons/bor.json +++ b/benchmarks/config-jsons/bor.json @@ -1,6 +1,6 @@ [ { - "filename": "../BOR/BOR.sol", + "filename": "../Ops/BOR/BOR.sol", "solc-base-path": "..", "mutations": [ "bor" diff --git a/benchmarks/config-jsons/edc.json b/benchmarks/config-jsons/edc.json index beb214dc..51487b7d 100644 --- a/benchmarks/config-jsons/edc.json +++ b/benchmarks/config-jsons/edc.json @@ -1,9 +1,9 @@ [ { - "filename": "../EDM/EDM.sol", + "filename": "../Ops/EDC/EDC.sol", "solc-base-path": "..", "mutations": [ - "edm" + "edc" ] } ] \ No newline at end of file diff --git a/benchmarks/config-jsons/lor.json b/benchmarks/config-jsons/lor.json index 9d77444b..995c1be3 100644 --- a/benchmarks/config-jsons/lor.json +++ b/benchmarks/config-jsons/lor.json @@ -1,6 +1,6 @@ [ { - "filename": "../LOR/LOR.sol", + "filename": "../Ops/LOR/LOR.sol", "solc-base-path": "..", "mutations": [ "logical-operator-replacement" diff --git a/benchmarks/config-jsons/lvr.json b/benchmarks/config-jsons/lvr.json index 38dd5bc5..2af8215d 100644 --- a/benchmarks/config-jsons/lvr.json +++ b/benchmarks/config-jsons/lvr.json @@ -1,6 +1,6 @@ [ { - "filename": "../LVR/LVR.sol", + "filename": "../Ops/LVR/LVR.sol", "solc-base-path": "..", "mutations": [ "lvr" diff --git a/benchmarks/config-jsons/ror.json b/benchmarks/config-jsons/ror.json index bf98e496..f6e72d29 100644 --- a/benchmarks/config-jsons/ror.json +++ b/benchmarks/config-jsons/ror.json @@ -1,6 +1,6 @@ [ { - "filename": "../ROR/ROR.sol", + "filename": "../Ops/ROR/ROR.sol", "solc-base-path": "..", "mutations": [ "relational-operator-replacement" diff --git a/benchmarks/config-jsons/uor.json b/benchmarks/config-jsons/uor.json new file mode 100644 index 00000000..4696c241 --- /dev/null +++ b/benchmarks/config-jsons/uor.json @@ -0,0 +1,9 @@ +[ + { + "filename": "../Ops/UOR/UOR.sol", + "solc-base-path": "..", + "mutations": [ + "uor" + ] + } +] \ No newline at end of file From c4e6a88f9ed4a8076b9d14ec6f9baa64f04b6629 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 26 Jul 2023 10:41:34 -0700 Subject: [PATCH 045/200] updated multiple-contracts configs --- benchmarks/config-jsons/multiple-contracts-1.json | 4 ++-- benchmarks/config-jsons/multiple-contracts-2.json | 4 ++-- benchmarks/config-jsons/multiple-contracts-3.json | 4 ++-- benchmarks/config-jsons/multiple-contracts-4.json | 10 ++++++---- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/benchmarks/config-jsons/multiple-contracts-1.json b/benchmarks/config-jsons/multiple-contracts-1.json index e32dd65b..36dee39c 100644 --- a/benchmarks/config-jsons/multiple-contracts-1.json +++ b/benchmarks/config-jsons/multiple-contracts-1.json @@ -1,7 +1,7 @@ [ { "filename": "../MultipleContracts/C.sol", - "sourceroot": "..", + "solc-base-path": "..", "contract": "Utils", "functions": [ "getarray" @@ -10,7 +10,7 @@ }, { "filename": "../MultipleContracts/C.sol", - "sourceroot": "..", + "solc-base-path": "..", "contract": "C", "functions": [ "getarray", diff --git a/benchmarks/config-jsons/multiple-contracts-2.json b/benchmarks/config-jsons/multiple-contracts-2.json index 3cbca06b..b87e5e2c 100644 --- a/benchmarks/config-jsons/multiple-contracts-2.json +++ b/benchmarks/config-jsons/multiple-contracts-2.json @@ -1,7 +1,7 @@ [ { "filename": "../MultipleContracts/C.sol", - "sourceroot": "..", + "solc-base-path": "..", "contract": "Utils", "functions": [ "add" @@ -10,7 +10,7 @@ }, { "filename": "../MultipleContracts/C.sol", - "sourceroot": "..", + "solc-base-path": "..", "contract": "C", "functions": [ "get10PowerDecimals" diff --git a/benchmarks/config-jsons/multiple-contracts-3.json b/benchmarks/config-jsons/multiple-contracts-3.json index bad7673e..bfa0b09c 100644 --- a/benchmarks/config-jsons/multiple-contracts-3.json +++ b/benchmarks/config-jsons/multiple-contracts-3.json @@ -1,13 +1,13 @@ [ { "filename": "../MultipleContracts/C.sol", - "sourceroot": "..", + "solc-base-path": "..", "contract": "Utils", "solc": "solc" }, { "filename": "../MultipleContracts/C.sol", - "sourceroot": "..", + "solc-base-path": "..", "contract": "C", "solc": "solc" } diff --git a/benchmarks/config-jsons/multiple-contracts-4.json b/benchmarks/config-jsons/multiple-contracts-4.json index 7eb99f65..4ea50e82 100644 --- a/benchmarks/config-jsons/multiple-contracts-4.json +++ b/benchmarks/config-jsons/multiple-contracts-4.json @@ -1,25 +1,27 @@ [ { "filename": "../MultipleContracts/C.sol", - "sourceroot": "..", + "solc-base-path": "..", "contract": "Utils", "functions": [ "add" ], "mutations": [ - "binary-op-mutation" + "aor", + "lor" ], "solc": "solc" }, { "filename": "../MultipleContracts/C.sol", - "sourceroot": "..", + "solc-base-path": "..", "contract": "C", "functions": [ "add" ], "mutations": [ - "binary-op-mutation" + "aor", + "lor" ], "solc": "solc" } From 62175cd4e9a3c506c30ea517185cb6fcb690db7f Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 26 Jul 2023 10:55:51 -0700 Subject: [PATCH 046/200] Reorganized configs --- benchmarks/Ops/EDC/EDC.sol | 4 ++-- benchmarks/config-jsons/sanity-config.json | 11 ----------- benchmarks/config-jsons/test1.json | 9 --------- benchmarks/config-jsons/test2.json | 9 --------- benchmarks/config-jsons/test4.json | 17 ----------------- benchmarks/config-jsons/test5.json | 12 ------------ ...ts-1.json => test_multiple_contracts_1.json} | 0 ...ts-2.json => test_multiple_contracts_2.json} | 0 ...ts-3.json => test_multiple_contracts_3.json} | 0 ...ts-4.json => test_multiple_contracts_4.json} | 0 .../{test3.json => test_multiple_files_1.json} | 8 ++++---- 11 files changed, 6 insertions(+), 64 deletions(-) delete mode 100644 benchmarks/config-jsons/sanity-config.json delete mode 100644 benchmarks/config-jsons/test1.json delete mode 100644 benchmarks/config-jsons/test2.json delete mode 100644 benchmarks/config-jsons/test4.json delete mode 100644 benchmarks/config-jsons/test5.json rename benchmarks/config-jsons/{multiple-contracts-1.json => test_multiple_contracts_1.json} (100%) rename benchmarks/config-jsons/{multiple-contracts-2.json => test_multiple_contracts_2.json} (100%) rename benchmarks/config-jsons/{multiple-contracts-3.json => test_multiple_contracts_3.json} (100%) rename benchmarks/config-jsons/{multiple-contracts-4.json => test_multiple_contracts_4.json} (100%) rename benchmarks/config-jsons/{test3.json => test_multiple_files_1.json} (63%) diff --git a/benchmarks/Ops/EDC/EDC.sol b/benchmarks/Ops/EDC/EDC.sol index 0f6728bc..b5290c12 100644 --- a/benchmarks/Ops/EDC/EDC.sol +++ b/benchmarks/Ops/EDC/EDC.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.13; -contract B { +contract Helper { function setVars(uint _num) public payable {} } -contract A { +contract EDC { uint public num; address public sender; uint public value; diff --git a/benchmarks/config-jsons/sanity-config.json b/benchmarks/config-jsons/sanity-config.json deleted file mode 100644 index 4262fafd..00000000 --- a/benchmarks/config-jsons/sanity-config.json +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "filename": "../BinaryOpMutation/BinaryOpMutation.sol", - "solc": "solc", - "num-mutants": 1, - "mutations": [ - "binary-op-mutation" - ], - "sourceroot": "../BinaryOpMutation" - } -] \ No newline at end of file diff --git a/benchmarks/config-jsons/test1.json b/benchmarks/config-jsons/test1.json deleted file mode 100644 index 85a834e3..00000000 --- a/benchmarks/config-jsons/test1.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "filename": "../10Power/TenPower.sol", - "mutations": [ - "binary-op-mutation", - "swap-arguments-operator-mutation" - ], - "solc-optimize": true, - "sourceroot": ".." -} \ No newline at end of file diff --git a/benchmarks/config-jsons/test2.json b/benchmarks/config-jsons/test2.json deleted file mode 100644 index 2fac30bd..00000000 --- a/benchmarks/config-jsons/test2.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "filename": "../10Power/TenPower.sol", - "mutations": [ - "binary-op-mutation", - "swap-arguments-operator-mutation" - ], - "sourceroot": "..", - "solc-optimize": true -} \ No newline at end of file diff --git a/benchmarks/config-jsons/test4.json b/benchmarks/config-jsons/test4.json deleted file mode 100644 index dfa19f6d..00000000 --- a/benchmarks/config-jsons/test4.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "filename": "../10Power/TenPower.sol", - "sourceroot": "..", - "mutations": [ - "binary-op-mutation", - "swap-arguments-operator-mutation" - ] - }, - { - "filename": "../MultipleContracts/C.sol", - "sourceroot": "..", - "mutations": [ - "function-call-mutation" - ] - } -] \ No newline at end of file diff --git a/benchmarks/config-jsons/test5.json b/benchmarks/config-jsons/test5.json deleted file mode 100644 index bdb8f175..00000000 --- a/benchmarks/config-jsons/test5.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "filename": "../10Power/TenPower.sol", - "sourceroot": "..", - "contract": "TenPower" - }, - { - "filename": "../MultipleContracts/C.sol", - "sourceroot": "..", - "contract": "Utils" - } -] \ No newline at end of file diff --git a/benchmarks/config-jsons/multiple-contracts-1.json b/benchmarks/config-jsons/test_multiple_contracts_1.json similarity index 100% rename from benchmarks/config-jsons/multiple-contracts-1.json rename to benchmarks/config-jsons/test_multiple_contracts_1.json diff --git a/benchmarks/config-jsons/multiple-contracts-2.json b/benchmarks/config-jsons/test_multiple_contracts_2.json similarity index 100% rename from benchmarks/config-jsons/multiple-contracts-2.json rename to benchmarks/config-jsons/test_multiple_contracts_2.json diff --git a/benchmarks/config-jsons/multiple-contracts-3.json b/benchmarks/config-jsons/test_multiple_contracts_3.json similarity index 100% rename from benchmarks/config-jsons/multiple-contracts-3.json rename to benchmarks/config-jsons/test_multiple_contracts_3.json diff --git a/benchmarks/config-jsons/multiple-contracts-4.json b/benchmarks/config-jsons/test_multiple_contracts_4.json similarity index 100% rename from benchmarks/config-jsons/multiple-contracts-4.json rename to benchmarks/config-jsons/test_multiple_contracts_4.json diff --git a/benchmarks/config-jsons/test3.json b/benchmarks/config-jsons/test_multiple_files_1.json similarity index 63% rename from benchmarks/config-jsons/test3.json rename to benchmarks/config-jsons/test_multiple_files_1.json index 400fbbdb..1f75554b 100644 --- a/benchmarks/config-jsons/test3.json +++ b/benchmarks/config-jsons/test_multiple_files_1.json @@ -1,12 +1,12 @@ [ { - "filename": "../10Power/TenPower.sol", - "sourceroot": "..", - "contract": "TenPower" + "filename": "../Ops/AOR/AOR.sol", + "solc-base-path": "..", + "contract": "AOR" }, { "filename": "../MultipleContracts/C.sol", - "sourceroot": "..", + "solc-base-path": "..", "contract": "C", "functions": [ "getarray" From 8c6730b187b513aea2a204fa49d6f61cd2d1bce4 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 26 Jul 2023 11:35:56 -0700 Subject: [PATCH 047/200] Updated regressions --- scripts/make_regressions.sh | 113 +++++++++++++++++++++++++++++------- 1 file changed, 91 insertions(+), 22 deletions(-) diff --git a/scripts/make_regressions.sh b/scripts/make_regressions.sh index 7f2163f3..ba109b91 100644 --- a/scripts/make_regressions.sh +++ b/scripts/make_regressions.sh @@ -19,41 +19,110 @@ SCRIPTS=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) GAMBIT="$SCRIPTS/.." +GAMBIT_EXECUTABLE="$GAMBIT/target/release/gambit" CONFIGS="$GAMBIT/benchmarks/config-jsons" REGRESSIONS="$GAMBIT"/resources/regressions -echo "scripts: $SCRIPTS" -echo "gambit: $GAMBIT" -echo "configs: $CONFIGS" -echo "regressions: $REGRESSIONS" - -[ -e "$REGRESSIONS" ] && { - echo "Removing old regressions" - rm -rf "$REGRESSIONS" +TMP_REGRESSIONS="$GAMBIT"/resources/tmp_regressions + +NUM_CONFIGS=$(ls "$CONFIGS" | wc -l | xargs) + +print_vars() { + echo "scripts: $SCRIPTS" + echo "gambit: $GAMBIT" + echo "configs: $CONFIGS" + echo "regressions: $REGRESSIONS" + echo "temporary regressions: $TMP_REGRESSIONS" + +} + +build_release() { + old_dir=$(pwd) + cd "$GAMBIT" || exit 1 + cargo build --release + + cd "$old_dir" || exit 1 +} + +clean_state() { + [ -e "$TMP_REGRESSIONS" ] && { + echo "Removing temporary regressions directory $TMP_REGRESSIONS" + rm -rf "$TMP_REGRESSIONS" + } +} + +setup() { + echo "Making temporary regressions directory at $TMP_REGRESSIONS" + mkdir -p "$TMP_REGRESSIONS" } -echo "Making regressions directory at $REGRESSIONS" -mkdir -p "$REGRESSIONS" -echo "Running conf files" -for conf_path in "$CONFIGS"/*; do - echo - echo - printf "\033[1m- Conf path: %s\033[0m\n" "$conf_path" +run_regressions() { + echo "Running on $NUM_CONFIGS configurations" + starting_dir=$(pwd) + failed_confs=() + conf_idx=0 + failed=false + for conf_path in "$CONFIGS"/*; do + conf_idx=$((conf_idx + 1)) + echo + echo + printf "\033[1mConfiguration %s/%s: %s\033[0m\n" "$conf_idx" "$NUM_CONFIGS" "$conf_path" - conf=$(basename "$conf_path") - outdir="$REGRESSIONS"/"$conf" + conf=$(basename "$conf_path") + outdir="$TMP_REGRESSIONS"/"$conf" - ( cd "$GAMBIT" || { echo "Error: couldn't cd $GAMBIT" exit 1 } printf " \033[1mRunning:\033[0m %s\n" "gambit mutate --json $conf_path" - stdout="$(cargo run -- mutate --json "$conf_path")" + stdout="$("$GAMBIT_EXECUTABLE" mutate --json "$conf_path")" + exit_code=$? + if [ $exit_code -ne 0 ]; then + printf "\033[31;1m[!] Failed to run config %s\n" "$conf_path" + failed=true + failed_confs+=("$conf_path") + fi printf " \033[1mGambit Output:\033[0m '\033[3m%s\033[0m'\n" "$stdout" mv gambit_out "$outdir" printf " \033[1mMoving Outdir:\033[0m to %s\n" "$outdir" bash "$SCRIPTS"/remove_sourceroots.sh "$outdir/gambit_results.json" - ) - printf " \033[1mWrote regression:\033[0m %s\n" "$outdir" + cd "$starting_dir" || exit 1 + + done + +} + +summary() { + printf "\n\n\033[1m SUMMARY OF make_regressions.sh\n\n\033[0m" + + if $failed; then + + printf "[✘] \033[31;1m%s/%s configurations failed to run:\033[0m\n" "${#failed_confs[@]}" "$NUM_CONFIGS" + idx=0 + for conf in "${failed_confs[@]}"; do + idx=$((idx + 1)) + echo " ($idx) $conf" + done + + printf "\n\nRegression tests were not updated\n" + printf "Temporary regression tests were cleaned up" + clean_state + exit 101 + else + printf "[✔] \033[32;1m All %s configurations ran successfully\033[0m\n" "$NUM_CONFIGS" + [ -e "$REGRESSIONS" ] && { + echo "Removing old regressions" + rm -rf "$REGRESSIONS" + } + echo "Moving Temporary regessions to regressions location" + echo " $TMP_REGRESSIONS -> $REGRESSIONS" + clean_state + fi +} -done +print_vars +build_release +clean_state +setup +run_regressions +summary From 5d777988215f97e4b535ee7da78ec62c3fe42cfe Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 26 Jul 2023 11:36:36 -0700 Subject: [PATCH 048/200] Fixed bug in benchmarks --- benchmarks/config-jsons/test_multiple_files_1.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/benchmarks/config-jsons/test_multiple_files_1.json b/benchmarks/config-jsons/test_multiple_files_1.json index 1f75554b..ab78b973 100644 --- a/benchmarks/config-jsons/test_multiple_files_1.json +++ b/benchmarks/config-jsons/test_multiple_files_1.json @@ -10,9 +10,6 @@ "contract": "C", "functions": [ "getarray" - ], - "mutations": [ - "function-call-mutation" ] } ] \ No newline at end of file From b003096b38ca7f0840c2baa37ee193825b4df457 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 26 Jul 2023 11:37:04 -0700 Subject: [PATCH 049/200] Updated regressions --- .../regressions/all.json/gambit_results.json | 464 ---- .../AssignmentMutation.sol_json.ast | 518 ----- .../AssignmentMutation.sol_json.ast.json | 518 ----- .../input_json/BinaryOpMutation.sol_json.ast | 1183 ---------- .../BinaryOpMutation.sol_json.ast.json | 1183 ---------- .../DeleteExpressionMutation.sol_json.ast | 440 ---- ...DeleteExpressionMutation.sol_json.ast.json | 440 ---- .../ElimDelegateMutation.sol_json.ast | 997 --------- .../ElimDelegateMutation.sol_json.ast.json | 997 --------- .../FunctionCallMutation.sol_json.ast | 458 ---- .../FunctionCallMutation.sol_json.ast.json | 458 ---- .../IfStatementMutation.sol_json.ast | 248 --- .../IfStatementMutation.sol_json.ast.json | 248 --- .../input_json/RequireMutation.sol_json.ast | 439 ---- .../RequireMutation.sol_json.ast.json | 439 ---- ...SwapArgumentsFunctionMutation.sol_json.ast | 458 ---- ...rgumentsFunctionMutation.sol_json.ast.json | 458 ---- ...SwapArgumentsOperatorMutation.sol_json.ast | 1931 ----------------- ...rgumentsOperatorMutation.sol_json.ast.json | 1931 ----------------- .../UnaryOperatorMutation.sol_json.ast | 794 ------- .../UnaryOperatorMutation.sol_json.ast.json | 794 ------- resources/regressions/all.json/mutants.log | 66 - .../1/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../10/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../11/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../12/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../13/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../14/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../15/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../16/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../17/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../18/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../19/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../2/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../20/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../21/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../22/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../23/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../24/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../25/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../26/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../27/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../28/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../29/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../3/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../30/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../31/RequireMutation/RequireMutation.sol | 13 - .../32/RequireMutation/RequireMutation.sol | 13 - .../33/RequireMutation/RequireMutation.sol | 13 - .../34/RequireMutation/RequireMutation.sol | 13 - .../35/RequireMutation/RequireMutation.sol | 13 - .../36/RequireMutation/RequireMutation.sol | 13 - .../AssignmentMutation/AssignmentMutation.sol | 20 - .../AssignmentMutation/AssignmentMutation.sol | 20 - .../AssignmentMutation/AssignmentMutation.sol | 20 - .../4/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../AssignmentMutation/AssignmentMutation.sol | 20 - .../AssignmentMutation/AssignmentMutation.sol | 20 - .../AssignmentMutation/AssignmentMutation.sol | 20 - .../AssignmentMutation/AssignmentMutation.sol | 20 - .../AssignmentMutation/AssignmentMutation.sol | 20 - .../DeleteExpressionMutation.sol | 15 - .../IfStatementMutation.sol | 15 - .../IfStatementMutation.sol | 15 - .../SwapArgumentsOperatorMutation.sol | 46 - .../SwapArgumentsOperatorMutation.sol | 46 - .../5/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../SwapArgumentsOperatorMutation.sol | 46 - .../SwapArgumentsOperatorMutation.sol | 46 - .../SwapArgumentsOperatorMutation.sol | 46 - .../SwapArgumentsOperatorMutation.sol | 46 - .../SwapArgumentsOperatorMutation.sol | 46 - .../SwapArgumentsOperatorMutation.sol | 46 - .../SwapArgumentsOperatorMutation.sol | 46 - .../SwapArgumentsOperatorMutation.sol | 46 - .../UnaryOperatorMutation.sol | 28 - .../UnaryOperatorMutation.sol | 28 - .../6/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../UnaryOperatorMutation.sol | 28 - .../UnaryOperatorMutation.sol | 28 - .../UnaryOperatorMutation.sol | 28 - .../UnaryOperatorMutation.sol | 28 - .../UnaryOperatorMutation.sol | 28 - .../UnaryOperatorMutation.sol | 28 - .../ElimDelegateMutation.sol | 32 - .../7/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../8/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../9/BinaryOpMutation/BinaryOpMutation.sol | 31 - .../gambit_results.json | 44 - .../input_json/C.sol_json.ast | 1828 ---------------- .../input_json/C.sol_json.ast.json | 1828 ---------------- .../multiple-contracts-1.json/mutants.log | 6 - .../mutants/1/MultipleContracts/C.sol | 41 - .../mutants/2/MultipleContracts/C.sol | 41 - .../mutants/3/MultipleContracts/C.sol | 41 - .../mutants/4/MultipleContracts/C.sol | 41 - .../mutants/5/MultipleContracts/C.sol | 41 - .../mutants/6/MultipleContracts/C.sol | 41 - .../gambit_results.json | 72 - .../input_json/C.sol_json.ast | 1828 ---------------- .../input_json/C.sol_json.ast.json | 1828 ---------------- .../multiple-contracts-2.json/mutants.log | 10 - .../mutants/1/MultipleContracts/C.sol | 41 - .../mutants/10/MultipleContracts/C.sol | 41 - .../mutants/2/MultipleContracts/C.sol | 41 - .../mutants/3/MultipleContracts/C.sol | 41 - .../mutants/4/MultipleContracts/C.sol | 41 - .../mutants/5/MultipleContracts/C.sol | 41 - .../mutants/6/MultipleContracts/C.sol | 41 - .../mutants/7/MultipleContracts/C.sol | 41 - .../mutants/8/MultipleContracts/C.sol | 41 - .../mutants/9/MultipleContracts/C.sol | 41 - .../gambit_results.json | 100 - .../input_json/C.sol_json.ast | 1828 ---------------- .../input_json/C.sol_json.ast.json | 1828 ---------------- .../multiple-contracts-3.json/mutants.log | 14 - .../mutants/1/MultipleContracts/C.sol | 41 - .../mutants/10/MultipleContracts/C.sol | 41 - .../mutants/11/MultipleContracts/C.sol | 41 - .../mutants/12/MultipleContracts/C.sol | 41 - .../mutants/13/MultipleContracts/C.sol | 41 - .../mutants/14/MultipleContracts/C.sol | 41 - .../mutants/2/MultipleContracts/C.sol | 41 - .../mutants/3/MultipleContracts/C.sol | 41 - .../mutants/4/MultipleContracts/C.sol | 41 - .../mutants/5/MultipleContracts/C.sol | 41 - .../mutants/6/MultipleContracts/C.sol | 41 - .../mutants/7/MultipleContracts/C.sol | 41 - .../mutants/8/MultipleContracts/C.sol | 41 - .../mutants/9/MultipleContracts/C.sol | 41 - .../gambit_results.json | 58 - .../input_json/C.sol_json.ast | 1828 ---------------- .../input_json/C.sol_json.ast.json | 1828 ---------------- .../multiple-contracts-4.json/mutants.log | 8 - .../mutants/1/MultipleContracts/C.sol | 41 - .../mutants/2/MultipleContracts/C.sol | 41 - .../mutants/3/MultipleContracts/C.sol | 41 - .../mutants/4/MultipleContracts/C.sol | 41 - .../mutants/5/MultipleContracts/C.sol | 41 - .../mutants/6/MultipleContracts/C.sol | 41 - .../mutants/7/MultipleContracts/C.sol | 41 - .../mutants/8/MultipleContracts/C.sol | 41 - .../sanity-config.json/gambit_results.json | 9 - .../input_json/BinaryOpMutation.sol_json.ast | 1183 ---------- .../BinaryOpMutation.sol_json.ast.json | 1183 ---------- .../sanity-config.json/mutants.log | 1 - .../mutants/1/BinaryOpMutation.sol | 31 - .../test1.json/gambit_results.json | 44 - .../input_json/TenPower.sol_json.ast | 334 --- .../input_json/TenPower.sol_json.ast.json | 334 --- resources/regressions/test1.json/mutants.log | 6 - .../test1.json/mutants/1/10Power/TenPower.sol | 13 - .../test1.json/mutants/2/10Power/TenPower.sol | 13 - .../test1.json/mutants/3/10Power/TenPower.sol | 13 - .../test1.json/mutants/4/10Power/TenPower.sol | 13 - .../test1.json/mutants/5/10Power/TenPower.sol | 13 - .../test1.json/mutants/6/10Power/TenPower.sol | 13 - .../test2.json/gambit_results.json | 44 - .../input_json/TenPower.sol_json.ast | 334 --- .../input_json/TenPower.sol_json.ast.json | 334 --- resources/regressions/test2.json/mutants.log | 6 - .../test2.json/mutants/1/10Power/TenPower.sol | 13 - .../test2.json/mutants/2/10Power/TenPower.sol | 13 - .../test2.json/mutants/3/10Power/TenPower.sol | 13 - .../test2.json/mutants/4/10Power/TenPower.sol | 13 - .../test2.json/mutants/5/10Power/TenPower.sol | 13 - .../test2.json/mutants/6/10Power/TenPower.sol | 13 - .../test3.json/gambit_results.json | 44 - .../test3.json/input_json/C.sol_json.ast | 1828 ---------------- .../test3.json/input_json/C.sol_json.ast.json | 1828 ---------------- .../input_json/TenPower.sol_json.ast | 334 --- .../input_json/TenPower.sol_json.ast.json | 334 --- resources/regressions/test3.json/mutants.log | 6 - .../test3.json/mutants/1/10Power/TenPower.sol | 13 - .../test3.json/mutants/2/10Power/TenPower.sol | 13 - .../test3.json/mutants/3/10Power/TenPower.sol | 13 - .../test3.json/mutants/4/10Power/TenPower.sol | 13 - .../test3.json/mutants/5/10Power/TenPower.sol | 13 - .../test3.json/mutants/6/10Power/TenPower.sol | 13 - .../test4.json/gambit_results.json | 44 - .../test4.json/input_json/C.sol_json.ast | 1828 ---------------- .../test4.json/input_json/C.sol_json.ast.json | 1828 ---------------- .../input_json/TenPower.sol_json.ast | 334 --- .../input_json/TenPower.sol_json.ast.json | 334 --- resources/regressions/test4.json/mutants.log | 6 - .../test4.json/mutants/1/10Power/TenPower.sol | 13 - .../test4.json/mutants/2/10Power/TenPower.sol | 13 - .../test4.json/mutants/3/10Power/TenPower.sol | 13 - .../test4.json/mutants/4/10Power/TenPower.sol | 13 - .../test4.json/mutants/5/10Power/TenPower.sol | 13 - .../test4.json/mutants/6/10Power/TenPower.sol | 13 - .../test5.json/gambit_results.json | 72 - .../test5.json/input_json/C.sol_json.ast | 1828 ---------------- .../test5.json/input_json/C.sol_json.ast.json | 1828 ---------------- .../input_json/TenPower.sol_json.ast | 334 --- .../input_json/TenPower.sol_json.ast.json | 334 --- resources/regressions/test5.json/mutants.log | 10 - .../test5.json/mutants/1/10Power/TenPower.sol | 13 - .../mutants/10/MultipleContracts/C.sol | 41 - .../test5.json/mutants/2/10Power/TenPower.sol | 13 - .../test5.json/mutants/3/10Power/TenPower.sol | 13 - .../test5.json/mutants/4/10Power/TenPower.sol | 13 - .../test5.json/mutants/5/10Power/TenPower.sol | 13 - .../test5.json/mutants/6/10Power/TenPower.sol | 13 - .../mutants/7/MultipleContracts/C.sol | 41 - .../mutants/8/MultipleContracts/C.sol | 41 - .../mutants/9/MultipleContracts/C.sol | 41 - 207 files changed, 51436 deletions(-) delete mode 100644 resources/regressions/all.json/gambit_results.json delete mode 100644 resources/regressions/all.json/input_json/AssignmentMutation.sol_json.ast delete mode 100644 resources/regressions/all.json/input_json/AssignmentMutation.sol_json.ast.json delete mode 100644 resources/regressions/all.json/input_json/BinaryOpMutation.sol_json.ast delete mode 100644 resources/regressions/all.json/input_json/BinaryOpMutation.sol_json.ast.json delete mode 100644 resources/regressions/all.json/input_json/DeleteExpressionMutation.sol_json.ast delete mode 100644 resources/regressions/all.json/input_json/DeleteExpressionMutation.sol_json.ast.json delete mode 100644 resources/regressions/all.json/input_json/ElimDelegateMutation.sol_json.ast delete mode 100644 resources/regressions/all.json/input_json/ElimDelegateMutation.sol_json.ast.json delete mode 100644 resources/regressions/all.json/input_json/FunctionCallMutation.sol_json.ast delete mode 100644 resources/regressions/all.json/input_json/FunctionCallMutation.sol_json.ast.json delete mode 100644 resources/regressions/all.json/input_json/IfStatementMutation.sol_json.ast delete mode 100644 resources/regressions/all.json/input_json/IfStatementMutation.sol_json.ast.json delete mode 100644 resources/regressions/all.json/input_json/RequireMutation.sol_json.ast delete mode 100644 resources/regressions/all.json/input_json/RequireMutation.sol_json.ast.json delete mode 100644 resources/regressions/all.json/input_json/SwapArgumentsFunctionMutation.sol_json.ast delete mode 100644 resources/regressions/all.json/input_json/SwapArgumentsFunctionMutation.sol_json.ast.json delete mode 100644 resources/regressions/all.json/input_json/SwapArgumentsOperatorMutation.sol_json.ast delete mode 100644 resources/regressions/all.json/input_json/SwapArgumentsOperatorMutation.sol_json.ast.json delete mode 100644 resources/regressions/all.json/input_json/UnaryOperatorMutation.sol_json.ast delete mode 100644 resources/regressions/all.json/input_json/UnaryOperatorMutation.sol_json.ast.json delete mode 100644 resources/regressions/all.json/mutants.log delete mode 100644 resources/regressions/all.json/mutants/1/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/10/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/11/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/12/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/13/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/14/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/15/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/16/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/17/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/18/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/19/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/2/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/20/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/21/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/22/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/23/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/24/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/25/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/26/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/27/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/28/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/29/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/3/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/30/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/31/RequireMutation/RequireMutation.sol delete mode 100644 resources/regressions/all.json/mutants/32/RequireMutation/RequireMutation.sol delete mode 100644 resources/regressions/all.json/mutants/33/RequireMutation/RequireMutation.sol delete mode 100644 resources/regressions/all.json/mutants/34/RequireMutation/RequireMutation.sol delete mode 100644 resources/regressions/all.json/mutants/35/RequireMutation/RequireMutation.sol delete mode 100644 resources/regressions/all.json/mutants/36/RequireMutation/RequireMutation.sol delete mode 100644 resources/regressions/all.json/mutants/37/AssignmentMutation/AssignmentMutation.sol delete mode 100644 resources/regressions/all.json/mutants/38/AssignmentMutation/AssignmentMutation.sol delete mode 100644 resources/regressions/all.json/mutants/39/AssignmentMutation/AssignmentMutation.sol delete mode 100644 resources/regressions/all.json/mutants/4/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/40/AssignmentMutation/AssignmentMutation.sol delete mode 100644 resources/regressions/all.json/mutants/41/AssignmentMutation/AssignmentMutation.sol delete mode 100644 resources/regressions/all.json/mutants/42/AssignmentMutation/AssignmentMutation.sol delete mode 100644 resources/regressions/all.json/mutants/43/AssignmentMutation/AssignmentMutation.sol delete mode 100644 resources/regressions/all.json/mutants/44/AssignmentMutation/AssignmentMutation.sol delete mode 100644 resources/regressions/all.json/mutants/45/DeleteExpressionMutation/DeleteExpressionMutation.sol delete mode 100644 resources/regressions/all.json/mutants/46/IfStatementMutation/IfStatementMutation.sol delete mode 100644 resources/regressions/all.json/mutants/47/IfStatementMutation/IfStatementMutation.sol delete mode 100644 resources/regressions/all.json/mutants/48/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/49/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/5/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/50/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/51/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/52/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/53/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/54/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/55/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/56/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/57/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/58/UnaryOperatorMutation/UnaryOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/59/UnaryOperatorMutation/UnaryOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/6/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/60/UnaryOperatorMutation/UnaryOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/61/UnaryOperatorMutation/UnaryOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/62/UnaryOperatorMutation/UnaryOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/63/UnaryOperatorMutation/UnaryOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/64/UnaryOperatorMutation/UnaryOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/65/UnaryOperatorMutation/UnaryOperatorMutation.sol delete mode 100644 resources/regressions/all.json/mutants/66/ElimDelegateMutation/ElimDelegateMutation.sol delete mode 100644 resources/regressions/all.json/mutants/7/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/8/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/all.json/mutants/9/BinaryOpMutation/BinaryOpMutation.sol delete mode 100644 resources/regressions/multiple-contracts-1.json/gambit_results.json delete mode 100644 resources/regressions/multiple-contracts-1.json/input_json/C.sol_json.ast delete mode 100644 resources/regressions/multiple-contracts-1.json/input_json/C.sol_json.ast.json delete mode 100644 resources/regressions/multiple-contracts-1.json/mutants.log delete mode 100644 resources/regressions/multiple-contracts-1.json/mutants/1/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-1.json/mutants/2/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-1.json/mutants/3/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-1.json/mutants/4/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-1.json/mutants/5/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-1.json/mutants/6/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-2.json/gambit_results.json delete mode 100644 resources/regressions/multiple-contracts-2.json/input_json/C.sol_json.ast delete mode 100644 resources/regressions/multiple-contracts-2.json/input_json/C.sol_json.ast.json delete mode 100644 resources/regressions/multiple-contracts-2.json/mutants.log delete mode 100644 resources/regressions/multiple-contracts-2.json/mutants/1/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-2.json/mutants/10/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-2.json/mutants/2/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-2.json/mutants/3/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-2.json/mutants/4/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-2.json/mutants/5/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-2.json/mutants/6/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-2.json/mutants/7/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-2.json/mutants/8/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-2.json/mutants/9/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-3.json/gambit_results.json delete mode 100644 resources/regressions/multiple-contracts-3.json/input_json/C.sol_json.ast delete mode 100644 resources/regressions/multiple-contracts-3.json/input_json/C.sol_json.ast.json delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants.log delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants/1/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants/10/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants/11/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants/12/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants/13/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants/14/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants/2/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants/3/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants/4/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants/5/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants/6/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants/7/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants/8/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-3.json/mutants/9/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-4.json/gambit_results.json delete mode 100644 resources/regressions/multiple-contracts-4.json/input_json/C.sol_json.ast delete mode 100644 resources/regressions/multiple-contracts-4.json/input_json/C.sol_json.ast.json delete mode 100644 resources/regressions/multiple-contracts-4.json/mutants.log delete mode 100644 resources/regressions/multiple-contracts-4.json/mutants/1/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-4.json/mutants/2/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-4.json/mutants/3/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-4.json/mutants/4/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-4.json/mutants/5/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-4.json/mutants/6/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-4.json/mutants/7/MultipleContracts/C.sol delete mode 100644 resources/regressions/multiple-contracts-4.json/mutants/8/MultipleContracts/C.sol delete mode 100644 resources/regressions/sanity-config.json/gambit_results.json delete mode 100644 resources/regressions/sanity-config.json/input_json/BinaryOpMutation.sol_json.ast delete mode 100644 resources/regressions/sanity-config.json/input_json/BinaryOpMutation.sol_json.ast.json delete mode 100644 resources/regressions/sanity-config.json/mutants.log delete mode 100644 resources/regressions/sanity-config.json/mutants/1/BinaryOpMutation.sol delete mode 100644 resources/regressions/test1.json/gambit_results.json delete mode 100644 resources/regressions/test1.json/input_json/TenPower.sol_json.ast delete mode 100644 resources/regressions/test1.json/input_json/TenPower.sol_json.ast.json delete mode 100644 resources/regressions/test1.json/mutants.log delete mode 100644 resources/regressions/test1.json/mutants/1/10Power/TenPower.sol delete mode 100644 resources/regressions/test1.json/mutants/2/10Power/TenPower.sol delete mode 100644 resources/regressions/test1.json/mutants/3/10Power/TenPower.sol delete mode 100644 resources/regressions/test1.json/mutants/4/10Power/TenPower.sol delete mode 100644 resources/regressions/test1.json/mutants/5/10Power/TenPower.sol delete mode 100644 resources/regressions/test1.json/mutants/6/10Power/TenPower.sol delete mode 100644 resources/regressions/test2.json/gambit_results.json delete mode 100644 resources/regressions/test2.json/input_json/TenPower.sol_json.ast delete mode 100644 resources/regressions/test2.json/input_json/TenPower.sol_json.ast.json delete mode 100644 resources/regressions/test2.json/mutants.log delete mode 100644 resources/regressions/test2.json/mutants/1/10Power/TenPower.sol delete mode 100644 resources/regressions/test2.json/mutants/2/10Power/TenPower.sol delete mode 100644 resources/regressions/test2.json/mutants/3/10Power/TenPower.sol delete mode 100644 resources/regressions/test2.json/mutants/4/10Power/TenPower.sol delete mode 100644 resources/regressions/test2.json/mutants/5/10Power/TenPower.sol delete mode 100644 resources/regressions/test2.json/mutants/6/10Power/TenPower.sol delete mode 100644 resources/regressions/test3.json/gambit_results.json delete mode 100644 resources/regressions/test3.json/input_json/C.sol_json.ast delete mode 100644 resources/regressions/test3.json/input_json/C.sol_json.ast.json delete mode 100644 resources/regressions/test3.json/input_json/TenPower.sol_json.ast delete mode 100644 resources/regressions/test3.json/input_json/TenPower.sol_json.ast.json delete mode 100644 resources/regressions/test3.json/mutants.log delete mode 100644 resources/regressions/test3.json/mutants/1/10Power/TenPower.sol delete mode 100644 resources/regressions/test3.json/mutants/2/10Power/TenPower.sol delete mode 100644 resources/regressions/test3.json/mutants/3/10Power/TenPower.sol delete mode 100644 resources/regressions/test3.json/mutants/4/10Power/TenPower.sol delete mode 100644 resources/regressions/test3.json/mutants/5/10Power/TenPower.sol delete mode 100644 resources/regressions/test3.json/mutants/6/10Power/TenPower.sol delete mode 100644 resources/regressions/test4.json/gambit_results.json delete mode 100644 resources/regressions/test4.json/input_json/C.sol_json.ast delete mode 100644 resources/regressions/test4.json/input_json/C.sol_json.ast.json delete mode 100644 resources/regressions/test4.json/input_json/TenPower.sol_json.ast delete mode 100644 resources/regressions/test4.json/input_json/TenPower.sol_json.ast.json delete mode 100644 resources/regressions/test4.json/mutants.log delete mode 100644 resources/regressions/test4.json/mutants/1/10Power/TenPower.sol delete mode 100644 resources/regressions/test4.json/mutants/2/10Power/TenPower.sol delete mode 100644 resources/regressions/test4.json/mutants/3/10Power/TenPower.sol delete mode 100644 resources/regressions/test4.json/mutants/4/10Power/TenPower.sol delete mode 100644 resources/regressions/test4.json/mutants/5/10Power/TenPower.sol delete mode 100644 resources/regressions/test4.json/mutants/6/10Power/TenPower.sol delete mode 100644 resources/regressions/test5.json/gambit_results.json delete mode 100644 resources/regressions/test5.json/input_json/C.sol_json.ast delete mode 100644 resources/regressions/test5.json/input_json/C.sol_json.ast.json delete mode 100644 resources/regressions/test5.json/input_json/TenPower.sol_json.ast delete mode 100644 resources/regressions/test5.json/input_json/TenPower.sol_json.ast.json delete mode 100644 resources/regressions/test5.json/mutants.log delete mode 100644 resources/regressions/test5.json/mutants/1/10Power/TenPower.sol delete mode 100644 resources/regressions/test5.json/mutants/10/MultipleContracts/C.sol delete mode 100644 resources/regressions/test5.json/mutants/2/10Power/TenPower.sol delete mode 100644 resources/regressions/test5.json/mutants/3/10Power/TenPower.sol delete mode 100644 resources/regressions/test5.json/mutants/4/10Power/TenPower.sol delete mode 100644 resources/regressions/test5.json/mutants/5/10Power/TenPower.sol delete mode 100644 resources/regressions/test5.json/mutants/6/10Power/TenPower.sol delete mode 100644 resources/regressions/test5.json/mutants/7/MultipleContracts/C.sol delete mode 100644 resources/regressions/test5.json/mutants/8/MultipleContracts/C.sol delete mode 100644 resources/regressions/test5.json/mutants/9/MultipleContracts/C.sol diff --git a/resources/regressions/all.json/gambit_results.json b/resources/regressions/all.json/gambit_results.json deleted file mode 100644 index 9ffd8ccb..00000000 --- a/resources/regressions/all.json/gambit_results.json +++ /dev/null @@ -1,464 +0,0 @@ -[ - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -4,7 +4,8 @@\n \n contract BinaryOpMutation {\n function myAddition(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x + y;\n+\t/// BinaryOpMutation(`+` |==> `-`) of: `return x + y;`\n+\treturn x-y;\n }\n \n function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "1", - "name": "mutants/1/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -4,7 +4,8 @@\n \n contract BinaryOpMutation {\n function myAddition(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x + y;\n+\t/// BinaryOpMutation(`+` |==> `*`) of: `return x + y;`\n+\treturn x*y;\n }\n \n function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "2", - "name": "mutants/2/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -4,7 +4,8 @@\n \n contract BinaryOpMutation {\n function myAddition(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x + y;\n+\t/// BinaryOpMutation(`+` |==> `/`) of: `return x + y;`\n+\treturn x/y;\n }\n \n function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "3", - "name": "mutants/3/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -4,7 +4,8 @@\n \n contract BinaryOpMutation {\n function myAddition(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x + y;\n+\t/// BinaryOpMutation(`+` |==> `%`) of: `return x + y;`\n+\treturn x%y;\n }\n \n function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "4", - "name": "mutants/4/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -4,7 +4,8 @@\n \n contract BinaryOpMutation {\n function myAddition(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x + y;\n+\t/// BinaryOpMutation(`+` |==> `**`) of: `return x + y;`\n+\treturn x**y;\n }\n \n function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "5", - "name": "mutants/5/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x - y;\n+\t/// BinaryOpMutation(`-` |==> `+`) of: `return x - y;`\n+\treturn x+y;\n }\n \n function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "6", - "name": "mutants/6/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x - y;\n+\t/// BinaryOpMutation(`-` |==> `*`) of: `return x - y;`\n+\treturn x*y;\n }\n \n function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "7", - "name": "mutants/7/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x - y;\n+\t/// BinaryOpMutation(`-` |==> `/`) of: `return x - y;`\n+\treturn x/y;\n }\n \n function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "8", - "name": "mutants/8/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x - y;\n+\t/// BinaryOpMutation(`-` |==> `%`) of: `return x - y;`\n+\treturn x%y;\n }\n \n function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "9", - "name": "mutants/9/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x - y;\n+\t/// BinaryOpMutation(`-` |==> `**`) of: `return x - y;`\n+\treturn x**y;\n }\n \n function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "10", - "name": "mutants/10/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -12,7 +12,8 @@\n }\n \n function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x * y;\n+\t/// BinaryOpMutation(`*` |==> `+`) of: `return x * y;`\n+\treturn x+y;\n }\n \n function myDivision(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "11", - "name": "mutants/11/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -12,7 +12,8 @@\n }\n \n function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x * y;\n+\t/// BinaryOpMutation(`*` |==> `-`) of: `return x * y;`\n+\treturn x-y;\n }\n \n function myDivision(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "12", - "name": "mutants/12/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -12,7 +12,8 @@\n }\n \n function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x * y;\n+\t/// BinaryOpMutation(`*` |==> `/`) of: `return x * y;`\n+\treturn x/y;\n }\n \n function myDivision(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "13", - "name": "mutants/13/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -12,7 +12,8 @@\n }\n \n function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x * y;\n+\t/// BinaryOpMutation(`*` |==> `%`) of: `return x * y;`\n+\treturn x%y;\n }\n \n function myDivision(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "14", - "name": "mutants/14/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -12,7 +12,8 @@\n }\n \n function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x * y;\n+\t/// BinaryOpMutation(`*` |==> `**`) of: `return x * y;`\n+\treturn x**y;\n }\n \n function myDivision(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "15", - "name": "mutants/15/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -16,7 +16,8 @@\n }\n \n function myDivision(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x / y;\n+\t/// BinaryOpMutation(`/` |==> `+`) of: `return x / y;`\n+\treturn x+y;\n }\n \n function myModulo(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "16", - "name": "mutants/16/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -16,7 +16,8 @@\n }\n \n function myDivision(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x / y;\n+\t/// BinaryOpMutation(`/` |==> `-`) of: `return x / y;`\n+\treturn x-y;\n }\n \n function myModulo(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "17", - "name": "mutants/17/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -16,7 +16,8 @@\n }\n \n function myDivision(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x / y;\n+\t/// BinaryOpMutation(`/` |==> `*`) of: `return x / y;`\n+\treturn x*y;\n }\n \n function myModulo(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "18", - "name": "mutants/18/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -16,7 +16,8 @@\n }\n \n function myDivision(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x / y;\n+\t/// BinaryOpMutation(`/` |==> `%`) of: `return x / y;`\n+\treturn x%y;\n }\n \n function myModulo(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "19", - "name": "mutants/19/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -16,7 +16,8 @@\n }\n \n function myDivision(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x / y;\n+\t/// BinaryOpMutation(`/` |==> `**`) of: `return x / y;`\n+\treturn x**y;\n }\n \n function myModulo(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "20", - "name": "mutants/20/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -20,7 +20,8 @@\n }\n \n function myModulo(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x % y;\n+\t/// BinaryOpMutation(`%` |==> `+`) of: `return x % y;`\n+\treturn x+y;\n }\n \n function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "21", - "name": "mutants/21/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -20,7 +20,8 @@\n }\n \n function myModulo(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x % y;\n+\t/// BinaryOpMutation(`%` |==> `-`) of: `return x % y;`\n+\treturn x-y;\n }\n \n function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "22", - "name": "mutants/22/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -20,7 +20,8 @@\n }\n \n function myModulo(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x % y;\n+\t/// BinaryOpMutation(`%` |==> `*`) of: `return x % y;`\n+\treturn x*y;\n }\n \n function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "23", - "name": "mutants/23/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -20,7 +20,8 @@\n }\n \n function myModulo(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x % y;\n+\t/// BinaryOpMutation(`%` |==> `/`) of: `return x % y;`\n+\treturn x/y;\n }\n \n function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "24", - "name": "mutants/24/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -20,7 +20,8 @@\n }\n \n function myModulo(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x % y;\n+\t/// BinaryOpMutation(`%` |==> `**`) of: `return x % y;`\n+\treturn x**y;\n }\n \n function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "25", - "name": "mutants/25/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -24,7 +24,8 @@\n }\n \n function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x ** y;\n+\t/// BinaryOpMutation(`**` |==> `+`) of: `return x ** y;`\n+\treturn x+y;\n }\n \n }\n", - "id": "26", - "name": "mutants/26/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -24,7 +24,8 @@\n }\n \n function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x ** y;\n+\t/// BinaryOpMutation(`**` |==> `-`) of: `return x ** y;`\n+\treturn x-y;\n }\n \n }\n", - "id": "27", - "name": "mutants/27/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -24,7 +24,8 @@\n }\n \n function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x ** y;\n+\t/// BinaryOpMutation(`**` |==> `*`) of: `return x ** y;`\n+\treturn x*y;\n }\n \n }\n", - "id": "28", - "name": "mutants/28/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -24,7 +24,8 @@\n }\n \n function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x ** y;\n+\t/// BinaryOpMutation(`**` |==> `/`) of: `return x ** y;`\n+\treturn x/y;\n }\n \n }\n", - "id": "29", - "name": "mutants/29/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -24,7 +24,8 @@\n }\n \n function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x ** y;\n+\t/// BinaryOpMutation(`**` |==> `%`) of: `return x ** y;`\n+\treturn x%y;\n }\n \n }\n", - "id": "30", - "name": "mutants/30/BinaryOpMutation/BinaryOpMutation.sol", - "original": "BinaryOpMutation/BinaryOpMutation.sol", - }, - { - "description": "RequireMutation", - "diff": "--- original\n+++ mutant\n@@ -4,7 +4,8 @@\n \n contract RequireMutation {\n function myRequires(bool cond1, bool cond2, bool cond3) public pure returns (bool) {\n-\trequire(cond1);\n+\t/// RequireMutation(`cond1` |==> `true`) of: `require(cond1);`\n+\trequire(true);\n \trequire(cond2);\n \trequire(cond3);\n \treturn true;\n", - "id": "31", - "name": "mutants/31/RequireMutation/RequireMutation.sol", - "original": "RequireMutation/RequireMutation.sol", - }, - { - "description": "RequireMutation", - "diff": "--- original\n+++ mutant\n@@ -4,7 +4,8 @@\n \n contract RequireMutation {\n function myRequires(bool cond1, bool cond2, bool cond3) public pure returns (bool) {\n-\trequire(cond1);\n+\t/// RequireMutation(`cond1` |==> `false`) of: `require(cond1);`\n+\trequire(false);\n \trequire(cond2);\n \trequire(cond3);\n \treturn true;\n", - "id": "32", - "name": "mutants/32/RequireMutation/RequireMutation.sol", - "original": "RequireMutation/RequireMutation.sol", - }, - { - "description": "RequireMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract RequireMutation {\n function myRequires(bool cond1, bool cond2, bool cond3) public pure returns (bool) {\n \trequire(cond1);\n-\trequire(cond2);\n+\t/// RequireMutation(`cond2` |==> `true`) of: `require(cond2);`\n+\trequire(true);\n \trequire(cond3);\n \treturn true;\n }\n", - "id": "33", - "name": "mutants/33/RequireMutation/RequireMutation.sol", - "original": "RequireMutation/RequireMutation.sol", - }, - { - "description": "RequireMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract RequireMutation {\n function myRequires(bool cond1, bool cond2, bool cond3) public pure returns (bool) {\n \trequire(cond1);\n-\trequire(cond2);\n+\t/// RequireMutation(`cond2` |==> `false`) of: `require(cond2);`\n+\trequire(false);\n \trequire(cond3);\n \treturn true;\n }\n", - "id": "34", - "name": "mutants/34/RequireMutation/RequireMutation.sol", - "original": "RequireMutation/RequireMutation.sol", - }, - { - "description": "RequireMutation", - "diff": "--- original\n+++ mutant\n@@ -6,7 +6,8 @@\n function myRequires(bool cond1, bool cond2, bool cond3) public pure returns (bool) {\n \trequire(cond1);\n \trequire(cond2);\n-\trequire(cond3);\n+\t/// RequireMutation(`cond3` |==> `true`) of: `require(cond3);`\n+\trequire(true);\n \treturn true;\n }\n }\n", - "id": "35", - "name": "mutants/35/RequireMutation/RequireMutation.sol", - "original": "RequireMutation/RequireMutation.sol", - }, - { - "description": "RequireMutation", - "diff": "--- original\n+++ mutant\n@@ -6,7 +6,8 @@\n function myRequires(bool cond1, bool cond2, bool cond3) public pure returns (bool) {\n \trequire(cond1);\n \trequire(cond2);\n-\trequire(cond3);\n+\t/// RequireMutation(`cond3` |==> `false`) of: `require(cond3);`\n+\trequire(false);\n \treturn true;\n }\n }\n", - "id": "36", - "name": "mutants/36/RequireMutation/RequireMutation.sol", - "original": "RequireMutation/RequireMutation.sol", - }, - { - "description": "AssignmentMutation", - "diff": "--- original\n+++ mutant\n@@ -10,7 +10,8 @@\n bool public b;\n \n constructor() {\n-\tx = 42; // original: 42\n+\t/// AssignmentMutation(`42` |==> `0`) of: `x = 42; // original: 42`\n+\tx = 0; // original: 42\n \ty = 13; // original: 13\n \tz = 3110; // original: 3110\n \ta = true; // original: true\n", - "id": "37", - "name": "mutants/37/AssignmentMutation/AssignmentMutation.sol", - "original": "AssignmentMutation/AssignmentMutation.sol", - }, - { - "description": "AssignmentMutation", - "diff": "--- original\n+++ mutant\n@@ -10,7 +10,8 @@\n bool public b;\n \n constructor() {\n-\tx = 42; // original: 42\n+\t/// AssignmentMutation(`42` |==> `1`) of: `x = 42; // original: 42`\n+\tx = 1; // original: 42\n \ty = 13; // original: 13\n \tz = 3110; // original: 3110\n \ta = true; // original: true\n", - "id": "38", - "name": "mutants/38/AssignmentMutation/AssignmentMutation.sol", - "original": "AssignmentMutation/AssignmentMutation.sol", - }, - { - "description": "AssignmentMutation", - "diff": "--- original\n+++ mutant\n@@ -11,7 +11,8 @@\n \n constructor() {\n \tx = 42; // original: 42\n-\ty = 13; // original: 13\n+\t/// AssignmentMutation(`13` |==> `0`) of: `y = 13; // original: 13`\n+\ty = 0; // original: 13\n \tz = 3110; // original: 3110\n \ta = true; // original: true\n \tb = false; // original: false\n", - "id": "39", - "name": "mutants/39/AssignmentMutation/AssignmentMutation.sol", - "original": "AssignmentMutation/AssignmentMutation.sol", - }, - { - "description": "AssignmentMutation", - "diff": "--- original\n+++ mutant\n@@ -11,7 +11,8 @@\n \n constructor() {\n \tx = 42; // original: 42\n-\ty = 13; // original: 13\n+\t/// AssignmentMutation(`13` |==> `1`) of: `y = 13; // original: 13`\n+\ty = 1; // original: 13\n \tz = 3110; // original: 3110\n \ta = true; // original: true\n \tb = false; // original: false\n", - "id": "40", - "name": "mutants/40/AssignmentMutation/AssignmentMutation.sol", - "original": "AssignmentMutation/AssignmentMutation.sol", - }, - { - "description": "AssignmentMutation", - "diff": "--- original\n+++ mutant\n@@ -12,7 +12,8 @@\n constructor() {\n \tx = 42; // original: 42\n \ty = 13; // original: 13\n-\tz = 3110; // original: 3110\n+\t/// AssignmentMutation(`3110` |==> `0`) of: `z = 3110; // original: 3110`\n+\tz = 0; // original: 3110\n \ta = true; // original: true\n \tb = false; // original: false\n }\n", - "id": "41", - "name": "mutants/41/AssignmentMutation/AssignmentMutation.sol", - "original": "AssignmentMutation/AssignmentMutation.sol", - }, - { - "description": "AssignmentMutation", - "diff": "--- original\n+++ mutant\n@@ -12,7 +12,8 @@\n constructor() {\n \tx = 42; // original: 42\n \ty = 13; // original: 13\n-\tz = 3110; // original: 3110\n+\t/// AssignmentMutation(`3110` |==> `1`) of: `z = 3110; // original: 3110`\n+\tz = 1; // original: 3110\n \ta = true; // original: true\n \tb = false; // original: false\n }\n", - "id": "42", - "name": "mutants/42/AssignmentMutation/AssignmentMutation.sol", - "original": "AssignmentMutation/AssignmentMutation.sol", - }, - { - "description": "AssignmentMutation", - "diff": "--- original\n+++ mutant\n@@ -13,7 +13,8 @@\n \tx = 42; // original: 42\n \ty = 13; // original: 13\n \tz = 3110; // original: 3110\n-\ta = true; // original: true\n+\t/// AssignmentMutation(`true` |==> `false`) of: `a = true; // original: true`\n+\ta = false; // original: true\n \tb = false; // original: false\n }\n }\n", - "id": "43", - "name": "mutants/43/AssignmentMutation/AssignmentMutation.sol", - "original": "AssignmentMutation/AssignmentMutation.sol", - }, - { - "description": "AssignmentMutation", - "diff": "--- original\n+++ mutant\n@@ -14,6 +14,7 @@\n \ty = 13; // original: 13\n \tz = 3110; // original: 3110\n \ta = true; // original: true\n-\tb = false; // original: false\n+\t/// AssignmentMutation(`false` |==> `true`) of: `b = false; // original: false`\n+\tb = true; // original: false\n }\n }\n", - "id": "44", - "name": "mutants/44/AssignmentMutation/AssignmentMutation.sol", - "original": "AssignmentMutation/AssignmentMutation.sol", - }, - { - "description": "DeleteExpressionMutation", - "diff": "--- original\n+++ mutant\n@@ -6,7 +6,8 @@\n \n function myIdentity(uint256 x) public pure returns (uint256) {\n \tuint256 result = 0;\n-\tfor (uint256 i = 0; i < x; i++) {\n+\t/// DeleteExpressionMutation(`i++` |==> `/* i++ */`) of: `for (uint256 i = 0; i < x; i++) {`\n+\tfor (uint256 i = 0; i < x; /* i++ */) {\n \t result ++;\n \t}\n \treturn result;\n", - "id": "45", - "name": "mutants/45/DeleteExpressionMutation/DeleteExpressionMutation.sol", - "original": "DeleteExpressionMutation/DeleteExpressionMutation.sol", - }, - { - "description": "IfStatementMutation", - "diff": "--- original\n+++ mutant\n@@ -4,7 +4,8 @@\n \n contract IfStatementMutation {\n function myBooleanNegation(bool a) public pure returns (bool) {\n-\tif (a) {\n+\t/// IfStatementMutation(`a` |==> `true`) of: `if (a) {`\n+\tif (true) {\n \t return true;\n \t}\n \telse {\n", - "id": "46", - "name": "mutants/46/IfStatementMutation/IfStatementMutation.sol", - "original": "IfStatementMutation/IfStatementMutation.sol", - }, - { - "description": "IfStatementMutation", - "diff": "--- original\n+++ mutant\n@@ -4,7 +4,8 @@\n \n contract IfStatementMutation {\n function myBooleanNegation(bool a) public pure returns (bool) {\n-\tif (a) {\n+\t/// IfStatementMutation(`a` |==> `false`) of: `if (a) {`\n+\tif (false) {\n \t return true;\n \t}\n \telse {\n", - "id": "47", - "name": "mutants/47/IfStatementMutation/IfStatementMutation.sol", - "original": "IfStatementMutation/IfStatementMutation.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -4,7 +4,8 @@\n \n contract SwapArgumentsOperatorMutation {\n function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x - y;\n+\t/// SwapArgumentsOperatorMutation(`x - y` |==> `y - x`) of: `return x - y;`\n+\treturn y - x;\n }\n \n function myDivision(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "48", - "name": "mutants/48/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "original": "SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function myDivision(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x / y;\n+\t/// SwapArgumentsOperatorMutation(`x / y` |==> `y / x`) of: `return x / y;`\n+\treturn y / x;\n }\n \n function myModulo(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "49", - "name": "mutants/49/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "original": "SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -12,7 +12,8 @@\n }\n \n function myModulo(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x % y;\n+\t/// SwapArgumentsOperatorMutation(`x % y` |==> `y % x`) of: `return x % y;`\n+\treturn y % x;\n }\n \n function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "50", - "name": "mutants/50/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "original": "SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -16,7 +16,8 @@\n }\n \n function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x ** y;\n+\t/// SwapArgumentsOperatorMutation(`x ** y` |==> `y ** x`) of: `return x ** y;`\n+\treturn y ** x;\n }\n \n function myGT(uint256 x, uint256 y) public pure returns (bool) {\n", - "id": "51", - "name": "mutants/51/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "original": "SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -20,7 +20,8 @@\n }\n \n function myGT(uint256 x, uint256 y) public pure returns (bool) {\n-\treturn x > y;\n+\t/// SwapArgumentsOperatorMutation(`x > y` |==> `y > x`) of: `return x > y;`\n+\treturn y > x;\n }\n \n function myLT(uint256 x, uint256 y) public pure returns (bool) {\n", - "id": "52", - "name": "mutants/52/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "original": "SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -24,7 +24,8 @@\n }\n \n function myLT(uint256 x, uint256 y) public pure returns (bool) {\n-\treturn x < y;\n+\t/// SwapArgumentsOperatorMutation(`x < y` |==> `y < x`) of: `return x < y;`\n+\treturn y < x;\n }\n \n function myGE(uint256 x, uint256 y) public pure returns (bool) {\n", - "id": "53", - "name": "mutants/53/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "original": "SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -28,7 +28,8 @@\n }\n \n function myGE(uint256 x, uint256 y) public pure returns (bool) {\n-\treturn x >= y;\n+\t/// SwapArgumentsOperatorMutation(`x >= y` |==> `y >= x`) of: `return x >= y;`\n+\treturn y >= x;\n }\n \n function myLE(uint256 x, uint256 y) public pure returns (bool) {\n", - "id": "54", - "name": "mutants/54/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "original": "SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -32,7 +32,8 @@\n }\n \n function myLE(uint256 x, uint256 y) public pure returns (bool) {\n-\treturn x <= y;\n+\t/// SwapArgumentsOperatorMutation(`x <= y` |==> `y <= x`) of: `return x <= y;`\n+\treturn y <= x;\n }\n \n function mySAL(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "55", - "name": "mutants/55/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "original": "SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n }\n \n function mySAL(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x << y;\n+\t/// SwapArgumentsOperatorMutation(`x << y` |==> `y << x`) of: `return x << y;`\n+\treturn y << x;\n }\n \n function mySAR(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "56", - "name": "mutants/56/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "original": "SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -40,6 +40,7 @@\n }\n \n function mySAR(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x >> y;\n+\t/// SwapArgumentsOperatorMutation(`x >> y` |==> `y >> x`) of: `return x >> y;`\n+\treturn y >> x;\n }\n }\n", - "id": "57", - "name": "mutants/57/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "original": "SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - }, - { - "description": "UnaryOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -4,7 +4,8 @@\n \n contract UnaryOperatorMutation {\n function myBitwiseNeg(uint256 x) public pure returns (uint256) {\n-\treturn ~ x;\n+\t/// UnaryOperatorMutation(`~` |==> `++`) of: `return ~ x;`\n+\treturn ++ x;\n }\n \n function myPrefixIncr(uint256 x) public pure returns (uint256) {\n", - "id": "58", - "name": "mutants/58/UnaryOperatorMutation/UnaryOperatorMutation.sol", - "original": "UnaryOperatorMutation/UnaryOperatorMutation.sol", - }, - { - "description": "UnaryOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -4,7 +4,8 @@\n \n contract UnaryOperatorMutation {\n function myBitwiseNeg(uint256 x) public pure returns (uint256) {\n-\treturn ~ x;\n+\t/// UnaryOperatorMutation(`~` |==> `--`) of: `return ~ x;`\n+\treturn -- x;\n }\n \n function myPrefixIncr(uint256 x) public pure returns (uint256) {\n", - "id": "59", - "name": "mutants/59/UnaryOperatorMutation/UnaryOperatorMutation.sol", - "original": "UnaryOperatorMutation/UnaryOperatorMutation.sol", - }, - { - "description": "UnaryOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function myPrefixIncr(uint256 x) public pure returns (uint256) {\n-\treturn ++x;\n+\t/// UnaryOperatorMutation(`++` |==> `--`) of: `return ++x;`\n+\treturn --x;\n }\n \n function myPrefixDecr(uint256 x) public pure returns (uint256) {\n", - "id": "60", - "name": "mutants/60/UnaryOperatorMutation/UnaryOperatorMutation.sol", - "original": "UnaryOperatorMutation/UnaryOperatorMutation.sol", - }, - { - "description": "UnaryOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function myPrefixIncr(uint256 x) public pure returns (uint256) {\n-\treturn ++x;\n+\t/// UnaryOperatorMutation(`++` |==> `~`) of: `return ++x;`\n+\treturn ~x;\n }\n \n function myPrefixDecr(uint256 x) public pure returns (uint256) {\n", - "id": "61", - "name": "mutants/61/UnaryOperatorMutation/UnaryOperatorMutation.sol", - "original": "UnaryOperatorMutation/UnaryOperatorMutation.sol", - }, - { - "description": "UnaryOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -12,7 +12,8 @@\n }\n \n function myPrefixDecr(uint256 x) public pure returns (uint256) {\n-\treturn --x;\n+\t/// UnaryOperatorMutation(`--` |==> `++`) of: `return --x;`\n+\treturn ++x;\n }\n \n function mySuffixIncr(uint256 x) public pure returns (uint256) {\n", - "id": "62", - "name": "mutants/62/UnaryOperatorMutation/UnaryOperatorMutation.sol", - "original": "UnaryOperatorMutation/UnaryOperatorMutation.sol", - }, - { - "description": "UnaryOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -12,7 +12,8 @@\n }\n \n function myPrefixDecr(uint256 x) public pure returns (uint256) {\n-\treturn --x;\n+\t/// UnaryOperatorMutation(`--` |==> `~`) of: `return --x;`\n+\treturn ~x;\n }\n \n function mySuffixIncr(uint256 x) public pure returns (uint256) {\n", - "id": "63", - "name": "mutants/63/UnaryOperatorMutation/UnaryOperatorMutation.sol", - "original": "UnaryOperatorMutation/UnaryOperatorMutation.sol", - }, - { - "description": "UnaryOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -16,7 +16,8 @@\n }\n \n function mySuffixIncr(uint256 x) public pure returns (uint256) {\n-\tx++;\n+\t/// UnaryOperatorMutation(`++` |==> `--`) of: `x++;`\n+\tx--;\n \treturn x;\n }\n \n", - "id": "64", - "name": "mutants/64/UnaryOperatorMutation/UnaryOperatorMutation.sol", - "original": "UnaryOperatorMutation/UnaryOperatorMutation.sol", - }, - { - "description": "UnaryOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n }\n \n function mySuffixDecr(uint256 x) public pure returns (uint256) {\n-\tx--;\n+\t/// UnaryOperatorMutation(`--` |==> `++`) of: `x--;`\n+\tx++;\n \treturn x;\n }\n }\n", - "id": "65", - "name": "mutants/65/UnaryOperatorMutation/UnaryOperatorMutation.sol", - "original": "UnaryOperatorMutation/UnaryOperatorMutation.sol", - }, - { - "description": "ElimDelegateMutation", - "diff": "--- original\n+++ mutant\n@@ -22,7 +22,8 @@\n \n \n function setVars(address _contract, uint _num) public payable {\n- (bool success, bytes memory data) = _contract.delegatecall(\n+ /// ElimDelegateMutation(`delegatecall` |==> `call`) of: `(bool success, bytes memory data) = _contract.delegatecall(`\n+ (bool success, bytes memory data) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", _num)\n );\n \tdelegateSuccessful = success;\n", - "id": "66", - "name": "mutants/66/ElimDelegateMutation/ElimDelegateMutation.sol", - "original": "ElimDelegateMutation/ElimDelegateMutation.sol", - } -] \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/AssignmentMutation.sol_json.ast b/resources/regressions/all.json/input_json/AssignmentMutation.sol_json.ast deleted file mode 100644 index 26ee0b68..00000000 --- a/resources/regressions/all.json/input_json/AssignmentMutation.sol_json.ast +++ /dev/null @@ -1,518 +0,0 @@ -{ - "absolutePath": "benchmarks/AssignmentMutation/AssignmentMutation.sol", - "exportedSymbols": - { - "AssignmentMutation": - [ - 37 - ] - }, - "id": 38, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "AssignmentMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 37, - "linearizedBaseContracts": - [ - 37 - ], - "name": "AssignmentMutation", - "nameLocation": "109:18:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "constant": false, - "functionSelector": "0c55699c", - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "149:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "134:16:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "134:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "a56dfe4a", - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "171:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "156:16:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "156:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "c5d7802e", - "id": 8, - "mutability": "mutable", - "name": "z", - "nameLocation": "193:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "178:16:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 7, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "178:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "0dbe671f", - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "212:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "200:13:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 9, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "200:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "4df7e3d0", - "id": 12, - "mutability": "mutable", - "name": "b", - "nameLocation": "231:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "219:13:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 11, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "219:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "public" - }, - { - "body": - { - "id": 35, - "nodeType": "Block", - "src": "253:146:0", - "statements": - [ - { - "expression": - { - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 15, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "256:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "3432", - "id": 16, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "260:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_42_by_1", - "typeString": "int_const 42" - }, - "value": "42" - }, - "src": "256:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18, - "nodeType": "ExpressionStatement", - "src": "256:6:0" - }, - { - "expression": - { - "id": 21, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 19, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "281:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "3133", - "id": 20, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "285:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_13_by_1", - "typeString": "int_const 13" - }, - "value": "13" - }, - "src": "281:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 22, - "nodeType": "ExpressionStatement", - "src": "281:6:0" - }, - { - "expression": - { - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 23, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "306:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "33313130", - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "310:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_3110_by_1", - "typeString": "int_const 3110" - }, - "value": "3110" - }, - "src": "306:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 26, - "nodeType": "ExpressionStatement", - "src": "306:8:0" - }, - { - "expression": - { - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "335:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "74727565", - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "339:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "335:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 30, - "nodeType": "ExpressionStatement", - "src": "335:8:0" - }, - { - "expression": - { - "id": 33, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 31, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "364:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "66616c7365", - "id": 32, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "368:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "364:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 34, - "nodeType": "ExpressionStatement", - "src": "364:9:0" - } - ] - }, - "id": 36, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 13, - "nodeType": "ParameterList", - "parameters": [], - "src": "250:2:0" - }, - "returnParameters": - { - "id": 14, - "nodeType": "ParameterList", - "parameters": [], - "src": "253:0:0" - }, - "scope": 37, - "src": "239:160:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 38, - "src": "100:301:0", - "usedErrors": [] - } - ], - "src": "41:361:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/AssignmentMutation.sol_json.ast.json b/resources/regressions/all.json/input_json/AssignmentMutation.sol_json.ast.json deleted file mode 100644 index 26ee0b68..00000000 --- a/resources/regressions/all.json/input_json/AssignmentMutation.sol_json.ast.json +++ /dev/null @@ -1,518 +0,0 @@ -{ - "absolutePath": "benchmarks/AssignmentMutation/AssignmentMutation.sol", - "exportedSymbols": - { - "AssignmentMutation": - [ - 37 - ] - }, - "id": 38, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "AssignmentMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 37, - "linearizedBaseContracts": - [ - 37 - ], - "name": "AssignmentMutation", - "nameLocation": "109:18:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "constant": false, - "functionSelector": "0c55699c", - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "149:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "134:16:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "134:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "a56dfe4a", - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "171:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "156:16:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "156:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "c5d7802e", - "id": 8, - "mutability": "mutable", - "name": "z", - "nameLocation": "193:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "178:16:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 7, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "178:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "0dbe671f", - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "212:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "200:13:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 9, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "200:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "4df7e3d0", - "id": 12, - "mutability": "mutable", - "name": "b", - "nameLocation": "231:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "219:13:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 11, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "219:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "public" - }, - { - "body": - { - "id": 35, - "nodeType": "Block", - "src": "253:146:0", - "statements": - [ - { - "expression": - { - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 15, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "256:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "3432", - "id": 16, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "260:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_42_by_1", - "typeString": "int_const 42" - }, - "value": "42" - }, - "src": "256:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18, - "nodeType": "ExpressionStatement", - "src": "256:6:0" - }, - { - "expression": - { - "id": 21, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 19, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "281:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "3133", - "id": 20, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "285:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_13_by_1", - "typeString": "int_const 13" - }, - "value": "13" - }, - "src": "281:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 22, - "nodeType": "ExpressionStatement", - "src": "281:6:0" - }, - { - "expression": - { - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 23, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "306:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "33313130", - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "310:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_3110_by_1", - "typeString": "int_const 3110" - }, - "value": "3110" - }, - "src": "306:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 26, - "nodeType": "ExpressionStatement", - "src": "306:8:0" - }, - { - "expression": - { - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "335:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "74727565", - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "339:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "335:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 30, - "nodeType": "ExpressionStatement", - "src": "335:8:0" - }, - { - "expression": - { - "id": 33, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 31, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "364:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "66616c7365", - "id": 32, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "368:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "364:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 34, - "nodeType": "ExpressionStatement", - "src": "364:9:0" - } - ] - }, - "id": 36, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 13, - "nodeType": "ParameterList", - "parameters": [], - "src": "250:2:0" - }, - "returnParameters": - { - "id": 14, - "nodeType": "ParameterList", - "parameters": [], - "src": "253:0:0" - }, - "scope": 37, - "src": "239:160:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 38, - "src": "100:301:0", - "usedErrors": [] - } - ], - "src": "41:361:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/BinaryOpMutation.sol_json.ast b/resources/regressions/all.json/input_json/BinaryOpMutation.sol_json.ast deleted file mode 100644 index b02050bb..00000000 --- a/resources/regressions/all.json/input_json/BinaryOpMutation.sol_json.ast +++ /dev/null @@ -1,1183 +0,0 @@ -{ - "absolutePath": "benchmarks/BinaryOpMutation/BinaryOpMutation.sol", - "exportedSymbols": - { - "BinaryOpMutation": - [ - 87 - ] - }, - "id": 88, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "BinaryOpMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 87, - "linearizedBaseContracts": - [ - 87 - ], - "name": "BinaryOpMutation", - "nameLocation": "109:16:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "204:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "214:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "218:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "214:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "207:12:0" - } - ] - }, - "functionSelector": "04b53fe4", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myAddition", - "nameLocation": "141:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "160:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "152:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "152:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "171:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "163:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "163:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "151:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "195:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "195:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "194:9:0" - }, - "scope": 87, - "src": "132:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 29, - "nodeType": "Block", - "src": "307:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 25, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "317:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 26, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "321:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "317:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 28, - "nodeType": "Return", - "src": "310:12:0" - } - ] - }, - "functionSelector": "b3d09aaa", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySubtraction", - "nameLocation": "241:13:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "263:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "255:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "255:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "274:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "266:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "266:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "254:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "298:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "298:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "297:9:0" - }, - "scope": 87, - "src": "232:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 43, - "nodeType": "Block", - "src": "413:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 39, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "423:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": - { - "id": 40, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "427:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "423:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 38, - "id": 42, - "nodeType": "Return", - "src": "416:12:0" - } - ] - }, - "functionSelector": "6831fd12", - "id": 44, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myMultiplication", - "nameLocation": "344:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 35, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "x", - "nameLocation": "369:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "361:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "361:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "y", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "372:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "372:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "360:22:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "404:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "404:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "403:9:0" - }, - "scope": 87, - "src": "335:100:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 57, - "nodeType": "Block", - "src": "513:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 53, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "523:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": - { - "id": 54, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "527:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "523:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 52, - "id": 56, - "nodeType": "Return", - "src": "516:12:0" - } - ] - }, - "functionSelector": "9d4f4e60", - "id": 58, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myDivision", - "nameLocation": "450:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 49, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "x", - "nameLocation": "469:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "461:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 45, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "461:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "y", - "nameLocation": "480:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "472:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 47, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "472:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "460:22:0" - }, - "returnParameters": - { - "id": 52, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 51, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "504:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 50, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "504:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "503:9:0" - }, - "scope": 87, - "src": "441:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 71, - "nodeType": "Block", - "src": "611:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 67, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "621:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": - { - "id": 68, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "625:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "621:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "614:12:0" - } - ] - }, - "functionSelector": "dc6092a8", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myModulo", - "nameLocation": "550:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 60, - "mutability": "mutable", - "name": "x", - "nameLocation": "567:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "559:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 59, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "559:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "y", - "nameLocation": "578:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "570:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 61, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "570:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "558:22:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "602:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "602:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "601:9:0" - }, - "scope": 87, - "src": "541:92:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 85, - "nodeType": "Block", - "src": "717:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 81, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "727:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 82, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "732:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "727:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 80, - "id": 84, - "nodeType": "Return", - "src": "720:13:0" - } - ] - }, - "functionSelector": "df159c7b", - "id": 86, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myExponentiation", - "nameLocation": "648:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 77, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "x", - "nameLocation": "673:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "665:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 73, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "665:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "y", - "nameLocation": "684:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "676:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "676:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "664:22:0" - }, - "returnParameters": - { - "id": 80, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 79, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "708:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 78, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "708:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "707:9:0" - }, - "scope": 87, - "src": "639:101:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 88, - "src": "100:643:0", - "usedErrors": [] - } - ], - "src": "41:703:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/BinaryOpMutation.sol_json.ast.json b/resources/regressions/all.json/input_json/BinaryOpMutation.sol_json.ast.json deleted file mode 100644 index b02050bb..00000000 --- a/resources/regressions/all.json/input_json/BinaryOpMutation.sol_json.ast.json +++ /dev/null @@ -1,1183 +0,0 @@ -{ - "absolutePath": "benchmarks/BinaryOpMutation/BinaryOpMutation.sol", - "exportedSymbols": - { - "BinaryOpMutation": - [ - 87 - ] - }, - "id": 88, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "BinaryOpMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 87, - "linearizedBaseContracts": - [ - 87 - ], - "name": "BinaryOpMutation", - "nameLocation": "109:16:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "204:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "214:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "218:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "214:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "207:12:0" - } - ] - }, - "functionSelector": "04b53fe4", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myAddition", - "nameLocation": "141:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "160:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "152:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "152:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "171:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "163:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "163:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "151:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "195:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "195:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "194:9:0" - }, - "scope": 87, - "src": "132:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 29, - "nodeType": "Block", - "src": "307:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 25, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "317:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 26, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "321:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "317:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 28, - "nodeType": "Return", - "src": "310:12:0" - } - ] - }, - "functionSelector": "b3d09aaa", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySubtraction", - "nameLocation": "241:13:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "263:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "255:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "255:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "274:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "266:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "266:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "254:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "298:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "298:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "297:9:0" - }, - "scope": 87, - "src": "232:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 43, - "nodeType": "Block", - "src": "413:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 39, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "423:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": - { - "id": 40, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "427:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "423:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 38, - "id": 42, - "nodeType": "Return", - "src": "416:12:0" - } - ] - }, - "functionSelector": "6831fd12", - "id": 44, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myMultiplication", - "nameLocation": "344:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 35, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "x", - "nameLocation": "369:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "361:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "361:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "y", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "372:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "372:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "360:22:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "404:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "404:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "403:9:0" - }, - "scope": 87, - "src": "335:100:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 57, - "nodeType": "Block", - "src": "513:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 53, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "523:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": - { - "id": 54, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "527:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "523:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 52, - "id": 56, - "nodeType": "Return", - "src": "516:12:0" - } - ] - }, - "functionSelector": "9d4f4e60", - "id": 58, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myDivision", - "nameLocation": "450:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 49, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "x", - "nameLocation": "469:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "461:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 45, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "461:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "y", - "nameLocation": "480:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "472:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 47, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "472:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "460:22:0" - }, - "returnParameters": - { - "id": 52, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 51, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "504:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 50, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "504:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "503:9:0" - }, - "scope": 87, - "src": "441:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 71, - "nodeType": "Block", - "src": "611:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 67, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "621:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": - { - "id": 68, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "625:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "621:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "614:12:0" - } - ] - }, - "functionSelector": "dc6092a8", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myModulo", - "nameLocation": "550:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 60, - "mutability": "mutable", - "name": "x", - "nameLocation": "567:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "559:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 59, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "559:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "y", - "nameLocation": "578:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "570:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 61, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "570:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "558:22:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "602:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "602:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "601:9:0" - }, - "scope": 87, - "src": "541:92:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 85, - "nodeType": "Block", - "src": "717:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 81, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "727:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 82, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "732:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "727:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 80, - "id": 84, - "nodeType": "Return", - "src": "720:13:0" - } - ] - }, - "functionSelector": "df159c7b", - "id": 86, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myExponentiation", - "nameLocation": "648:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 77, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "x", - "nameLocation": "673:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "665:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 73, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "665:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "y", - "nameLocation": "684:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "676:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "676:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "664:22:0" - }, - "returnParameters": - { - "id": 80, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 79, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "708:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 78, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "708:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "707:9:0" - }, - "scope": 87, - "src": "639:101:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 88, - "src": "100:643:0", - "usedErrors": [] - } - ], - "src": "41:703:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/DeleteExpressionMutation.sol_json.ast b/resources/regressions/all.json/input_json/DeleteExpressionMutation.sol_json.ast deleted file mode 100644 index 12301920..00000000 --- a/resources/regressions/all.json/input_json/DeleteExpressionMutation.sol_json.ast +++ /dev/null @@ -1,440 +0,0 @@ -{ - "absolutePath": "benchmarks/DeleteExpressionMutation/DeleteExpressionMutation.sol", - "exportedSymbols": - { - "DeleteExpressionMutation": - [ - 32 - ] - }, - "id": 33, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "DeleteExpressionMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 32, - "linearizedBaseContracts": - [ - 32 - ], - "name": "DeleteExpressionMutation", - "nameLocation": "109:24:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 30, - "nodeType": "Block", - "src": "202:98:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "result", - "nameLocation": "213:6:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "205:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "205:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "222:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "205:18:0" - }, - { - "body": - { - "id": 26, - "nodeType": "Block", - "src": "258:20:0", - "statements": - [ - { - "expression": - { - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "265:9:0", - "subExpression": - { - "id": 23, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "265:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 25, - "nodeType": "ExpressionStatement", - "src": "265:9:0" - } - ] - }, - "condition": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 17, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": - { - "id": 18, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "250:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "246:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 27, - "initializationExpression": - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "i", - "nameLocation": "239:1:0", - "nodeType": "VariableDeclaration", - "scope": 27, - "src": "231:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "231:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 16, - "initialValue": - { - "hexValue": "30", - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "243:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "231:13:0" - }, - "loopExpression": - { - "expression": - { - "id": 21, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "253:3:0", - "subExpression": - { - "id": 20, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "253:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 22, - "nodeType": "ExpressionStatement", - "src": "253:3:0" - }, - "nodeType": "ForStatement", - "src": "226:52:0" - }, - { - "expression": - { - "id": 28, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "287:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 29, - "nodeType": "Return", - "src": "280:13:0" - } - ] - }, - "functionSelector": "380a9a54", - "id": 31, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myIdentity", - "nameLocation": "150:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "169:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "161:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "161:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "160:11:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "193:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "193:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "192:9:0" - }, - "scope": 32, - "src": "141:159:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 33, - "src": "100:202:0", - "usedErrors": [] - } - ], - "src": "41:262:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/DeleteExpressionMutation.sol_json.ast.json b/resources/regressions/all.json/input_json/DeleteExpressionMutation.sol_json.ast.json deleted file mode 100644 index 12301920..00000000 --- a/resources/regressions/all.json/input_json/DeleteExpressionMutation.sol_json.ast.json +++ /dev/null @@ -1,440 +0,0 @@ -{ - "absolutePath": "benchmarks/DeleteExpressionMutation/DeleteExpressionMutation.sol", - "exportedSymbols": - { - "DeleteExpressionMutation": - [ - 32 - ] - }, - "id": 33, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "DeleteExpressionMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 32, - "linearizedBaseContracts": - [ - 32 - ], - "name": "DeleteExpressionMutation", - "nameLocation": "109:24:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 30, - "nodeType": "Block", - "src": "202:98:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "result", - "nameLocation": "213:6:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "205:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "205:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "222:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "205:18:0" - }, - { - "body": - { - "id": 26, - "nodeType": "Block", - "src": "258:20:0", - "statements": - [ - { - "expression": - { - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "265:9:0", - "subExpression": - { - "id": 23, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "265:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 25, - "nodeType": "ExpressionStatement", - "src": "265:9:0" - } - ] - }, - "condition": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 17, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": - { - "id": 18, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "250:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "246:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 27, - "initializationExpression": - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "i", - "nameLocation": "239:1:0", - "nodeType": "VariableDeclaration", - "scope": 27, - "src": "231:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "231:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 16, - "initialValue": - { - "hexValue": "30", - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "243:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "231:13:0" - }, - "loopExpression": - { - "expression": - { - "id": 21, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "253:3:0", - "subExpression": - { - "id": 20, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "253:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 22, - "nodeType": "ExpressionStatement", - "src": "253:3:0" - }, - "nodeType": "ForStatement", - "src": "226:52:0" - }, - { - "expression": - { - "id": 28, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "287:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 29, - "nodeType": "Return", - "src": "280:13:0" - } - ] - }, - "functionSelector": "380a9a54", - "id": 31, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myIdentity", - "nameLocation": "150:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "169:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "161:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "161:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "160:11:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "193:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "193:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "192:9:0" - }, - "scope": 32, - "src": "141:159:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 33, - "src": "100:202:0", - "usedErrors": [] - } - ], - "src": "41:262:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/ElimDelegateMutation.sol_json.ast b/resources/regressions/all.json/input_json/ElimDelegateMutation.sol_json.ast deleted file mode 100644 index c75ab1a3..00000000 --- a/resources/regressions/all.json/input_json/ElimDelegateMutation.sol_json.ast +++ /dev/null @@ -1,997 +0,0 @@ -{ - "absolutePath": "benchmarks/ElimDelegateMutation/ElimDelegateMutation.sol", - "exportedSymbols": - { - "A": - [ - 68 - ], - "B": - [ - 28 - ] - }, - "id": 69, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "41:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "B", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 28, - "linearizedBaseContracts": - [ - 28 - ], - "name": "B", - "nameLocation": "76:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "constant": false, - "functionSelector": "4e70b1dc", - "id": 3, - "mutability": "mutable", - "name": "num", - "nameLocation": "96:3:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "84:15:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 2, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "84:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "67e404ce", - "id": 5, - "mutability": "mutable", - "name": "sender", - "nameLocation": "120:6:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "105:21:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 4, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "105:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "3fa4f245", - "id": 7, - "mutability": "mutable", - "name": "value", - "nameLocation": "144:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "132:17:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "132:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "body": - { - "id": 26, - "nodeType": "Block", - "src": "199:83:0", - "statements": - [ - { - "expression": - { - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 12, - "name": "num", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "209:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "id": 13, - "name": "_num", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "215:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "209:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15, - "nodeType": "ExpressionStatement", - "src": "209:10:0" - }, - { - "expression": - { - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 16, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5, - "src": "229:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 17, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "238:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 18, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "238:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "229:19:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 20, - "nodeType": "ExpressionStatement", - "src": "229:19:0" - }, - { - "expression": - { - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 21, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "258:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 22, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "266:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 23, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "266:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "258:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 25, - "nodeType": "ExpressionStatement", - "src": "258:17:0" - } - ] - }, - "functionSelector": "6466414b", - "id": 27, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setVars", - "nameLocation": "165:7:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "_num", - "nameLocation": "178:4:0", - "nodeType": "VariableDeclaration", - "scope": 27, - "src": "173:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "173:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "172:11:0" - }, - "returnParameters": - { - "id": 11, - "nodeType": "ParameterList", - "parameters": [], - "src": "199:0:0" - }, - "scope": 28, - "src": "156:126:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 69, - "src": "67:217:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "A", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 68, - "linearizedBaseContracts": - [ - 68 - ], - "name": "A", - "nameLocation": "295:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "constant": false, - "functionSelector": "4e70b1dc", - "id": 30, - "mutability": "mutable", - "name": "num", - "nameLocation": "315:3:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "303:15:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 29, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "303:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "67e404ce", - "id": 32, - "mutability": "mutable", - "name": "sender", - "nameLocation": "339:6:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "324:21:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 31, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "324:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "3fa4f245", - "id": 34, - "mutability": "mutable", - "name": "value", - "nameLocation": "363:5:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "351:17:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "351:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "f95ec93b", - "id": 36, - "mutability": "mutable", - "name": "delegateSuccessful", - "nameLocation": "386:18:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "374:30:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 35, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "374:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "2bb14104", - "id": 38, - "mutability": "mutable", - "name": "myData", - "nameLocation": "423:6:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "410:19:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes" - }, - "typeName": - { - "id": 37, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "410:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "public" - }, - { - "body": - { - "id": 66, - "nodeType": "Block", - "src": "503:195:0", - "statements": - [ - { - "assignments": - [ - 46, - 48 - ], - "declarations": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "success", - "nameLocation": "519:7:0", - "nodeType": "VariableDeclaration", - "scope": 66, - "src": "514:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 45, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "514:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "data", - "nameLocation": "541:4:0", - "nodeType": "VariableDeclaration", - "scope": 66, - "src": "528:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": - { - "id": 47, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "528:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 57, - "initialValue": - { - "arguments": - [ - { - "arguments": - [ - { - "hexValue": "736574566172732875696e7432353629", - "id": 53, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "609:18:0", - "typeDescriptions": - { - "typeIdentifier": "t_stringliteral_6466414b2df4a685dcec3eaa0cc18042949f0e7e43c9cb945cbd507ff227de7e", - "typeString": "literal_string \"setVars(uint256)\"" - }, - "value": "setVars(uint256)" - }, - { - "id": 54, - "name": "_num", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "629:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_stringliteral_6466414b2df4a685dcec3eaa0cc18042949f0e7e43c9cb945cbd507ff227de7e", - "typeString": "literal_string \"setVars(uint256)\"" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": - { - "id": 51, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "585:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "src": "585:23:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "585:49:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": - { - "id": 49, - "name": "_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "549:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delegatecall", - "nodeType": "MemberAccess", - "src": "549:22:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bool,bytes memory)" - } - }, - "id": 56, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "549:95:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "513:131:0" - }, - { - "expression": - { - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 58, - "name": "delegateSuccessful", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 36, - "src": "647:18:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "id": 59, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "668:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "647:28:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 61, - "nodeType": "ExpressionStatement", - "src": "647:28:0" - }, - { - "expression": - { - "id": 64, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 62, - "name": "myData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "678:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "id": 63, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "687:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "678:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 65, - "nodeType": "ExpressionStatement", - "src": "678:13:0" - } - ] - }, - "functionSelector": "d1e0f308", - "id": 67, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setVars", - "nameLocation": "450:7:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 43, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 40, - "mutability": "mutable", - "name": "_contract", - "nameLocation": "466:9:0", - "nodeType": "VariableDeclaration", - "scope": 67, - "src": "458:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 39, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "458:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 42, - "mutability": "mutable", - "name": "_num", - "nameLocation": "482:4:0", - "nodeType": "VariableDeclaration", - "scope": 67, - "src": "477:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 41, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "477:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "457:30:0" - }, - "returnParameters": - { - "id": 44, - "nodeType": "ParameterList", - "parameters": [], - "src": "503:0:0" - }, - "scope": 68, - "src": "441:257:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 69, - "src": "286:414:0", - "usedErrors": [] - } - ], - "src": "41:660:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/ElimDelegateMutation.sol_json.ast.json b/resources/regressions/all.json/input_json/ElimDelegateMutation.sol_json.ast.json deleted file mode 100644 index c75ab1a3..00000000 --- a/resources/regressions/all.json/input_json/ElimDelegateMutation.sol_json.ast.json +++ /dev/null @@ -1,997 +0,0 @@ -{ - "absolutePath": "benchmarks/ElimDelegateMutation/ElimDelegateMutation.sol", - "exportedSymbols": - { - "A": - [ - 68 - ], - "B": - [ - 28 - ] - }, - "id": 69, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "41:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "B", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 28, - "linearizedBaseContracts": - [ - 28 - ], - "name": "B", - "nameLocation": "76:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "constant": false, - "functionSelector": "4e70b1dc", - "id": 3, - "mutability": "mutable", - "name": "num", - "nameLocation": "96:3:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "84:15:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 2, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "84:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "67e404ce", - "id": 5, - "mutability": "mutable", - "name": "sender", - "nameLocation": "120:6:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "105:21:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 4, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "105:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "3fa4f245", - "id": 7, - "mutability": "mutable", - "name": "value", - "nameLocation": "144:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "132:17:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "132:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "body": - { - "id": 26, - "nodeType": "Block", - "src": "199:83:0", - "statements": - [ - { - "expression": - { - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 12, - "name": "num", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "209:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "id": 13, - "name": "_num", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "215:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "209:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15, - "nodeType": "ExpressionStatement", - "src": "209:10:0" - }, - { - "expression": - { - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 16, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5, - "src": "229:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 17, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "238:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 18, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "238:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "229:19:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 20, - "nodeType": "ExpressionStatement", - "src": "229:19:0" - }, - { - "expression": - { - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 21, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "258:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 22, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "266:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 23, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "266:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "258:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 25, - "nodeType": "ExpressionStatement", - "src": "258:17:0" - } - ] - }, - "functionSelector": "6466414b", - "id": 27, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setVars", - "nameLocation": "165:7:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "_num", - "nameLocation": "178:4:0", - "nodeType": "VariableDeclaration", - "scope": 27, - "src": "173:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "173:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "172:11:0" - }, - "returnParameters": - { - "id": 11, - "nodeType": "ParameterList", - "parameters": [], - "src": "199:0:0" - }, - "scope": 28, - "src": "156:126:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 69, - "src": "67:217:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "A", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 68, - "linearizedBaseContracts": - [ - 68 - ], - "name": "A", - "nameLocation": "295:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "constant": false, - "functionSelector": "4e70b1dc", - "id": 30, - "mutability": "mutable", - "name": "num", - "nameLocation": "315:3:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "303:15:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 29, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "303:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "67e404ce", - "id": 32, - "mutability": "mutable", - "name": "sender", - "nameLocation": "339:6:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "324:21:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 31, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "324:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "3fa4f245", - "id": 34, - "mutability": "mutable", - "name": "value", - "nameLocation": "363:5:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "351:17:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "351:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "f95ec93b", - "id": 36, - "mutability": "mutable", - "name": "delegateSuccessful", - "nameLocation": "386:18:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "374:30:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 35, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "374:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "2bb14104", - "id": 38, - "mutability": "mutable", - "name": "myData", - "nameLocation": "423:6:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "410:19:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes" - }, - "typeName": - { - "id": 37, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "410:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "public" - }, - { - "body": - { - "id": 66, - "nodeType": "Block", - "src": "503:195:0", - "statements": - [ - { - "assignments": - [ - 46, - 48 - ], - "declarations": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "success", - "nameLocation": "519:7:0", - "nodeType": "VariableDeclaration", - "scope": 66, - "src": "514:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 45, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "514:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "data", - "nameLocation": "541:4:0", - "nodeType": "VariableDeclaration", - "scope": 66, - "src": "528:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": - { - "id": 47, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "528:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 57, - "initialValue": - { - "arguments": - [ - { - "arguments": - [ - { - "hexValue": "736574566172732875696e7432353629", - "id": 53, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "609:18:0", - "typeDescriptions": - { - "typeIdentifier": "t_stringliteral_6466414b2df4a685dcec3eaa0cc18042949f0e7e43c9cb945cbd507ff227de7e", - "typeString": "literal_string \"setVars(uint256)\"" - }, - "value": "setVars(uint256)" - }, - { - "id": 54, - "name": "_num", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "629:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_stringliteral_6466414b2df4a685dcec3eaa0cc18042949f0e7e43c9cb945cbd507ff227de7e", - "typeString": "literal_string \"setVars(uint256)\"" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": - { - "id": 51, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "585:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "src": "585:23:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "585:49:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": - { - "id": 49, - "name": "_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "549:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delegatecall", - "nodeType": "MemberAccess", - "src": "549:22:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bool,bytes memory)" - } - }, - "id": 56, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "549:95:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "513:131:0" - }, - { - "expression": - { - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 58, - "name": "delegateSuccessful", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 36, - "src": "647:18:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "id": 59, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "668:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "647:28:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 61, - "nodeType": "ExpressionStatement", - "src": "647:28:0" - }, - { - "expression": - { - "id": 64, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 62, - "name": "myData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "678:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "id": 63, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "687:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "678:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 65, - "nodeType": "ExpressionStatement", - "src": "678:13:0" - } - ] - }, - "functionSelector": "d1e0f308", - "id": 67, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setVars", - "nameLocation": "450:7:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 43, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 40, - "mutability": "mutable", - "name": "_contract", - "nameLocation": "466:9:0", - "nodeType": "VariableDeclaration", - "scope": 67, - "src": "458:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 39, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "458:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 42, - "mutability": "mutable", - "name": "_num", - "nameLocation": "482:4:0", - "nodeType": "VariableDeclaration", - "scope": 67, - "src": "477:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 41, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "477:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "457:30:0" - }, - "returnParameters": - { - "id": 44, - "nodeType": "ParameterList", - "parameters": [], - "src": "503:0:0" - }, - "scope": 68, - "src": "441:257:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 69, - "src": "286:414:0", - "usedErrors": [] - } - ], - "src": "41:660:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/FunctionCallMutation.sol_json.ast b/resources/regressions/all.json/input_json/FunctionCallMutation.sol_json.ast deleted file mode 100644 index 6a022513..00000000 --- a/resources/regressions/all.json/input_json/FunctionCallMutation.sol_json.ast +++ /dev/null @@ -1,458 +0,0 @@ -{ - "absolutePath": "benchmarks/FunctionCallMutation/FunctionCallMutation.sol", - "exportedSymbols": - { - "FunctionCallMutation": - [ - 32 - ] - }, - "id": 33, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "FunctionCallMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 32, - "linearizedBaseContracts": - [ - 32 - ], - "name": "FunctionCallMutation", - "nameLocation": "109:20:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "208:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "218:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "222:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "218:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "211:12:0" - } - ] - }, - "functionSelector": "04b53fe4", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myAddition", - "nameLocation": "145:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "164:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "156:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "156:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "175:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "167:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "167:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "155:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "199:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "199:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "198:9:0" - }, - "scope": 32, - "src": "136:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 30, - "nodeType": "Block", - "src": "313:33:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "id": 26, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "334:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 27, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "337:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 25, - "name": "myAddition", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "323:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "323:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 29, - "nodeType": "Return", - "src": "316:23:0" - } - ] - }, - "functionSelector": "65cac823", - "id": 31, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myOtherAddition", - "nameLocation": "245:15:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "269:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "261:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "261:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "280:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "272:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "272:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "260:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "304:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "304:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "303:9:0" - }, - "scope": 32, - "src": "236:110:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 33, - "src": "100:248:0", - "usedErrors": [] - } - ], - "src": "41:308:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/FunctionCallMutation.sol_json.ast.json b/resources/regressions/all.json/input_json/FunctionCallMutation.sol_json.ast.json deleted file mode 100644 index 6a022513..00000000 --- a/resources/regressions/all.json/input_json/FunctionCallMutation.sol_json.ast.json +++ /dev/null @@ -1,458 +0,0 @@ -{ - "absolutePath": "benchmarks/FunctionCallMutation/FunctionCallMutation.sol", - "exportedSymbols": - { - "FunctionCallMutation": - [ - 32 - ] - }, - "id": 33, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "FunctionCallMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 32, - "linearizedBaseContracts": - [ - 32 - ], - "name": "FunctionCallMutation", - "nameLocation": "109:20:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "208:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "218:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "222:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "218:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "211:12:0" - } - ] - }, - "functionSelector": "04b53fe4", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myAddition", - "nameLocation": "145:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "164:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "156:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "156:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "175:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "167:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "167:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "155:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "199:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "199:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "198:9:0" - }, - "scope": 32, - "src": "136:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 30, - "nodeType": "Block", - "src": "313:33:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "id": 26, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "334:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 27, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "337:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 25, - "name": "myAddition", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "323:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "323:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 29, - "nodeType": "Return", - "src": "316:23:0" - } - ] - }, - "functionSelector": "65cac823", - "id": 31, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myOtherAddition", - "nameLocation": "245:15:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "269:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "261:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "261:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "280:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "272:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "272:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "260:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "304:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "304:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "303:9:0" - }, - "scope": 32, - "src": "236:110:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 33, - "src": "100:248:0", - "usedErrors": [] - } - ], - "src": "41:308:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/IfStatementMutation.sol_json.ast b/resources/regressions/all.json/input_json/IfStatementMutation.sol_json.ast deleted file mode 100644 index 5f606832..00000000 --- a/resources/regressions/all.json/input_json/IfStatementMutation.sol_json.ast +++ /dev/null @@ -1,248 +0,0 @@ -{ - "absolutePath": "benchmarks/IfStatementMutation/IfStatementMutation.sol", - "exportedSymbols": - { - "IfStatementMutation": - [ - 19 - ] - }, - "id": 20, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "IfStatementMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 19, - "linearizedBaseContracts": - [ - 19 - ], - "name": "IfStatementMutation", - "nameLocation": "109:19:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "197:68:0", - "statements": - [ - { - "condition": - { - "id": 9, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "204:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": - { - "id": 15, - "nodeType": "Block", - "src": "236:23:0", - "statements": - [ - { - "expression": - { - "hexValue": "66616c7365", - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "250:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 8, - "id": 14, - "nodeType": "Return", - "src": "243:12:0" - } - ] - }, - "id": 16, - "nodeType": "IfStatement", - "src": "200:59:0", - "trueBody": - { - "id": 12, - "nodeType": "Block", - "src": "207:22:0", - "statements": - [ - { - "expression": - { - "hexValue": "74727565", - "id": 10, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "221:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 8, - "id": 11, - "nodeType": "Return", - "src": "214:11:0" - } - ] - } - } - ] - }, - "functionSelector": "ef5a890e", - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myBooleanNegation", - "nameLocation": "144:17:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "a", - "nameLocation": "167:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "162:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 3, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "162:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "161:8:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "191:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 6, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "191:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "190:6:0" - }, - "scope": 19, - "src": "135:130:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 20, - "src": "100:167:0", - "usedErrors": [] - } - ], - "src": "41:227:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/IfStatementMutation.sol_json.ast.json b/resources/regressions/all.json/input_json/IfStatementMutation.sol_json.ast.json deleted file mode 100644 index 5f606832..00000000 --- a/resources/regressions/all.json/input_json/IfStatementMutation.sol_json.ast.json +++ /dev/null @@ -1,248 +0,0 @@ -{ - "absolutePath": "benchmarks/IfStatementMutation/IfStatementMutation.sol", - "exportedSymbols": - { - "IfStatementMutation": - [ - 19 - ] - }, - "id": 20, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "IfStatementMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 19, - "linearizedBaseContracts": - [ - 19 - ], - "name": "IfStatementMutation", - "nameLocation": "109:19:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "197:68:0", - "statements": - [ - { - "condition": - { - "id": 9, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "204:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": - { - "id": 15, - "nodeType": "Block", - "src": "236:23:0", - "statements": - [ - { - "expression": - { - "hexValue": "66616c7365", - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "250:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 8, - "id": 14, - "nodeType": "Return", - "src": "243:12:0" - } - ] - }, - "id": 16, - "nodeType": "IfStatement", - "src": "200:59:0", - "trueBody": - { - "id": 12, - "nodeType": "Block", - "src": "207:22:0", - "statements": - [ - { - "expression": - { - "hexValue": "74727565", - "id": 10, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "221:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 8, - "id": 11, - "nodeType": "Return", - "src": "214:11:0" - } - ] - } - } - ] - }, - "functionSelector": "ef5a890e", - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myBooleanNegation", - "nameLocation": "144:17:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "a", - "nameLocation": "167:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "162:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 3, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "162:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "161:8:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "191:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 6, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "191:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "190:6:0" - }, - "scope": 19, - "src": "135:130:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 20, - "src": "100:167:0", - "usedErrors": [] - } - ], - "src": "41:227:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/RequireMutation.sol_json.ast b/resources/regressions/all.json/input_json/RequireMutation.sol_json.ast deleted file mode 100644 index 77ac2d6d..00000000 --- a/resources/regressions/all.json/input_json/RequireMutation.sol_json.ast +++ /dev/null @@ -1,439 +0,0 @@ -{ - "absolutePath": "benchmarks/RequireMutation/RequireMutation.sol", - "exportedSymbols": - { - "RequireMutation": - [ - 29 - ] - }, - "id": 30, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "RequireMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 29, - "linearizedBaseContracts": - [ - 29 - ], - "name": "RequireMutation", - "nameLocation": "109:15:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 27, - "nodeType": "Block", - "src": "214:72:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "id": 14, - "name": "cond1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "225:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 13, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": - [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "217:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "217:14:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "217:14:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 18, - "name": "cond2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "242:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": - [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "234:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "234:14:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 20, - "nodeType": "ExpressionStatement", - "src": "234:14:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 22, - "name": "cond3", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "259:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 21, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": - [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "251:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 23, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "251:14:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 24, - "nodeType": "ExpressionStatement", - "src": "251:14:0" - }, - { - "expression": - { - "hexValue": "74727565", - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "275:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 12, - "id": 26, - "nodeType": "Return", - "src": "268:11:0" - } - ] - }, - "functionSelector": "b638e767", - "id": 28, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myRequires", - "nameLocation": "140:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 9, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "cond1", - "nameLocation": "156:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "151:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 3, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "151:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "cond2", - "nameLocation": "168:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "163:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 5, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "163:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 8, - "mutability": "mutable", - "name": "cond3", - "nameLocation": "180:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "175:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 7, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "175:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "150:36:0" - }, - "returnParameters": - { - "id": 12, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 11, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "208:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 10, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "208:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "207:6:0" - }, - "scope": 29, - "src": "131:155:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 30, - "src": "100:188:0", - "usedErrors": [] - } - ], - "src": "41:248:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/RequireMutation.sol_json.ast.json b/resources/regressions/all.json/input_json/RequireMutation.sol_json.ast.json deleted file mode 100644 index 77ac2d6d..00000000 --- a/resources/regressions/all.json/input_json/RequireMutation.sol_json.ast.json +++ /dev/null @@ -1,439 +0,0 @@ -{ - "absolutePath": "benchmarks/RequireMutation/RequireMutation.sol", - "exportedSymbols": - { - "RequireMutation": - [ - 29 - ] - }, - "id": 30, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "RequireMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 29, - "linearizedBaseContracts": - [ - 29 - ], - "name": "RequireMutation", - "nameLocation": "109:15:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 27, - "nodeType": "Block", - "src": "214:72:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "id": 14, - "name": "cond1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "225:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 13, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": - [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "217:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "217:14:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "217:14:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 18, - "name": "cond2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "242:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": - [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "234:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "234:14:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 20, - "nodeType": "ExpressionStatement", - "src": "234:14:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 22, - "name": "cond3", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "259:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 21, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": - [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "251:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 23, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "251:14:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 24, - "nodeType": "ExpressionStatement", - "src": "251:14:0" - }, - { - "expression": - { - "hexValue": "74727565", - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "275:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 12, - "id": 26, - "nodeType": "Return", - "src": "268:11:0" - } - ] - }, - "functionSelector": "b638e767", - "id": 28, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myRequires", - "nameLocation": "140:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 9, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "cond1", - "nameLocation": "156:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "151:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 3, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "151:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "cond2", - "nameLocation": "168:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "163:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 5, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "163:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 8, - "mutability": "mutable", - "name": "cond3", - "nameLocation": "180:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "175:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 7, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "175:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "150:36:0" - }, - "returnParameters": - { - "id": 12, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 11, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "208:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 10, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "208:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "207:6:0" - }, - "scope": 29, - "src": "131:155:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 30, - "src": "100:188:0", - "usedErrors": [] - } - ], - "src": "41:248:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/SwapArgumentsFunctionMutation.sol_json.ast b/resources/regressions/all.json/input_json/SwapArgumentsFunctionMutation.sol_json.ast deleted file mode 100644 index 424e74b0..00000000 --- a/resources/regressions/all.json/input_json/SwapArgumentsFunctionMutation.sol_json.ast +++ /dev/null @@ -1,458 +0,0 @@ -{ - "absolutePath": "benchmarks/SwapArgumentsFunctionMutation/SwapArgumentsFunctionMutation.sol", - "exportedSymbols": - { - "SwapArgumentsFunctionMutation": - [ - 32 - ] - }, - "id": 33, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "SwapArgumentsFunctionMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 32, - "linearizedBaseContracts": - [ - 32 - ], - "name": "SwapArgumentsFunctionMutation", - "nameLocation": "109:29:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "211:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "221:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "225:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "221:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "214:12:0" - } - ] - }, - "functionSelector": "04bc52f8", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "155:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "167:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "159:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "159:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "178:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "170:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "170:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "158:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "202:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "202:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "201:9:0" - }, - "scope": 32, - "src": "146:87:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 30, - "nodeType": "Block", - "src": "304:26:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "id": 26, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "318:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 27, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "321:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 25, - "name": "foo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "314:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "314:9:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 29, - "nodeType": "Return", - "src": "307:16:0" - } - ] - }, - "functionSelector": "ae42e951", - "id": 31, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "bar", - "nameLocation": "248:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "260:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "252:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "252:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "271:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "263:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "263:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "251:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "295:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "295:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "294:9:0" - }, - "scope": 32, - "src": "239:91:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 33, - "src": "100:232:0", - "usedErrors": [] - } - ], - "src": "41:292:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/SwapArgumentsFunctionMutation.sol_json.ast.json b/resources/regressions/all.json/input_json/SwapArgumentsFunctionMutation.sol_json.ast.json deleted file mode 100644 index 424e74b0..00000000 --- a/resources/regressions/all.json/input_json/SwapArgumentsFunctionMutation.sol_json.ast.json +++ /dev/null @@ -1,458 +0,0 @@ -{ - "absolutePath": "benchmarks/SwapArgumentsFunctionMutation/SwapArgumentsFunctionMutation.sol", - "exportedSymbols": - { - "SwapArgumentsFunctionMutation": - [ - 32 - ] - }, - "id": 33, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "SwapArgumentsFunctionMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 32, - "linearizedBaseContracts": - [ - 32 - ], - "name": "SwapArgumentsFunctionMutation", - "nameLocation": "109:29:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "211:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "221:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "225:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "221:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "214:12:0" - } - ] - }, - "functionSelector": "04bc52f8", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "155:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "167:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "159:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "159:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "178:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "170:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "170:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "158:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "202:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "202:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "201:9:0" - }, - "scope": 32, - "src": "146:87:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 30, - "nodeType": "Block", - "src": "304:26:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "id": 26, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "318:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 27, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "321:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 25, - "name": "foo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "314:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "314:9:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 29, - "nodeType": "Return", - "src": "307:16:0" - } - ] - }, - "functionSelector": "ae42e951", - "id": 31, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "bar", - "nameLocation": "248:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "260:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "252:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "252:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "271:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "263:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "263:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "251:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "295:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "295:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "294:9:0" - }, - "scope": 32, - "src": "239:91:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 33, - "src": "100:232:0", - "usedErrors": [] - } - ], - "src": "41:292:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/SwapArgumentsOperatorMutation.sol_json.ast b/resources/regressions/all.json/input_json/SwapArgumentsOperatorMutation.sol_json.ast deleted file mode 100644 index 3aa15701..00000000 --- a/resources/regressions/all.json/input_json/SwapArgumentsOperatorMutation.sol_json.ast +++ /dev/null @@ -1,1931 +0,0 @@ -{ - "absolutePath": "benchmarks/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "exportedSymbols": - { - "SwapArgumentsOperatorMutation": - [ - 143 - ] - }, - "id": 144, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "SwapArgumentsOperatorMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 143, - "linearizedBaseContracts": - [ - 143 - ], - "name": "SwapArgumentsOperatorMutation", - "nameLocation": "109:29:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "220:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "230:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "234:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "230:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "223:12:0" - } - ] - }, - "functionSelector": "b3d09aaa", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySubtraction", - "nameLocation": "154:13:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "176:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "168:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "168:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "187:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "179:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "179:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "167:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "211:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "211:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "210:9:0" - }, - "scope": 143, - "src": "145:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 29, - "nodeType": "Block", - "src": "324:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 25, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "334:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": - { - "id": 26, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "338:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "334:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 28, - "nodeType": "Return", - "src": "327:12:0" - } - ] - }, - "functionSelector": "9d4f4e60", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myDivision", - "nameLocation": "261:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "280:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "272:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "272:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "291:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "283:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "283:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "271:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "315:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "315:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "314:9:0" - }, - "scope": 143, - "src": "252:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 43, - "nodeType": "Block", - "src": "426:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 39, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "436:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": - { - "id": 40, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "440:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "436:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 38, - "id": 42, - "nodeType": "Return", - "src": "429:12:0" - } - ] - }, - "functionSelector": "dc6092a8", - "id": 44, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myModulo", - "nameLocation": "365:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 35, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "x", - "nameLocation": "382:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "374:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "374:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "y", - "nameLocation": "393:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "385:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "385:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "373:22:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "417:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "417:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "416:9:0" - }, - "scope": 143, - "src": "356:92:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 57, - "nodeType": "Block", - "src": "536:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 53, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "546:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 54, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "551:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "546:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 52, - "id": 56, - "nodeType": "Return", - "src": "539:13:0" - } - ] - }, - "functionSelector": "df159c7b", - "id": 58, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myExponentiation", - "nameLocation": "467:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 49, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "x", - "nameLocation": "492:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "484:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 45, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "484:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "y", - "nameLocation": "503:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "495:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 47, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "495:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "483:22:0" - }, - "returnParameters": - { - "id": 52, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 51, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "527:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 50, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "527:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "526:9:0" - }, - "scope": 143, - "src": "458:101:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 71, - "nodeType": "Block", - "src": "632:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 67, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "642:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": - { - "id": 68, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "646:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "642:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "635:12:0" - } - ] - }, - "functionSelector": "7ab4f1c3", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myGT", - "nameLocation": "578:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 60, - "mutability": "mutable", - "name": "x", - "nameLocation": "591:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "583:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 59, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "583:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "y", - "nameLocation": "602:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "594:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 61, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "594:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "582:22:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "626:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 64, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "626:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "625:6:0" - }, - "scope": 143, - "src": "569:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 85, - "nodeType": "Block", - "src": "727:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 81, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "737:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": - { - "id": 82, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "741:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "737:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 80, - "id": 84, - "nodeType": "Return", - "src": "730:12:0" - } - ] - }, - "functionSelector": "ba16f592", - "id": 86, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myLT", - "nameLocation": "673:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 77, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "x", - "nameLocation": "686:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "678:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 73, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "678:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "y", - "nameLocation": "697:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "689:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "689:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "677:22:0" - }, - "returnParameters": - { - "id": 80, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 79, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "721:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 78, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "721:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "720:6:0" - }, - "scope": 143, - "src": "664:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 99, - "nodeType": "Block", - "src": "822:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 97, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 95, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "832:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": - { - "id": 96, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "837:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "832:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 94, - "id": 98, - "nodeType": "Return", - "src": "825:13:0" - } - ] - }, - "functionSelector": "eaa91dbe", - "id": 100, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myGE", - "nameLocation": "768:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 91, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 88, - "mutability": "mutable", - "name": "x", - "nameLocation": "781:1:0", - "nodeType": "VariableDeclaration", - "scope": 100, - "src": "773:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 87, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 90, - "mutability": "mutable", - "name": "y", - "nameLocation": "792:1:0", - "nodeType": "VariableDeclaration", - "scope": 100, - "src": "784:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 89, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "784:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "772:22:0" - }, - "returnParameters": - { - "id": 94, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 93, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 100, - "src": "816:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 92, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "816:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "815:6:0" - }, - "scope": 143, - "src": "759:86:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 113, - "nodeType": "Block", - "src": "918:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 109, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 102, - "src": "928:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": - { - "id": 110, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "933:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "928:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 108, - "id": 112, - "nodeType": "Return", - "src": "921:13:0" - } - ] - }, - "functionSelector": "33e88407", - "id": 114, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myLE", - "nameLocation": "864:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 105, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 102, - "mutability": "mutable", - "name": "x", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 114, - "src": "869:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 101, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "869:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "y", - "nameLocation": "888:1:0", - "nodeType": "VariableDeclaration", - "scope": 114, - "src": "880:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 103, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "880:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "868:22:0" - }, - "returnParameters": - { - "id": 108, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 107, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 114, - "src": "912:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 106, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "912:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "911:6:0" - }, - "scope": 143, - "src": "855:86:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 127, - "nodeType": "Block", - "src": "1014:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 123, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "1024:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": - { - "id": 124, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1029:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1024:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 122, - "id": 126, - "nodeType": "Return", - "src": "1017:13:0" - } - ] - }, - "functionSelector": "5d58009c", - "id": 128, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySAL", - "nameLocation": "956:5:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 119, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 116, - "mutability": "mutable", - "name": "x", - "nameLocation": "970:1:0", - "nodeType": "VariableDeclaration", - "scope": 128, - "src": "962:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 115, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "962:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 118, - "mutability": "mutable", - "name": "y", - "nameLocation": "981:1:0", - "nodeType": "VariableDeclaration", - "scope": 128, - "src": "973:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 117, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "973:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "961:22:0" - }, - "returnParameters": - { - "id": 122, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 121, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 128, - "src": "1005:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 120, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1005:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "1004:9:0" - }, - "scope": 143, - "src": "947:90:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 141, - "nodeType": "Block", - "src": "1110:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 137, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1120:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": - { - "id": 138, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "1125:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1120:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 136, - "id": 140, - "nodeType": "Return", - "src": "1113:13:0" - } - ] - }, - "functionSelector": "ad6b48dc", - "id": 142, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySAR", - "nameLocation": "1052:5:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 133, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 130, - "mutability": "mutable", - "name": "x", - "nameLocation": "1066:1:0", - "nodeType": "VariableDeclaration", - "scope": 142, - "src": "1058:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 129, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1058:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 132, - "mutability": "mutable", - "name": "y", - "nameLocation": "1077:1:0", - "nodeType": "VariableDeclaration", - "scope": 142, - "src": "1069:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 131, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1069:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "1057:22:0" - }, - "returnParameters": - { - "id": 136, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 135, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 142, - "src": "1101:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1101:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "1100:9:0" - }, - "scope": 143, - "src": "1043:90:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 144, - "src": "100:1035:0", - "usedErrors": [] - } - ], - "src": "41:1095:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/SwapArgumentsOperatorMutation.sol_json.ast.json b/resources/regressions/all.json/input_json/SwapArgumentsOperatorMutation.sol_json.ast.json deleted file mode 100644 index 3aa15701..00000000 --- a/resources/regressions/all.json/input_json/SwapArgumentsOperatorMutation.sol_json.ast.json +++ /dev/null @@ -1,1931 +0,0 @@ -{ - "absolutePath": "benchmarks/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "exportedSymbols": - { - "SwapArgumentsOperatorMutation": - [ - 143 - ] - }, - "id": 144, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "SwapArgumentsOperatorMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 143, - "linearizedBaseContracts": - [ - 143 - ], - "name": "SwapArgumentsOperatorMutation", - "nameLocation": "109:29:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "220:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "230:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "234:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "230:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "223:12:0" - } - ] - }, - "functionSelector": "b3d09aaa", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySubtraction", - "nameLocation": "154:13:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "176:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "168:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "168:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "187:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "179:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "179:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "167:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "211:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "211:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "210:9:0" - }, - "scope": 143, - "src": "145:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 29, - "nodeType": "Block", - "src": "324:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 25, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "334:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": - { - "id": 26, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "338:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "334:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 28, - "nodeType": "Return", - "src": "327:12:0" - } - ] - }, - "functionSelector": "9d4f4e60", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myDivision", - "nameLocation": "261:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "280:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "272:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "272:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "291:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "283:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "283:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "271:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "315:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "315:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "314:9:0" - }, - "scope": 143, - "src": "252:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 43, - "nodeType": "Block", - "src": "426:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 39, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "436:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": - { - "id": 40, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "440:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "436:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 38, - "id": 42, - "nodeType": "Return", - "src": "429:12:0" - } - ] - }, - "functionSelector": "dc6092a8", - "id": 44, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myModulo", - "nameLocation": "365:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 35, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "x", - "nameLocation": "382:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "374:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "374:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "y", - "nameLocation": "393:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "385:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "385:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "373:22:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "417:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "417:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "416:9:0" - }, - "scope": 143, - "src": "356:92:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 57, - "nodeType": "Block", - "src": "536:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 53, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "546:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 54, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "551:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "546:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 52, - "id": 56, - "nodeType": "Return", - "src": "539:13:0" - } - ] - }, - "functionSelector": "df159c7b", - "id": 58, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myExponentiation", - "nameLocation": "467:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 49, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "x", - "nameLocation": "492:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "484:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 45, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "484:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "y", - "nameLocation": "503:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "495:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 47, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "495:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "483:22:0" - }, - "returnParameters": - { - "id": 52, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 51, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "527:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 50, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "527:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "526:9:0" - }, - "scope": 143, - "src": "458:101:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 71, - "nodeType": "Block", - "src": "632:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 67, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "642:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": - { - "id": 68, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "646:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "642:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "635:12:0" - } - ] - }, - "functionSelector": "7ab4f1c3", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myGT", - "nameLocation": "578:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 60, - "mutability": "mutable", - "name": "x", - "nameLocation": "591:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "583:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 59, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "583:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "y", - "nameLocation": "602:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "594:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 61, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "594:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "582:22:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "626:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 64, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "626:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "625:6:0" - }, - "scope": 143, - "src": "569:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 85, - "nodeType": "Block", - "src": "727:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 81, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "737:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": - { - "id": 82, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "741:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "737:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 80, - "id": 84, - "nodeType": "Return", - "src": "730:12:0" - } - ] - }, - "functionSelector": "ba16f592", - "id": 86, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myLT", - "nameLocation": "673:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 77, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "x", - "nameLocation": "686:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "678:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 73, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "678:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "y", - "nameLocation": "697:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "689:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "689:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "677:22:0" - }, - "returnParameters": - { - "id": 80, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 79, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "721:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 78, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "721:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "720:6:0" - }, - "scope": 143, - "src": "664:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 99, - "nodeType": "Block", - "src": "822:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 97, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 95, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "832:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": - { - "id": 96, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "837:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "832:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 94, - "id": 98, - "nodeType": "Return", - "src": "825:13:0" - } - ] - }, - "functionSelector": "eaa91dbe", - "id": 100, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myGE", - "nameLocation": "768:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 91, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 88, - "mutability": "mutable", - "name": "x", - "nameLocation": "781:1:0", - "nodeType": "VariableDeclaration", - "scope": 100, - "src": "773:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 87, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 90, - "mutability": "mutable", - "name": "y", - "nameLocation": "792:1:0", - "nodeType": "VariableDeclaration", - "scope": 100, - "src": "784:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 89, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "784:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "772:22:0" - }, - "returnParameters": - { - "id": 94, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 93, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 100, - "src": "816:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 92, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "816:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "815:6:0" - }, - "scope": 143, - "src": "759:86:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 113, - "nodeType": "Block", - "src": "918:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 109, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 102, - "src": "928:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": - { - "id": 110, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "933:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "928:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 108, - "id": 112, - "nodeType": "Return", - "src": "921:13:0" - } - ] - }, - "functionSelector": "33e88407", - "id": 114, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myLE", - "nameLocation": "864:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 105, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 102, - "mutability": "mutable", - "name": "x", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 114, - "src": "869:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 101, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "869:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "y", - "nameLocation": "888:1:0", - "nodeType": "VariableDeclaration", - "scope": 114, - "src": "880:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 103, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "880:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "868:22:0" - }, - "returnParameters": - { - "id": 108, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 107, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 114, - "src": "912:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 106, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "912:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "911:6:0" - }, - "scope": 143, - "src": "855:86:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 127, - "nodeType": "Block", - "src": "1014:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 123, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "1024:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": - { - "id": 124, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1029:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1024:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 122, - "id": 126, - "nodeType": "Return", - "src": "1017:13:0" - } - ] - }, - "functionSelector": "5d58009c", - "id": 128, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySAL", - "nameLocation": "956:5:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 119, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 116, - "mutability": "mutable", - "name": "x", - "nameLocation": "970:1:0", - "nodeType": "VariableDeclaration", - "scope": 128, - "src": "962:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 115, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "962:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 118, - "mutability": "mutable", - "name": "y", - "nameLocation": "981:1:0", - "nodeType": "VariableDeclaration", - "scope": 128, - "src": "973:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 117, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "973:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "961:22:0" - }, - "returnParameters": - { - "id": 122, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 121, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 128, - "src": "1005:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 120, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1005:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "1004:9:0" - }, - "scope": 143, - "src": "947:90:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 141, - "nodeType": "Block", - "src": "1110:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 137, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1120:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": - { - "id": 138, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "1125:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1120:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 136, - "id": 140, - "nodeType": "Return", - "src": "1113:13:0" - } - ] - }, - "functionSelector": "ad6b48dc", - "id": 142, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySAR", - "nameLocation": "1052:5:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 133, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 130, - "mutability": "mutable", - "name": "x", - "nameLocation": "1066:1:0", - "nodeType": "VariableDeclaration", - "scope": 142, - "src": "1058:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 129, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1058:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 132, - "mutability": "mutable", - "name": "y", - "nameLocation": "1077:1:0", - "nodeType": "VariableDeclaration", - "scope": 142, - "src": "1069:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 131, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1069:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "1057:22:0" - }, - "returnParameters": - { - "id": 136, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 135, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 142, - "src": "1101:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1101:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "1100:9:0" - }, - "scope": 143, - "src": "1043:90:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 144, - "src": "100:1035:0", - "usedErrors": [] - } - ], - "src": "41:1095:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/UnaryOperatorMutation.sol_json.ast b/resources/regressions/all.json/input_json/UnaryOperatorMutation.sol_json.ast deleted file mode 100644 index 3bea73e6..00000000 --- a/resources/regressions/all.json/input_json/UnaryOperatorMutation.sol_json.ast +++ /dev/null @@ -1,794 +0,0 @@ -{ - "absolutePath": "benchmarks/UnaryOperatorMutation/UnaryOperatorMutation.sol", - "exportedSymbols": - { - "UnaryOperatorMutation": - [ - 62 - ] - }, - "id": 63, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "UnaryOperatorMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 62, - "linearizedBaseContracts": - [ - 62 - ], - "name": "UnaryOperatorMutation", - "nameLocation": "109:21:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 12, - "nodeType": "Block", - "src": "200:20:0", - "statements": - [ - { - "expression": - { - "id": 10, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "~", - "prefix": true, - "src": "210:3:0", - "subExpression": - { - "id": 9, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "212:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 11, - "nodeType": "Return", - "src": "203:10:0" - } - ] - }, - "functionSelector": "e35bee10", - "id": 13, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myBitwiseNeg", - "nameLocation": "146:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "167:1:0", - "nodeType": "VariableDeclaration", - "scope": 13, - "src": "159:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "159:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "158:11:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 13, - "src": "191:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "191:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "190:9:0" - }, - "scope": 62, - "src": "137:83:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 23, - "nodeType": "Block", - "src": "289:20:0", - "statements": - [ - { - "expression": - { - "id": 21, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "299:3:0", - "subExpression": - { - "id": 20, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "301:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 19, - "id": 22, - "nodeType": "Return", - "src": "292:10:0" - } - ] - }, - "functionSelector": "e7e69a10", - "id": 24, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myPrefixIncr", - "nameLocation": "235:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 16, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 15, - "mutability": "mutable", - "name": "x", - "nameLocation": "256:1:0", - "nodeType": "VariableDeclaration", - "scope": 24, - "src": "248:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 14, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "248:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "247:11:0" - }, - "returnParameters": - { - "id": 19, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 24, - "src": "280:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "280:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "279:9:0" - }, - "scope": 62, - "src": "226:83:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 34, - "nodeType": "Block", - "src": "378:20:0", - "statements": - [ - { - "expression": - { - "id": 32, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": true, - "src": "388:3:0", - "subExpression": - { - "id": 31, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 26, - "src": "390:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 30, - "id": 33, - "nodeType": "Return", - "src": "381:10:0" - } - ] - }, - "functionSelector": "46df6da2", - "id": 35, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myPrefixDecr", - "nameLocation": "324:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 27, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 26, - "mutability": "mutable", - "name": "x", - "nameLocation": "345:1:0", - "nodeType": "VariableDeclaration", - "scope": 35, - "src": "337:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 25, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "337:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "336:11:0" - }, - "returnParameters": - { - "id": 30, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 29, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 35, - "src": "369:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 28, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "369:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "368:9:0" - }, - "scope": 62, - "src": "315:83:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 47, - "nodeType": "Block", - "src": "467:24:0", - "statements": - [ - { - "expression": - { - "id": 43, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "470:3:0", - "subExpression": - { - "id": 42, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "470:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 44, - "nodeType": "ExpressionStatement", - "src": "470:3:0" - }, - { - "expression": - { - "id": 45, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "483:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 41, - "id": 46, - "nodeType": "Return", - "src": "476:8:0" - } - ] - }, - "functionSelector": "4b46ab44", - "id": 48, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySuffixIncr", - "nameLocation": "413:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "x", - "nameLocation": "434:1:0", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "426:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "426:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "425:11:0" - }, - "returnParameters": - { - "id": 41, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 40, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "458:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 39, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "458:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "457:9:0" - }, - "scope": 62, - "src": "404:87:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 60, - "nodeType": "Block", - "src": "560:24:0", - "statements": - [ - { - "expression": - { - "id": 56, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "563:3:0", - "subExpression": - { - "id": 55, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "563:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 57, - "nodeType": "ExpressionStatement", - "src": "563:3:0" - }, - { - "expression": - { - "id": 58, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "576:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 54, - "id": 59, - "nodeType": "Return", - "src": "569:8:0" - } - ] - }, - "functionSelector": "cb3edb42", - "id": 61, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySuffixDecr", - "nameLocation": "506:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 51, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 50, - "mutability": "mutable", - "name": "x", - "nameLocation": "527:1:0", - "nodeType": "VariableDeclaration", - "scope": 61, - "src": "519:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 49, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "519:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "518:11:0" - }, - "returnParameters": - { - "id": 54, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 53, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 61, - "src": "551:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 52, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "551:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "550:9:0" - }, - "scope": 62, - "src": "497:87:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 63, - "src": "100:486:0", - "usedErrors": [] - } - ], - "src": "41:546:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/input_json/UnaryOperatorMutation.sol_json.ast.json b/resources/regressions/all.json/input_json/UnaryOperatorMutation.sol_json.ast.json deleted file mode 100644 index 3bea73e6..00000000 --- a/resources/regressions/all.json/input_json/UnaryOperatorMutation.sol_json.ast.json +++ /dev/null @@ -1,794 +0,0 @@ -{ - "absolutePath": "benchmarks/UnaryOperatorMutation/UnaryOperatorMutation.sol", - "exportedSymbols": - { - "UnaryOperatorMutation": - [ - 62 - ] - }, - "id": 63, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "UnaryOperatorMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 62, - "linearizedBaseContracts": - [ - 62 - ], - "name": "UnaryOperatorMutation", - "nameLocation": "109:21:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 12, - "nodeType": "Block", - "src": "200:20:0", - "statements": - [ - { - "expression": - { - "id": 10, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "~", - "prefix": true, - "src": "210:3:0", - "subExpression": - { - "id": 9, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "212:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 11, - "nodeType": "Return", - "src": "203:10:0" - } - ] - }, - "functionSelector": "e35bee10", - "id": 13, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myBitwiseNeg", - "nameLocation": "146:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "167:1:0", - "nodeType": "VariableDeclaration", - "scope": 13, - "src": "159:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "159:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "158:11:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 13, - "src": "191:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "191:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "190:9:0" - }, - "scope": 62, - "src": "137:83:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 23, - "nodeType": "Block", - "src": "289:20:0", - "statements": - [ - { - "expression": - { - "id": 21, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "299:3:0", - "subExpression": - { - "id": 20, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "301:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 19, - "id": 22, - "nodeType": "Return", - "src": "292:10:0" - } - ] - }, - "functionSelector": "e7e69a10", - "id": 24, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myPrefixIncr", - "nameLocation": "235:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 16, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 15, - "mutability": "mutable", - "name": "x", - "nameLocation": "256:1:0", - "nodeType": "VariableDeclaration", - "scope": 24, - "src": "248:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 14, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "248:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "247:11:0" - }, - "returnParameters": - { - "id": 19, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 24, - "src": "280:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "280:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "279:9:0" - }, - "scope": 62, - "src": "226:83:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 34, - "nodeType": "Block", - "src": "378:20:0", - "statements": - [ - { - "expression": - { - "id": 32, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": true, - "src": "388:3:0", - "subExpression": - { - "id": 31, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 26, - "src": "390:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 30, - "id": 33, - "nodeType": "Return", - "src": "381:10:0" - } - ] - }, - "functionSelector": "46df6da2", - "id": 35, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myPrefixDecr", - "nameLocation": "324:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 27, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 26, - "mutability": "mutable", - "name": "x", - "nameLocation": "345:1:0", - "nodeType": "VariableDeclaration", - "scope": 35, - "src": "337:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 25, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "337:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "336:11:0" - }, - "returnParameters": - { - "id": 30, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 29, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 35, - "src": "369:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 28, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "369:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "368:9:0" - }, - "scope": 62, - "src": "315:83:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 47, - "nodeType": "Block", - "src": "467:24:0", - "statements": - [ - { - "expression": - { - "id": 43, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "470:3:0", - "subExpression": - { - "id": 42, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "470:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 44, - "nodeType": "ExpressionStatement", - "src": "470:3:0" - }, - { - "expression": - { - "id": 45, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "483:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 41, - "id": 46, - "nodeType": "Return", - "src": "476:8:0" - } - ] - }, - "functionSelector": "4b46ab44", - "id": 48, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySuffixIncr", - "nameLocation": "413:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "x", - "nameLocation": "434:1:0", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "426:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "426:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "425:11:0" - }, - "returnParameters": - { - "id": 41, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 40, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "458:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 39, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "458:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "457:9:0" - }, - "scope": 62, - "src": "404:87:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 60, - "nodeType": "Block", - "src": "560:24:0", - "statements": - [ - { - "expression": - { - "id": 56, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "563:3:0", - "subExpression": - { - "id": 55, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "563:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 57, - "nodeType": "ExpressionStatement", - "src": "563:3:0" - }, - { - "expression": - { - "id": 58, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "576:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 54, - "id": 59, - "nodeType": "Return", - "src": "569:8:0" - } - ] - }, - "functionSelector": "cb3edb42", - "id": 61, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySuffixDecr", - "nameLocation": "506:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 51, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 50, - "mutability": "mutable", - "name": "x", - "nameLocation": "527:1:0", - "nodeType": "VariableDeclaration", - "scope": 61, - "src": "519:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 49, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "519:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "518:11:0" - }, - "returnParameters": - { - "id": 54, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 53, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 61, - "src": "551:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 52, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "551:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "550:9:0" - }, - "scope": 62, - "src": "497:87:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 63, - "src": "100:486:0", - "usedErrors": [] - } - ], - "src": "41:546:0" -} \ No newline at end of file diff --git a/resources/regressions/all.json/mutants.log b/resources/regressions/all.json/mutants.log deleted file mode 100644 index 19b221fb..00000000 --- a/resources/regressions/all.json/mutants.log +++ /dev/null @@ -1,66 +0,0 @@ -1,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,7:10, + ,- -2,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,7:10, + ,* -3,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,7:10, + ,/ -4,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,7:10, + ,% -5,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,7:10, + ,** -6,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,11:10, - ,+ -7,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,11:10, - ,* -8,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,11:10, - ,/ -9,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,11:10, - ,% -10,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,11:10, - ,** -11,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,15:10, * ,+ -12,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,15:10, * ,- -13,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,15:10, * ,/ -14,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,15:10, * ,% -15,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,15:10, * ,** -16,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,19:10, / ,+ -17,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,19:10, / ,- -18,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,19:10, / ,* -19,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,19:10, / ,% -20,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,19:10, / ,** -21,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,23:10, % ,+ -22,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,23:10, % ,- -23,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,23:10, % ,* -24,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,23:10, % ,/ -25,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,23:10, % ,** -26,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,27:10, ** ,+ -27,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,27:10, ** ,- -28,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,27:10, ** ,* -29,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,27:10, ** ,/ -30,BinaryOpMutation,BinaryOpMutation/BinaryOpMutation.sol,27:10, ** ,% -31,RequireMutation,RequireMutation/RequireMutation.sol,7:10,cond1,true -32,RequireMutation,RequireMutation/RequireMutation.sol,7:10,cond1,false -33,RequireMutation,RequireMutation/RequireMutation.sol,8:10,cond2,true -34,RequireMutation,RequireMutation/RequireMutation.sol,8:10,cond2,false -35,RequireMutation,RequireMutation/RequireMutation.sol,9:10,cond3,true -36,RequireMutation,RequireMutation/RequireMutation.sol,9:10,cond3,false -37,AssignmentMutation,AssignmentMutation/AssignmentMutation.sol,13:6,42,0 -38,AssignmentMutation,AssignmentMutation/AssignmentMutation.sol,13:6,42,1 -39,AssignmentMutation,AssignmentMutation/AssignmentMutation.sol,14:6,13,0 -40,AssignmentMutation,AssignmentMutation/AssignmentMutation.sol,14:6,13,1 -41,AssignmentMutation,AssignmentMutation/AssignmentMutation.sol,15:6,3110,0 -42,AssignmentMutation,AssignmentMutation/AssignmentMutation.sol,15:6,3110,1 -43,AssignmentMutation,AssignmentMutation/AssignmentMutation.sol,16:6,true,false -44,AssignmentMutation,AssignmentMutation/AssignmentMutation.sol,17:6,false,true -45,DeleteExpressionMutation,DeleteExpressionMutation/DeleteExpressionMutation.sol,9:29,i++,/* i++ */ -46,IfStatementMutation,IfStatementMutation/IfStatementMutation.sol,7:6,a,true -47,IfStatementMutation,IfStatementMutation/IfStatementMutation.sol,7:6,a,false -48,SwapArgumentsOperatorMutation,SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol,7:9,x - y,y - x -49,SwapArgumentsOperatorMutation,SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol,11:9,x / y,y / x -50,SwapArgumentsOperatorMutation,SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol,15:9,x % y,y % x -51,SwapArgumentsOperatorMutation,SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol,19:9,x ** y,y ** x -52,SwapArgumentsOperatorMutation,SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol,23:9,x > y,y > x -53,SwapArgumentsOperatorMutation,SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol,27:9,x < y,y < x -54,SwapArgumentsOperatorMutation,SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol,31:9,x >= y,y >= x -55,SwapArgumentsOperatorMutation,SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol,35:9,x <= y,y <= x -56,SwapArgumentsOperatorMutation,SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol,39:9,x << y,y << x -57,SwapArgumentsOperatorMutation,SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol,43:9,x >> y,y >> x -58,UnaryOperatorMutation,UnaryOperatorMutation/UnaryOperatorMutation.sol,7:9,~,++ -59,UnaryOperatorMutation,UnaryOperatorMutation/UnaryOperatorMutation.sol,7:9,~,-- -60,UnaryOperatorMutation,UnaryOperatorMutation/UnaryOperatorMutation.sol,11:9,++,-- -61,UnaryOperatorMutation,UnaryOperatorMutation/UnaryOperatorMutation.sol,11:9,++,~ -62,UnaryOperatorMutation,UnaryOperatorMutation/UnaryOperatorMutation.sol,15:9,--,++ -63,UnaryOperatorMutation,UnaryOperatorMutation/UnaryOperatorMutation.sol,15:9,--,~ -64,UnaryOperatorMutation,UnaryOperatorMutation/UnaryOperatorMutation.sol,19:3,++,-- -65,UnaryOperatorMutation,UnaryOperatorMutation/UnaryOperatorMutation.sol,24:3,--,++ -66,ElimDelegateMutation,ElimDelegateMutation/ElimDelegateMutation.sol,25:55,delegatecall,call diff --git a/resources/regressions/all.json/mutants/1/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/1/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 00b5be38..00000000 --- a/resources/regressions/all.json/mutants/1/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`+` |==> `-`) of: `return x + y;` - return x-y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/10/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/10/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 93f9697a..00000000 --- a/resources/regressions/all.json/mutants/10/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`-` |==> `**`) of: `return x - y;` - return x**y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/11/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/11/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 6a44886b..00000000 --- a/resources/regressions/all.json/mutants/11/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`*` |==> `+`) of: `return x * y;` - return x+y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/12/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/12/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index e140e696..00000000 --- a/resources/regressions/all.json/mutants/12/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`*` |==> `-`) of: `return x * y;` - return x-y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/13/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/13/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 9311892e..00000000 --- a/resources/regressions/all.json/mutants/13/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`*` |==> `/`) of: `return x * y;` - return x/y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/14/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/14/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 271f95fb..00000000 --- a/resources/regressions/all.json/mutants/14/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`*` |==> `%`) of: `return x * y;` - return x%y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/15/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/15/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 3f76e847..00000000 --- a/resources/regressions/all.json/mutants/15/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`*` |==> `**`) of: `return x * y;` - return x**y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/16/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/16/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index eca2d8cb..00000000 --- a/resources/regressions/all.json/mutants/16/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`/` |==> `+`) of: `return x / y;` - return x+y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/17/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/17/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index b3ae49a1..00000000 --- a/resources/regressions/all.json/mutants/17/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`/` |==> `-`) of: `return x / y;` - return x-y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/18/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/18/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index b674b191..00000000 --- a/resources/regressions/all.json/mutants/18/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`/` |==> `*`) of: `return x / y;` - return x*y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/19/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/19/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 12f0ac72..00000000 --- a/resources/regressions/all.json/mutants/19/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`/` |==> `%`) of: `return x / y;` - return x%y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/2/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/2/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index e4a1f2d4..00000000 --- a/resources/regressions/all.json/mutants/2/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`+` |==> `*`) of: `return x + y;` - return x*y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/20/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/20/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 87ca38a6..00000000 --- a/resources/regressions/all.json/mutants/20/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`/` |==> `**`) of: `return x / y;` - return x**y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/21/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/21/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index ad607087..00000000 --- a/resources/regressions/all.json/mutants/21/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`%` |==> `+`) of: `return x % y;` - return x+y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/22/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/22/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 1e8be328..00000000 --- a/resources/regressions/all.json/mutants/22/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`%` |==> `-`) of: `return x % y;` - return x-y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/23/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/23/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 147ceef8..00000000 --- a/resources/regressions/all.json/mutants/23/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`%` |==> `*`) of: `return x % y;` - return x*y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/24/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/24/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 630af855..00000000 --- a/resources/regressions/all.json/mutants/24/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`%` |==> `/`) of: `return x % y;` - return x/y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/25/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/25/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 00b3bbbf..00000000 --- a/resources/regressions/all.json/mutants/25/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`%` |==> `**`) of: `return x % y;` - return x**y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/26/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/26/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index e41cda7f..00000000 --- a/resources/regressions/all.json/mutants/26/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`**` |==> `+`) of: `return x ** y;` - return x+y; - } - -} diff --git a/resources/regressions/all.json/mutants/27/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/27/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 2027d61d..00000000 --- a/resources/regressions/all.json/mutants/27/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`**` |==> `-`) of: `return x ** y;` - return x-y; - } - -} diff --git a/resources/regressions/all.json/mutants/28/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/28/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 66377dbd..00000000 --- a/resources/regressions/all.json/mutants/28/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`**` |==> `*`) of: `return x ** y;` - return x*y; - } - -} diff --git a/resources/regressions/all.json/mutants/29/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/29/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index d771626e..00000000 --- a/resources/regressions/all.json/mutants/29/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`**` |==> `/`) of: `return x ** y;` - return x/y; - } - -} diff --git a/resources/regressions/all.json/mutants/3/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/3/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index e137257e..00000000 --- a/resources/regressions/all.json/mutants/3/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`+` |==> `/`) of: `return x + y;` - return x/y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/30/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/30/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 082da37e..00000000 --- a/resources/regressions/all.json/mutants/30/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`**` |==> `%`) of: `return x ** y;` - return x%y; - } - -} diff --git a/resources/regressions/all.json/mutants/31/RequireMutation/RequireMutation.sol b/resources/regressions/all.json/mutants/31/RequireMutation/RequireMutation.sol deleted file mode 100644 index 0355a5c7..00000000 --- a/resources/regressions/all.json/mutants/31/RequireMutation/RequireMutation.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract RequireMutation { - function myRequires(bool cond1, bool cond2, bool cond3) public pure returns (bool) { - /// RequireMutation(`cond1` |==> `true`) of: `require(cond1);` - require(true); - require(cond2); - require(cond3); - return true; - } -} diff --git a/resources/regressions/all.json/mutants/32/RequireMutation/RequireMutation.sol b/resources/regressions/all.json/mutants/32/RequireMutation/RequireMutation.sol deleted file mode 100644 index 838a0e4c..00000000 --- a/resources/regressions/all.json/mutants/32/RequireMutation/RequireMutation.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract RequireMutation { - function myRequires(bool cond1, bool cond2, bool cond3) public pure returns (bool) { - /// RequireMutation(`cond1` |==> `false`) of: `require(cond1);` - require(false); - require(cond2); - require(cond3); - return true; - } -} diff --git a/resources/regressions/all.json/mutants/33/RequireMutation/RequireMutation.sol b/resources/regressions/all.json/mutants/33/RequireMutation/RequireMutation.sol deleted file mode 100644 index cf24ffc0..00000000 --- a/resources/regressions/all.json/mutants/33/RequireMutation/RequireMutation.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract RequireMutation { - function myRequires(bool cond1, bool cond2, bool cond3) public pure returns (bool) { - require(cond1); - /// RequireMutation(`cond2` |==> `true`) of: `require(cond2);` - require(true); - require(cond3); - return true; - } -} diff --git a/resources/regressions/all.json/mutants/34/RequireMutation/RequireMutation.sol b/resources/regressions/all.json/mutants/34/RequireMutation/RequireMutation.sol deleted file mode 100644 index 0aa067ed..00000000 --- a/resources/regressions/all.json/mutants/34/RequireMutation/RequireMutation.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract RequireMutation { - function myRequires(bool cond1, bool cond2, bool cond3) public pure returns (bool) { - require(cond1); - /// RequireMutation(`cond2` |==> `false`) of: `require(cond2);` - require(false); - require(cond3); - return true; - } -} diff --git a/resources/regressions/all.json/mutants/35/RequireMutation/RequireMutation.sol b/resources/regressions/all.json/mutants/35/RequireMutation/RequireMutation.sol deleted file mode 100644 index d6c8513a..00000000 --- a/resources/regressions/all.json/mutants/35/RequireMutation/RequireMutation.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract RequireMutation { - function myRequires(bool cond1, bool cond2, bool cond3) public pure returns (bool) { - require(cond1); - require(cond2); - /// RequireMutation(`cond3` |==> `true`) of: `require(cond3);` - require(true); - return true; - } -} diff --git a/resources/regressions/all.json/mutants/36/RequireMutation/RequireMutation.sol b/resources/regressions/all.json/mutants/36/RequireMutation/RequireMutation.sol deleted file mode 100644 index a45e4467..00000000 --- a/resources/regressions/all.json/mutants/36/RequireMutation/RequireMutation.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract RequireMutation { - function myRequires(bool cond1, bool cond2, bool cond3) public pure returns (bool) { - require(cond1); - require(cond2); - /// RequireMutation(`cond3` |==> `false`) of: `require(cond3);` - require(false); - return true; - } -} diff --git a/resources/regressions/all.json/mutants/37/AssignmentMutation/AssignmentMutation.sol b/resources/regressions/all.json/mutants/37/AssignmentMutation/AssignmentMutation.sol deleted file mode 100644 index 57a31c6b..00000000 --- a/resources/regressions/all.json/mutants/37/AssignmentMutation/AssignmentMutation.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract AssignmentMutation { - uint256 public x; - uint256 public y; - uint256 public z; - bool public a; - bool public b; - - constructor() { - /// AssignmentMutation(`42` |==> `0`) of: `x = 42; // original: 42` - x = 0; // original: 42 - y = 13; // original: 13 - z = 3110; // original: 3110 - a = true; // original: true - b = false; // original: false - } -} diff --git a/resources/regressions/all.json/mutants/38/AssignmentMutation/AssignmentMutation.sol b/resources/regressions/all.json/mutants/38/AssignmentMutation/AssignmentMutation.sol deleted file mode 100644 index 71567385..00000000 --- a/resources/regressions/all.json/mutants/38/AssignmentMutation/AssignmentMutation.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract AssignmentMutation { - uint256 public x; - uint256 public y; - uint256 public z; - bool public a; - bool public b; - - constructor() { - /// AssignmentMutation(`42` |==> `1`) of: `x = 42; // original: 42` - x = 1; // original: 42 - y = 13; // original: 13 - z = 3110; // original: 3110 - a = true; // original: true - b = false; // original: false - } -} diff --git a/resources/regressions/all.json/mutants/39/AssignmentMutation/AssignmentMutation.sol b/resources/regressions/all.json/mutants/39/AssignmentMutation/AssignmentMutation.sol deleted file mode 100644 index 4974c0e7..00000000 --- a/resources/regressions/all.json/mutants/39/AssignmentMutation/AssignmentMutation.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract AssignmentMutation { - uint256 public x; - uint256 public y; - uint256 public z; - bool public a; - bool public b; - - constructor() { - x = 42; // original: 42 - /// AssignmentMutation(`13` |==> `0`) of: `y = 13; // original: 13` - y = 0; // original: 13 - z = 3110; // original: 3110 - a = true; // original: true - b = false; // original: false - } -} diff --git a/resources/regressions/all.json/mutants/4/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/4/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 8b77d90c..00000000 --- a/resources/regressions/all.json/mutants/4/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`+` |==> `%`) of: `return x + y;` - return x%y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/40/AssignmentMutation/AssignmentMutation.sol b/resources/regressions/all.json/mutants/40/AssignmentMutation/AssignmentMutation.sol deleted file mode 100644 index f7cf44b7..00000000 --- a/resources/regressions/all.json/mutants/40/AssignmentMutation/AssignmentMutation.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract AssignmentMutation { - uint256 public x; - uint256 public y; - uint256 public z; - bool public a; - bool public b; - - constructor() { - x = 42; // original: 42 - /// AssignmentMutation(`13` |==> `1`) of: `y = 13; // original: 13` - y = 1; // original: 13 - z = 3110; // original: 3110 - a = true; // original: true - b = false; // original: false - } -} diff --git a/resources/regressions/all.json/mutants/41/AssignmentMutation/AssignmentMutation.sol b/resources/regressions/all.json/mutants/41/AssignmentMutation/AssignmentMutation.sol deleted file mode 100644 index 906162ca..00000000 --- a/resources/regressions/all.json/mutants/41/AssignmentMutation/AssignmentMutation.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract AssignmentMutation { - uint256 public x; - uint256 public y; - uint256 public z; - bool public a; - bool public b; - - constructor() { - x = 42; // original: 42 - y = 13; // original: 13 - /// AssignmentMutation(`3110` |==> `0`) of: `z = 3110; // original: 3110` - z = 0; // original: 3110 - a = true; // original: true - b = false; // original: false - } -} diff --git a/resources/regressions/all.json/mutants/42/AssignmentMutation/AssignmentMutation.sol b/resources/regressions/all.json/mutants/42/AssignmentMutation/AssignmentMutation.sol deleted file mode 100644 index 9944eea8..00000000 --- a/resources/regressions/all.json/mutants/42/AssignmentMutation/AssignmentMutation.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract AssignmentMutation { - uint256 public x; - uint256 public y; - uint256 public z; - bool public a; - bool public b; - - constructor() { - x = 42; // original: 42 - y = 13; // original: 13 - /// AssignmentMutation(`3110` |==> `1`) of: `z = 3110; // original: 3110` - z = 1; // original: 3110 - a = true; // original: true - b = false; // original: false - } -} diff --git a/resources/regressions/all.json/mutants/43/AssignmentMutation/AssignmentMutation.sol b/resources/regressions/all.json/mutants/43/AssignmentMutation/AssignmentMutation.sol deleted file mode 100644 index 5b65d366..00000000 --- a/resources/regressions/all.json/mutants/43/AssignmentMutation/AssignmentMutation.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract AssignmentMutation { - uint256 public x; - uint256 public y; - uint256 public z; - bool public a; - bool public b; - - constructor() { - x = 42; // original: 42 - y = 13; // original: 13 - z = 3110; // original: 3110 - /// AssignmentMutation(`true` |==> `false`) of: `a = true; // original: true` - a = false; // original: true - b = false; // original: false - } -} diff --git a/resources/regressions/all.json/mutants/44/AssignmentMutation/AssignmentMutation.sol b/resources/regressions/all.json/mutants/44/AssignmentMutation/AssignmentMutation.sol deleted file mode 100644 index 16656d42..00000000 --- a/resources/regressions/all.json/mutants/44/AssignmentMutation/AssignmentMutation.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract AssignmentMutation { - uint256 public x; - uint256 public y; - uint256 public z; - bool public a; - bool public b; - - constructor() { - x = 42; // original: 42 - y = 13; // original: 13 - z = 3110; // original: 3110 - a = true; // original: true - /// AssignmentMutation(`false` |==> `true`) of: `b = false; // original: false` - b = true; // original: false - } -} diff --git a/resources/regressions/all.json/mutants/45/DeleteExpressionMutation/DeleteExpressionMutation.sol b/resources/regressions/all.json/mutants/45/DeleteExpressionMutation/DeleteExpressionMutation.sol deleted file mode 100644 index fae3abd8..00000000 --- a/resources/regressions/all.json/mutants/45/DeleteExpressionMutation/DeleteExpressionMutation.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract DeleteExpressionMutation { - - function myIdentity(uint256 x) public pure returns (uint256) { - uint256 result = 0; - /// DeleteExpressionMutation(`i++` |==> `/* i++ */`) of: `for (uint256 i = 0; i < x; i++) {` - for (uint256 i = 0; i < x; /* i++ */) { - result ++; - } - return result; - } -} diff --git a/resources/regressions/all.json/mutants/46/IfStatementMutation/IfStatementMutation.sol b/resources/regressions/all.json/mutants/46/IfStatementMutation/IfStatementMutation.sol deleted file mode 100644 index e61e4120..00000000 --- a/resources/regressions/all.json/mutants/46/IfStatementMutation/IfStatementMutation.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract IfStatementMutation { - function myBooleanNegation(bool a) public pure returns (bool) { - /// IfStatementMutation(`a` |==> `true`) of: `if (a) {` - if (true) { - return true; - } - else { - return false; - } - } -} diff --git a/resources/regressions/all.json/mutants/47/IfStatementMutation/IfStatementMutation.sol b/resources/regressions/all.json/mutants/47/IfStatementMutation/IfStatementMutation.sol deleted file mode 100644 index 26a7d948..00000000 --- a/resources/regressions/all.json/mutants/47/IfStatementMutation/IfStatementMutation.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract IfStatementMutation { - function myBooleanNegation(bool a) public pure returns (bool) { - /// IfStatementMutation(`a` |==> `false`) of: `if (a) {` - if (false) { - return true; - } - else { - return false; - } - } -} diff --git a/resources/regressions/all.json/mutants/48/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol b/resources/regressions/all.json/mutants/48/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol deleted file mode 100644 index 5dc55e76..00000000 --- a/resources/regressions/all.json/mutants/48/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapArgumentsOperatorMutation { - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - /// SwapArgumentsOperatorMutation(`x - y` |==> `y - x`) of: `return x - y;` - return y - x; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - - function myGT(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - function myLT(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - function myGE(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - function myLE(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - function mySAL(uint256 x, uint256 y) public pure returns (uint256) { - return x << y; - } - - function mySAR(uint256 x, uint256 y) public pure returns (uint256) { - return x >> y; - } -} diff --git a/resources/regressions/all.json/mutants/49/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol b/resources/regressions/all.json/mutants/49/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol deleted file mode 100644 index 329f233c..00000000 --- a/resources/regressions/all.json/mutants/49/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapArgumentsOperatorMutation { - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - /// SwapArgumentsOperatorMutation(`x / y` |==> `y / x`) of: `return x / y;` - return y / x; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - - function myGT(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - function myLT(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - function myGE(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - function myLE(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - function mySAL(uint256 x, uint256 y) public pure returns (uint256) { - return x << y; - } - - function mySAR(uint256 x, uint256 y) public pure returns (uint256) { - return x >> y; - } -} diff --git a/resources/regressions/all.json/mutants/5/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/5/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 217be922..00000000 --- a/resources/regressions/all.json/mutants/5/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`+` |==> `**`) of: `return x + y;` - return x**y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/50/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol b/resources/regressions/all.json/mutants/50/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol deleted file mode 100644 index aac7bcb6..00000000 --- a/resources/regressions/all.json/mutants/50/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapArgumentsOperatorMutation { - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - /// SwapArgumentsOperatorMutation(`x % y` |==> `y % x`) of: `return x % y;` - return y % x; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - - function myGT(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - function myLT(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - function myGE(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - function myLE(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - function mySAL(uint256 x, uint256 y) public pure returns (uint256) { - return x << y; - } - - function mySAR(uint256 x, uint256 y) public pure returns (uint256) { - return x >> y; - } -} diff --git a/resources/regressions/all.json/mutants/51/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol b/resources/regressions/all.json/mutants/51/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol deleted file mode 100644 index 52295f75..00000000 --- a/resources/regressions/all.json/mutants/51/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapArgumentsOperatorMutation { - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - /// SwapArgumentsOperatorMutation(`x ** y` |==> `y ** x`) of: `return x ** y;` - return y ** x; - } - - function myGT(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - function myLT(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - function myGE(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - function myLE(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - function mySAL(uint256 x, uint256 y) public pure returns (uint256) { - return x << y; - } - - function mySAR(uint256 x, uint256 y) public pure returns (uint256) { - return x >> y; - } -} diff --git a/resources/regressions/all.json/mutants/52/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol b/resources/regressions/all.json/mutants/52/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol deleted file mode 100644 index 99130464..00000000 --- a/resources/regressions/all.json/mutants/52/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapArgumentsOperatorMutation { - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - - function myGT(uint256 x, uint256 y) public pure returns (bool) { - /// SwapArgumentsOperatorMutation(`x > y` |==> `y > x`) of: `return x > y;` - return y > x; - } - - function myLT(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - function myGE(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - function myLE(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - function mySAL(uint256 x, uint256 y) public pure returns (uint256) { - return x << y; - } - - function mySAR(uint256 x, uint256 y) public pure returns (uint256) { - return x >> y; - } -} diff --git a/resources/regressions/all.json/mutants/53/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol b/resources/regressions/all.json/mutants/53/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol deleted file mode 100644 index a8a59285..00000000 --- a/resources/regressions/all.json/mutants/53/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapArgumentsOperatorMutation { - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - - function myGT(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - function myLT(uint256 x, uint256 y) public pure returns (bool) { - /// SwapArgumentsOperatorMutation(`x < y` |==> `y < x`) of: `return x < y;` - return y < x; - } - - function myGE(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - function myLE(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - function mySAL(uint256 x, uint256 y) public pure returns (uint256) { - return x << y; - } - - function mySAR(uint256 x, uint256 y) public pure returns (uint256) { - return x >> y; - } -} diff --git a/resources/regressions/all.json/mutants/54/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol b/resources/regressions/all.json/mutants/54/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol deleted file mode 100644 index 479a3188..00000000 --- a/resources/regressions/all.json/mutants/54/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapArgumentsOperatorMutation { - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - - function myGT(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - function myLT(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - function myGE(uint256 x, uint256 y) public pure returns (bool) { - /// SwapArgumentsOperatorMutation(`x >= y` |==> `y >= x`) of: `return x >= y;` - return y >= x; - } - - function myLE(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - function mySAL(uint256 x, uint256 y) public pure returns (uint256) { - return x << y; - } - - function mySAR(uint256 x, uint256 y) public pure returns (uint256) { - return x >> y; - } -} diff --git a/resources/regressions/all.json/mutants/55/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol b/resources/regressions/all.json/mutants/55/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol deleted file mode 100644 index 481319cc..00000000 --- a/resources/regressions/all.json/mutants/55/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapArgumentsOperatorMutation { - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - - function myGT(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - function myLT(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - function myGE(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - function myLE(uint256 x, uint256 y) public pure returns (bool) { - /// SwapArgumentsOperatorMutation(`x <= y` |==> `y <= x`) of: `return x <= y;` - return y <= x; - } - - function mySAL(uint256 x, uint256 y) public pure returns (uint256) { - return x << y; - } - - function mySAR(uint256 x, uint256 y) public pure returns (uint256) { - return x >> y; - } -} diff --git a/resources/regressions/all.json/mutants/56/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol b/resources/regressions/all.json/mutants/56/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol deleted file mode 100644 index 290d524c..00000000 --- a/resources/regressions/all.json/mutants/56/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapArgumentsOperatorMutation { - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - - function myGT(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - function myLT(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - function myGE(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - function myLE(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - function mySAL(uint256 x, uint256 y) public pure returns (uint256) { - /// SwapArgumentsOperatorMutation(`x << y` |==> `y << x`) of: `return x << y;` - return y << x; - } - - function mySAR(uint256 x, uint256 y) public pure returns (uint256) { - return x >> y; - } -} diff --git a/resources/regressions/all.json/mutants/57/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol b/resources/regressions/all.json/mutants/57/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol deleted file mode 100644 index ba76dd47..00000000 --- a/resources/regressions/all.json/mutants/57/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract SwapArgumentsOperatorMutation { - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - - function myGT(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - function myLT(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - function myGE(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - function myLE(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - function mySAL(uint256 x, uint256 y) public pure returns (uint256) { - return x << y; - } - - function mySAR(uint256 x, uint256 y) public pure returns (uint256) { - /// SwapArgumentsOperatorMutation(`x >> y` |==> `y >> x`) of: `return x >> y;` - return y >> x; - } -} diff --git a/resources/regressions/all.json/mutants/58/UnaryOperatorMutation/UnaryOperatorMutation.sol b/resources/regressions/all.json/mutants/58/UnaryOperatorMutation/UnaryOperatorMutation.sol deleted file mode 100644 index d0c22db9..00000000 --- a/resources/regressions/all.json/mutants/58/UnaryOperatorMutation/UnaryOperatorMutation.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract UnaryOperatorMutation { - function myBitwiseNeg(uint256 x) public pure returns (uint256) { - /// UnaryOperatorMutation(`~` |==> `++`) of: `return ~ x;` - return ++ x; - } - - function myPrefixIncr(uint256 x) public pure returns (uint256) { - return ++x; - } - - function myPrefixDecr(uint256 x) public pure returns (uint256) { - return --x; - } - - function mySuffixIncr(uint256 x) public pure returns (uint256) { - x++; - return x; - } - - function mySuffixDecr(uint256 x) public pure returns (uint256) { - x--; - return x; - } -} diff --git a/resources/regressions/all.json/mutants/59/UnaryOperatorMutation/UnaryOperatorMutation.sol b/resources/regressions/all.json/mutants/59/UnaryOperatorMutation/UnaryOperatorMutation.sol deleted file mode 100644 index 93d10765..00000000 --- a/resources/regressions/all.json/mutants/59/UnaryOperatorMutation/UnaryOperatorMutation.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract UnaryOperatorMutation { - function myBitwiseNeg(uint256 x) public pure returns (uint256) { - /// UnaryOperatorMutation(`~` |==> `--`) of: `return ~ x;` - return -- x; - } - - function myPrefixIncr(uint256 x) public pure returns (uint256) { - return ++x; - } - - function myPrefixDecr(uint256 x) public pure returns (uint256) { - return --x; - } - - function mySuffixIncr(uint256 x) public pure returns (uint256) { - x++; - return x; - } - - function mySuffixDecr(uint256 x) public pure returns (uint256) { - x--; - return x; - } -} diff --git a/resources/regressions/all.json/mutants/6/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/6/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index 6c0d0bd3..00000000 --- a/resources/regressions/all.json/mutants/6/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`-` |==> `+`) of: `return x - y;` - return x+y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/60/UnaryOperatorMutation/UnaryOperatorMutation.sol b/resources/regressions/all.json/mutants/60/UnaryOperatorMutation/UnaryOperatorMutation.sol deleted file mode 100644 index b2e1769c..00000000 --- a/resources/regressions/all.json/mutants/60/UnaryOperatorMutation/UnaryOperatorMutation.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract UnaryOperatorMutation { - function myBitwiseNeg(uint256 x) public pure returns (uint256) { - return ~ x; - } - - function myPrefixIncr(uint256 x) public pure returns (uint256) { - /// UnaryOperatorMutation(`++` |==> `--`) of: `return ++x;` - return --x; - } - - function myPrefixDecr(uint256 x) public pure returns (uint256) { - return --x; - } - - function mySuffixIncr(uint256 x) public pure returns (uint256) { - x++; - return x; - } - - function mySuffixDecr(uint256 x) public pure returns (uint256) { - x--; - return x; - } -} diff --git a/resources/regressions/all.json/mutants/61/UnaryOperatorMutation/UnaryOperatorMutation.sol b/resources/regressions/all.json/mutants/61/UnaryOperatorMutation/UnaryOperatorMutation.sol deleted file mode 100644 index 64c3fb24..00000000 --- a/resources/regressions/all.json/mutants/61/UnaryOperatorMutation/UnaryOperatorMutation.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract UnaryOperatorMutation { - function myBitwiseNeg(uint256 x) public pure returns (uint256) { - return ~ x; - } - - function myPrefixIncr(uint256 x) public pure returns (uint256) { - /// UnaryOperatorMutation(`++` |==> `~`) of: `return ++x;` - return ~x; - } - - function myPrefixDecr(uint256 x) public pure returns (uint256) { - return --x; - } - - function mySuffixIncr(uint256 x) public pure returns (uint256) { - x++; - return x; - } - - function mySuffixDecr(uint256 x) public pure returns (uint256) { - x--; - return x; - } -} diff --git a/resources/regressions/all.json/mutants/62/UnaryOperatorMutation/UnaryOperatorMutation.sol b/resources/regressions/all.json/mutants/62/UnaryOperatorMutation/UnaryOperatorMutation.sol deleted file mode 100644 index d125a7ff..00000000 --- a/resources/regressions/all.json/mutants/62/UnaryOperatorMutation/UnaryOperatorMutation.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract UnaryOperatorMutation { - function myBitwiseNeg(uint256 x) public pure returns (uint256) { - return ~ x; - } - - function myPrefixIncr(uint256 x) public pure returns (uint256) { - return ++x; - } - - function myPrefixDecr(uint256 x) public pure returns (uint256) { - /// UnaryOperatorMutation(`--` |==> `++`) of: `return --x;` - return ++x; - } - - function mySuffixIncr(uint256 x) public pure returns (uint256) { - x++; - return x; - } - - function mySuffixDecr(uint256 x) public pure returns (uint256) { - x--; - return x; - } -} diff --git a/resources/regressions/all.json/mutants/63/UnaryOperatorMutation/UnaryOperatorMutation.sol b/resources/regressions/all.json/mutants/63/UnaryOperatorMutation/UnaryOperatorMutation.sol deleted file mode 100644 index f1d117d8..00000000 --- a/resources/regressions/all.json/mutants/63/UnaryOperatorMutation/UnaryOperatorMutation.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract UnaryOperatorMutation { - function myBitwiseNeg(uint256 x) public pure returns (uint256) { - return ~ x; - } - - function myPrefixIncr(uint256 x) public pure returns (uint256) { - return ++x; - } - - function myPrefixDecr(uint256 x) public pure returns (uint256) { - /// UnaryOperatorMutation(`--` |==> `~`) of: `return --x;` - return ~x; - } - - function mySuffixIncr(uint256 x) public pure returns (uint256) { - x++; - return x; - } - - function mySuffixDecr(uint256 x) public pure returns (uint256) { - x--; - return x; - } -} diff --git a/resources/regressions/all.json/mutants/64/UnaryOperatorMutation/UnaryOperatorMutation.sol b/resources/regressions/all.json/mutants/64/UnaryOperatorMutation/UnaryOperatorMutation.sol deleted file mode 100644 index 8b40209e..00000000 --- a/resources/regressions/all.json/mutants/64/UnaryOperatorMutation/UnaryOperatorMutation.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract UnaryOperatorMutation { - function myBitwiseNeg(uint256 x) public pure returns (uint256) { - return ~ x; - } - - function myPrefixIncr(uint256 x) public pure returns (uint256) { - return ++x; - } - - function myPrefixDecr(uint256 x) public pure returns (uint256) { - return --x; - } - - function mySuffixIncr(uint256 x) public pure returns (uint256) { - /// UnaryOperatorMutation(`++` |==> `--`) of: `x++;` - x--; - return x; - } - - function mySuffixDecr(uint256 x) public pure returns (uint256) { - x--; - return x; - } -} diff --git a/resources/regressions/all.json/mutants/65/UnaryOperatorMutation/UnaryOperatorMutation.sol b/resources/regressions/all.json/mutants/65/UnaryOperatorMutation/UnaryOperatorMutation.sol deleted file mode 100644 index ba1800bb..00000000 --- a/resources/regressions/all.json/mutants/65/UnaryOperatorMutation/UnaryOperatorMutation.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract UnaryOperatorMutation { - function myBitwiseNeg(uint256 x) public pure returns (uint256) { - return ~ x; - } - - function myPrefixIncr(uint256 x) public pure returns (uint256) { - return ++x; - } - - function myPrefixDecr(uint256 x) public pure returns (uint256) { - return --x; - } - - function mySuffixIncr(uint256 x) public pure returns (uint256) { - x++; - return x; - } - - function mySuffixDecr(uint256 x) public pure returns (uint256) { - /// UnaryOperatorMutation(`--` |==> `++`) of: `x--;` - x++; - return x; - } -} diff --git a/resources/regressions/all.json/mutants/66/ElimDelegateMutation/ElimDelegateMutation.sol b/resources/regressions/all.json/mutants/66/ElimDelegateMutation/ElimDelegateMutation.sol deleted file mode 100644 index eb966866..00000000 --- a/resources/regressions/all.json/mutants/66/ElimDelegateMutation/ElimDelegateMutation.sol +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.13; - -contract B { - uint public num; - address public sender; - uint public value; - - function setVars(uint _num) public payable { - num = _num; - sender = msg.sender; - value = msg.value; - } -} - -contract A { - uint public num; - address public sender; - uint public value; - bool public delegateSuccessful; - bytes public myData; - - - function setVars(address _contract, uint _num) public payable { - /// ElimDelegateMutation(`delegatecall` |==> `call`) of: `(bool success, bytes memory data) = _contract.delegatecall(` - (bool success, bytes memory data) = _contract.call( - abi.encodeWithSignature("setVars(uint256)", _num) - ); - delegateSuccessful = success; - myData = data; - } -} diff --git a/resources/regressions/all.json/mutants/7/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/7/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index cfbf446a..00000000 --- a/resources/regressions/all.json/mutants/7/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`-` |==> `*`) of: `return x - y;` - return x*y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/8/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/8/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index a3486bf9..00000000 --- a/resources/regressions/all.json/mutants/8/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`-` |==> `/`) of: `return x - y;` - return x/y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/all.json/mutants/9/BinaryOpMutation/BinaryOpMutation.sol b/resources/regressions/all.json/mutants/9/BinaryOpMutation/BinaryOpMutation.sol deleted file mode 100644 index f7363ed2..00000000 --- a/resources/regressions/all.json/mutants/9/BinaryOpMutation/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`-` |==> `%`) of: `return x - y;` - return x%y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - return x % y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/multiple-contracts-1.json/gambit_results.json b/resources/regressions/multiple-contracts-1.json/gambit_results.json deleted file mode 100644 index c15f856e..00000000 --- a/resources/regressions/multiple-contracts-1.json/gambit_results.json +++ /dev/null @@ -1,44 +0,0 @@ -[ - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a+decimals;\n return res;\n }\n \n", - "id": "1", - "name": "mutants/1/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a-decimals;\n return res;\n }\n \n", - "id": "2", - "name": "mutants/2/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a*decimals;\n return res;\n }\n \n", - "id": "3", - "name": "mutants/3/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a/decimals;\n return res;\n }\n \n", - "id": "4", - "name": "mutants/4/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a%decimals;\n return res;\n }\n \n", - "id": "5", - "name": "mutants/5/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;`\n+ uint256 res = decimals ** a;\n return res;\n }\n \n", - "id": "6", - "name": "mutants/6/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - } -] \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-1.json/input_json/C.sol_json.ast b/resources/regressions/multiple-contracts-1.json/input_json/C.sol_json.ast deleted file mode 100644 index a3306b6e..00000000 --- a/resources/regressions/multiple-contracts-1.json/input_json/C.sol_json.ast +++ /dev/null @@ -1,1828 +0,0 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-1.json/input_json/C.sol_json.ast.json b/resources/regressions/multiple-contracts-1.json/input_json/C.sol_json.ast.json deleted file mode 100644 index a3306b6e..00000000 --- a/resources/regressions/multiple-contracts-1.json/input_json/C.sol_json.ast.json +++ /dev/null @@ -1,1828 +0,0 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-1.json/mutants.log b/resources/regressions/multiple-contracts-1.json/mutants.log deleted file mode 100644 index 771158fd..00000000 --- a/resources/regressions/multiple-contracts-1.json/mutants.log +++ /dev/null @@ -1,6 +0,0 @@ -1,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,+ -2,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,- -3,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,* -4,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,/ -5,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,% -6,SwapArgumentsOperatorMutation,MultipleContracts/C.sol,24:23,a ** decimals,decimals ** a diff --git a/resources/regressions/multiple-contracts-1.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-1.json/mutants/1/MultipleContracts/C.sol deleted file mode 100644 index 59da228b..00000000 --- a/resources/regressions/multiple-contracts-1.json/mutants/1/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 res = a+decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-1.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-1.json/mutants/2/MultipleContracts/C.sol deleted file mode 100644 index 911e098f..00000000 --- a/resources/regressions/multiple-contracts-1.json/mutants/2/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 res = a-decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-1.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-1.json/mutants/3/MultipleContracts/C.sol deleted file mode 100644 index 53ca08b0..00000000 --- a/resources/regressions/multiple-contracts-1.json/mutants/3/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 res = a*decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-1.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-1.json/mutants/4/MultipleContracts/C.sol deleted file mode 100644 index 218d97b1..00000000 --- a/resources/regressions/multiple-contracts-1.json/mutants/4/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 res = a/decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-1.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-1.json/mutants/5/MultipleContracts/C.sol deleted file mode 100644 index 98a4b5fd..00000000 --- a/resources/regressions/multiple-contracts-1.json/mutants/5/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 res = a%decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-1.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-1.json/mutants/6/MultipleContracts/C.sol deleted file mode 100644 index 55b45bf2..00000000 --- a/resources/regressions/multiple-contracts-1.json/mutants/6/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;` - uint256 res = decimals ** a; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-2.json/gambit_results.json b/resources/regressions/multiple-contracts-2.json/gambit_results.json deleted file mode 100644 index 232e564c..00000000 --- a/resources/regressions/multiple-contracts-2.json/gambit_results.json +++ /dev/null @@ -1,72 +0,0 @@ -[ - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `-`) of: `return a + b;`\n+ return a-b;\n }\n }\n \n", - "id": "1", - "name": "mutants/1/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `*`) of: `return a + b;`\n+ return a*b;\n }\n }\n \n", - "id": "2", - "name": "mutants/2/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `/`) of: `return a + b;`\n+ return a/b;\n }\n }\n \n", - "id": "3", - "name": "mutants/3/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `%`) of: `return a + b;`\n+ return a%b;\n }\n }\n \n", - "id": "4", - "name": "mutants/4/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a+decimals;\n return res;\n }\n \n", - "id": "5", - "name": "mutants/5/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a-decimals;\n return res;\n }\n \n", - "id": "6", - "name": "mutants/6/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a*decimals;\n return res;\n }\n \n", - "id": "7", - "name": "mutants/7/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a/decimals;\n return res;\n }\n \n", - "id": "8", - "name": "mutants/8/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a%decimals;\n return res;\n }\n \n", - "id": "9", - "name": "mutants/9/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;`\n+ uint256 res = decimals ** a;\n return res;\n }\n \n", - "id": "10", - "name": "mutants/10/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - } -] \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-2.json/input_json/C.sol_json.ast b/resources/regressions/multiple-contracts-2.json/input_json/C.sol_json.ast deleted file mode 100644 index a3306b6e..00000000 --- a/resources/regressions/multiple-contracts-2.json/input_json/C.sol_json.ast +++ /dev/null @@ -1,1828 +0,0 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-2.json/input_json/C.sol_json.ast.json b/resources/regressions/multiple-contracts-2.json/input_json/C.sol_json.ast.json deleted file mode 100644 index a3306b6e..00000000 --- a/resources/regressions/multiple-contracts-2.json/input_json/C.sol_json.ast.json +++ /dev/null @@ -1,1828 +0,0 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-2.json/mutants.log b/resources/regressions/multiple-contracts-2.json/mutants.log deleted file mode 100644 index 523683b9..00000000 --- a/resources/regressions/multiple-contracts-2.json/mutants.log +++ /dev/null @@ -1,10 +0,0 @@ -1,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,- -2,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,* -3,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,/ -4,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,% -5,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,+ -6,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,- -7,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,* -8,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,/ -9,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,% -10,SwapArgumentsOperatorMutation,MultipleContracts/C.sol,24:23,a ** decimals,decimals ** a diff --git a/resources/regressions/multiple-contracts-2.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.json/mutants/1/MultipleContracts/C.sol deleted file mode 100644 index a514961f..00000000 --- a/resources/regressions/multiple-contracts-2.json/mutants/1/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `-`) of: `return a + b;` - return a-b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-2.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.json/mutants/10/MultipleContracts/C.sol deleted file mode 100644 index 55b45bf2..00000000 --- a/resources/regressions/multiple-contracts-2.json/mutants/10/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;` - uint256 res = decimals ** a; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-2.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.json/mutants/2/MultipleContracts/C.sol deleted file mode 100644 index b85149e4..00000000 --- a/resources/regressions/multiple-contracts-2.json/mutants/2/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `*`) of: `return a + b;` - return a*b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-2.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.json/mutants/3/MultipleContracts/C.sol deleted file mode 100644 index a5819d3a..00000000 --- a/resources/regressions/multiple-contracts-2.json/mutants/3/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `/`) of: `return a + b;` - return a/b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-2.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.json/mutants/4/MultipleContracts/C.sol deleted file mode 100644 index 530045ec..00000000 --- a/resources/regressions/multiple-contracts-2.json/mutants/4/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `%`) of: `return a + b;` - return a%b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-2.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.json/mutants/5/MultipleContracts/C.sol deleted file mode 100644 index 59da228b..00000000 --- a/resources/regressions/multiple-contracts-2.json/mutants/5/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 res = a+decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-2.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.json/mutants/6/MultipleContracts/C.sol deleted file mode 100644 index 911e098f..00000000 --- a/resources/regressions/multiple-contracts-2.json/mutants/6/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 res = a-decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-2.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.json/mutants/7/MultipleContracts/C.sol deleted file mode 100644 index 53ca08b0..00000000 --- a/resources/regressions/multiple-contracts-2.json/mutants/7/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 res = a*decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-2.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.json/mutants/8/MultipleContracts/C.sol deleted file mode 100644 index 218d97b1..00000000 --- a/resources/regressions/multiple-contracts-2.json/mutants/8/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 res = a/decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-2.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.json/mutants/9/MultipleContracts/C.sol deleted file mode 100644 index 98a4b5fd..00000000 --- a/resources/regressions/multiple-contracts-2.json/mutants/9/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 res = a%decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-3.json/gambit_results.json b/resources/regressions/multiple-contracts-3.json/gambit_results.json deleted file mode 100644 index 55b15b1a..00000000 --- a/resources/regressions/multiple-contracts-3.json/gambit_results.json +++ /dev/null @@ -1,100 +0,0 @@ -[ - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `-`) of: `return a + b;`\n+ return a-b;\n }\n }\n \n", - "id": "1", - "name": "mutants/1/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `*`) of: `return a + b;`\n+ return a*b;\n }\n }\n \n", - "id": "2", - "name": "mutants/2/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `/`) of: `return a + b;`\n+ return a/b;\n }\n }\n \n", - "id": "3", - "name": "mutants/3/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `%`) of: `return a + b;`\n+ return a%b;\n }\n }\n \n", - "id": "4", - "name": "mutants/4/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a+decimals;\n return res;\n }\n \n", - "id": "5", - "name": "mutants/5/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a-decimals;\n return res;\n }\n \n", - "id": "6", - "name": "mutants/6/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a*decimals;\n return res;\n }\n \n", - "id": "7", - "name": "mutants/7/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a/decimals;\n return res;\n }\n \n", - "id": "8", - "name": "mutants/8/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a%decimals;\n return res;\n }\n \n", - "id": "9", - "name": "mutants/9/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;`\n+ uint256 res = decimals ** a;\n return res;\n }\n \n", - "id": "10", - "name": "mutants/10/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `-`) of: `return c + d;`\n+ return c-d;\n }\n }\n", - "id": "11", - "name": "mutants/11/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `*`) of: `return c + d;`\n+ return c*d;\n }\n }\n", - "id": "12", - "name": "mutants/12/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `/`) of: `return c + d;`\n+ return c/d;\n }\n }\n", - "id": "13", - "name": "mutants/13/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `%`) of: `return c + d;`\n+ return c%d;\n }\n }\n", - "id": "14", - "name": "mutants/14/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - } -] \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-3.json/input_json/C.sol_json.ast b/resources/regressions/multiple-contracts-3.json/input_json/C.sol_json.ast deleted file mode 100644 index a3306b6e..00000000 --- a/resources/regressions/multiple-contracts-3.json/input_json/C.sol_json.ast +++ /dev/null @@ -1,1828 +0,0 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-3.json/input_json/C.sol_json.ast.json b/resources/regressions/multiple-contracts-3.json/input_json/C.sol_json.ast.json deleted file mode 100644 index a3306b6e..00000000 --- a/resources/regressions/multiple-contracts-3.json/input_json/C.sol_json.ast.json +++ /dev/null @@ -1,1828 +0,0 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-3.json/mutants.log b/resources/regressions/multiple-contracts-3.json/mutants.log deleted file mode 100644 index c9beac83..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants.log +++ /dev/null @@ -1,14 +0,0 @@ -1,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,- -2,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,* -3,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,/ -4,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,% -5,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,+ -6,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,- -7,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,* -8,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,/ -9,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,% -10,SwapArgumentsOperatorMutation,MultipleContracts/C.sol,24:23,a ** decimals,decimals ** a -11,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,- -12,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,* -13,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,/ -14,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,% diff --git a/resources/regressions/multiple-contracts-3.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.json/mutants/1/MultipleContracts/C.sol deleted file mode 100644 index a514961f..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants/1/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `-`) of: `return a + b;` - return a-b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-3.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.json/mutants/10/MultipleContracts/C.sol deleted file mode 100644 index 55b45bf2..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants/10/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;` - uint256 res = decimals ** a; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-3.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.json/mutants/11/MultipleContracts/C.sol deleted file mode 100644 index 6568d8b1..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants/11/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `-`) of: `return c + d;` - return c-d; - } -} diff --git a/resources/regressions/multiple-contracts-3.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.json/mutants/12/MultipleContracts/C.sol deleted file mode 100644 index b4f749d8..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants/12/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `*`) of: `return c + d;` - return c*d; - } -} diff --git a/resources/regressions/multiple-contracts-3.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.json/mutants/13/MultipleContracts/C.sol deleted file mode 100644 index 206e0f6d..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants/13/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `/`) of: `return c + d;` - return c/d; - } -} diff --git a/resources/regressions/multiple-contracts-3.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.json/mutants/14/MultipleContracts/C.sol deleted file mode 100644 index 2d95fadc..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants/14/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `%`) of: `return c + d;` - return c%d; - } -} diff --git a/resources/regressions/multiple-contracts-3.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.json/mutants/2/MultipleContracts/C.sol deleted file mode 100644 index b85149e4..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants/2/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `*`) of: `return a + b;` - return a*b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-3.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.json/mutants/3/MultipleContracts/C.sol deleted file mode 100644 index a5819d3a..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants/3/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `/`) of: `return a + b;` - return a/b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-3.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.json/mutants/4/MultipleContracts/C.sol deleted file mode 100644 index 530045ec..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants/4/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `%`) of: `return a + b;` - return a%b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-3.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.json/mutants/5/MultipleContracts/C.sol deleted file mode 100644 index 59da228b..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants/5/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 res = a+decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-3.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.json/mutants/6/MultipleContracts/C.sol deleted file mode 100644 index 911e098f..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants/6/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 res = a-decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-3.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.json/mutants/7/MultipleContracts/C.sol deleted file mode 100644 index 53ca08b0..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants/7/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 res = a*decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-3.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.json/mutants/8/MultipleContracts/C.sol deleted file mode 100644 index 218d97b1..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants/8/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 res = a/decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-3.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.json/mutants/9/MultipleContracts/C.sol deleted file mode 100644 index 98a4b5fd..00000000 --- a/resources/regressions/multiple-contracts-3.json/mutants/9/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 res = a%decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-4.json/gambit_results.json b/resources/regressions/multiple-contracts-4.json/gambit_results.json deleted file mode 100644 index ef080dd3..00000000 --- a/resources/regressions/multiple-contracts-4.json/gambit_results.json +++ /dev/null @@ -1,58 +0,0 @@ -[ - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `-`) of: `return a + b;`\n+ return a-b;\n }\n }\n \n", - "id": "1", - "name": "mutants/1/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `*`) of: `return a + b;`\n+ return a*b;\n }\n }\n \n", - "id": "2", - "name": "mutants/2/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `/`) of: `return a + b;`\n+ return a/b;\n }\n }\n \n", - "id": "3", - "name": "mutants/3/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `%`) of: `return a + b;`\n+ return a%b;\n }\n }\n \n", - "id": "4", - "name": "mutants/4/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `-`) of: `return c + d;`\n+ return c-d;\n }\n }\n", - "id": "5", - "name": "mutants/5/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `*`) of: `return c + d;`\n+ return c*d;\n }\n }\n", - "id": "6", - "name": "mutants/6/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `/`) of: `return c + d;`\n+ return c/d;\n }\n }\n", - "id": "7", - "name": "mutants/7/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `%`) of: `return c + d;`\n+ return c%d;\n }\n }\n", - "id": "8", - "name": "mutants/8/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - } -] \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-4.json/input_json/C.sol_json.ast b/resources/regressions/multiple-contracts-4.json/input_json/C.sol_json.ast deleted file mode 100644 index a3306b6e..00000000 --- a/resources/regressions/multiple-contracts-4.json/input_json/C.sol_json.ast +++ /dev/null @@ -1,1828 +0,0 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-4.json/input_json/C.sol_json.ast.json b/resources/regressions/multiple-contracts-4.json/input_json/C.sol_json.ast.json deleted file mode 100644 index a3306b6e..00000000 --- a/resources/regressions/multiple-contracts-4.json/input_json/C.sol_json.ast.json +++ /dev/null @@ -1,1828 +0,0 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-4.json/mutants.log b/resources/regressions/multiple-contracts-4.json/mutants.log deleted file mode 100644 index 826b78c5..00000000 --- a/resources/regressions/multiple-contracts-4.json/mutants.log +++ /dev/null @@ -1,8 +0,0 @@ -1,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,- -2,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,* -3,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,/ -4,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,% -5,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,- -6,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,* -7,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,/ -8,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,% diff --git a/resources/regressions/multiple-contracts-4.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.json/mutants/1/MultipleContracts/C.sol deleted file mode 100644 index a514961f..00000000 --- a/resources/regressions/multiple-contracts-4.json/mutants/1/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `-`) of: `return a + b;` - return a-b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-4.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.json/mutants/2/MultipleContracts/C.sol deleted file mode 100644 index b85149e4..00000000 --- a/resources/regressions/multiple-contracts-4.json/mutants/2/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `*`) of: `return a + b;` - return a*b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-4.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.json/mutants/3/MultipleContracts/C.sol deleted file mode 100644 index a5819d3a..00000000 --- a/resources/regressions/multiple-contracts-4.json/mutants/3/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `/`) of: `return a + b;` - return a/b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-4.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.json/mutants/4/MultipleContracts/C.sol deleted file mode 100644 index 530045ec..00000000 --- a/resources/regressions/multiple-contracts-4.json/mutants/4/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `%`) of: `return a + b;` - return a%b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/multiple-contracts-4.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.json/mutants/5/MultipleContracts/C.sol deleted file mode 100644 index 6568d8b1..00000000 --- a/resources/regressions/multiple-contracts-4.json/mutants/5/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `-`) of: `return c + d;` - return c-d; - } -} diff --git a/resources/regressions/multiple-contracts-4.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.json/mutants/6/MultipleContracts/C.sol deleted file mode 100644 index b4f749d8..00000000 --- a/resources/regressions/multiple-contracts-4.json/mutants/6/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `*`) of: `return c + d;` - return c*d; - } -} diff --git a/resources/regressions/multiple-contracts-4.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.json/mutants/7/MultipleContracts/C.sol deleted file mode 100644 index 206e0f6d..00000000 --- a/resources/regressions/multiple-contracts-4.json/mutants/7/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `/`) of: `return c + d;` - return c/d; - } -} diff --git a/resources/regressions/multiple-contracts-4.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.json/mutants/8/MultipleContracts/C.sol deleted file mode 100644 index 2d95fadc..00000000 --- a/resources/regressions/multiple-contracts-4.json/mutants/8/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `%`) of: `return c + d;` - return c%d; - } -} diff --git a/resources/regressions/sanity-config.json/gambit_results.json b/resources/regressions/sanity-config.json/gambit_results.json deleted file mode 100644 index 39586088..00000000 --- a/resources/regressions/sanity-config.json/gambit_results.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -20,7 +20,8 @@\n }\n \n function myModulo(uint256 x, uint256 y) public pure returns (uint256) {\n-\treturn x % y;\n+\t/// BinaryOpMutation(`%` |==> `-`) of: `return x % y;`\n+\treturn x-y;\n }\n \n function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) {\n", - "id": "1", - "name": "mutants/1/BinaryOpMutation.sol", - "original": "BinaryOpMutation.sol", - } -] \ No newline at end of file diff --git a/resources/regressions/sanity-config.json/input_json/BinaryOpMutation.sol_json.ast b/resources/regressions/sanity-config.json/input_json/BinaryOpMutation.sol_json.ast deleted file mode 100644 index b02050bb..00000000 --- a/resources/regressions/sanity-config.json/input_json/BinaryOpMutation.sol_json.ast +++ /dev/null @@ -1,1183 +0,0 @@ -{ - "absolutePath": "benchmarks/BinaryOpMutation/BinaryOpMutation.sol", - "exportedSymbols": - { - "BinaryOpMutation": - [ - 87 - ] - }, - "id": 88, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "BinaryOpMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 87, - "linearizedBaseContracts": - [ - 87 - ], - "name": "BinaryOpMutation", - "nameLocation": "109:16:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "204:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "214:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "218:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "214:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "207:12:0" - } - ] - }, - "functionSelector": "04b53fe4", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myAddition", - "nameLocation": "141:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "160:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "152:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "152:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "171:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "163:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "163:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "151:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "195:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "195:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "194:9:0" - }, - "scope": 87, - "src": "132:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 29, - "nodeType": "Block", - "src": "307:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 25, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "317:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 26, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "321:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "317:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 28, - "nodeType": "Return", - "src": "310:12:0" - } - ] - }, - "functionSelector": "b3d09aaa", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySubtraction", - "nameLocation": "241:13:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "263:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "255:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "255:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "274:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "266:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "266:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "254:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "298:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "298:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "297:9:0" - }, - "scope": 87, - "src": "232:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 43, - "nodeType": "Block", - "src": "413:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 39, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "423:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": - { - "id": 40, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "427:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "423:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 38, - "id": 42, - "nodeType": "Return", - "src": "416:12:0" - } - ] - }, - "functionSelector": "6831fd12", - "id": 44, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myMultiplication", - "nameLocation": "344:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 35, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "x", - "nameLocation": "369:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "361:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "361:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "y", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "372:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "372:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "360:22:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "404:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "404:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "403:9:0" - }, - "scope": 87, - "src": "335:100:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 57, - "nodeType": "Block", - "src": "513:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 53, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "523:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": - { - "id": 54, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "527:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "523:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 52, - "id": 56, - "nodeType": "Return", - "src": "516:12:0" - } - ] - }, - "functionSelector": "9d4f4e60", - "id": 58, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myDivision", - "nameLocation": "450:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 49, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "x", - "nameLocation": "469:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "461:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 45, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "461:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "y", - "nameLocation": "480:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "472:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 47, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "472:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "460:22:0" - }, - "returnParameters": - { - "id": 52, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 51, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "504:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 50, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "504:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "503:9:0" - }, - "scope": 87, - "src": "441:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 71, - "nodeType": "Block", - "src": "611:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 67, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "621:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": - { - "id": 68, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "625:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "621:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "614:12:0" - } - ] - }, - "functionSelector": "dc6092a8", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myModulo", - "nameLocation": "550:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 60, - "mutability": "mutable", - "name": "x", - "nameLocation": "567:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "559:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 59, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "559:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "y", - "nameLocation": "578:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "570:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 61, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "570:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "558:22:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "602:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "602:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "601:9:0" - }, - "scope": 87, - "src": "541:92:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 85, - "nodeType": "Block", - "src": "717:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 81, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "727:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 82, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "732:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "727:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 80, - "id": 84, - "nodeType": "Return", - "src": "720:13:0" - } - ] - }, - "functionSelector": "df159c7b", - "id": 86, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myExponentiation", - "nameLocation": "648:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 77, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "x", - "nameLocation": "673:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "665:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 73, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "665:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "y", - "nameLocation": "684:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "676:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "676:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "664:22:0" - }, - "returnParameters": - { - "id": 80, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 79, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "708:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 78, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "708:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "707:9:0" - }, - "scope": 87, - "src": "639:101:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 88, - "src": "100:643:0", - "usedErrors": [] - } - ], - "src": "41:703:0" -} \ No newline at end of file diff --git a/resources/regressions/sanity-config.json/input_json/BinaryOpMutation.sol_json.ast.json b/resources/regressions/sanity-config.json/input_json/BinaryOpMutation.sol_json.ast.json deleted file mode 100644 index b02050bb..00000000 --- a/resources/regressions/sanity-config.json/input_json/BinaryOpMutation.sol_json.ast.json +++ /dev/null @@ -1,1183 +0,0 @@ -{ - "absolutePath": "benchmarks/BinaryOpMutation/BinaryOpMutation.sol", - "exportedSymbols": - { - "BinaryOpMutation": - [ - 87 - ] - }, - "id": 88, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "BinaryOpMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 87, - "linearizedBaseContracts": - [ - 87 - ], - "name": "BinaryOpMutation", - "nameLocation": "109:16:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "204:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "214:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "218:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "214:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "207:12:0" - } - ] - }, - "functionSelector": "04b53fe4", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myAddition", - "nameLocation": "141:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "160:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "152:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "152:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "171:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "163:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "163:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "151:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "195:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "195:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "194:9:0" - }, - "scope": 87, - "src": "132:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 29, - "nodeType": "Block", - "src": "307:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 25, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "317:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 26, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "321:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "317:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 28, - "nodeType": "Return", - "src": "310:12:0" - } - ] - }, - "functionSelector": "b3d09aaa", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySubtraction", - "nameLocation": "241:13:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "263:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "255:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "255:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "274:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "266:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "266:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "254:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "298:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "298:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "297:9:0" - }, - "scope": 87, - "src": "232:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 43, - "nodeType": "Block", - "src": "413:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 39, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "423:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": - { - "id": 40, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "427:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "423:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 38, - "id": 42, - "nodeType": "Return", - "src": "416:12:0" - } - ] - }, - "functionSelector": "6831fd12", - "id": 44, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myMultiplication", - "nameLocation": "344:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 35, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "x", - "nameLocation": "369:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "361:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "361:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "y", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "372:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "372:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "360:22:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "404:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "404:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "403:9:0" - }, - "scope": 87, - "src": "335:100:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 57, - "nodeType": "Block", - "src": "513:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 53, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "523:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": - { - "id": 54, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "527:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "523:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 52, - "id": 56, - "nodeType": "Return", - "src": "516:12:0" - } - ] - }, - "functionSelector": "9d4f4e60", - "id": 58, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myDivision", - "nameLocation": "450:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 49, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "x", - "nameLocation": "469:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "461:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 45, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "461:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "y", - "nameLocation": "480:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "472:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 47, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "472:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "460:22:0" - }, - "returnParameters": - { - "id": 52, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 51, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "504:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 50, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "504:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "503:9:0" - }, - "scope": 87, - "src": "441:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 71, - "nodeType": "Block", - "src": "611:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 67, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "621:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": - { - "id": 68, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "625:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "621:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "614:12:0" - } - ] - }, - "functionSelector": "dc6092a8", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myModulo", - "nameLocation": "550:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 60, - "mutability": "mutable", - "name": "x", - "nameLocation": "567:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "559:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 59, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "559:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "y", - "nameLocation": "578:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "570:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 61, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "570:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "558:22:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "602:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "602:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "601:9:0" - }, - "scope": 87, - "src": "541:92:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 85, - "nodeType": "Block", - "src": "717:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 81, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "727:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 82, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "732:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "727:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 80, - "id": 84, - "nodeType": "Return", - "src": "720:13:0" - } - ] - }, - "functionSelector": "df159c7b", - "id": 86, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myExponentiation", - "nameLocation": "648:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 77, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "x", - "nameLocation": "673:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "665:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 73, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "665:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "y", - "nameLocation": "684:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "676:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "676:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "664:22:0" - }, - "returnParameters": - { - "id": 80, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 79, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "708:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 78, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "708:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "707:9:0" - }, - "scope": 87, - "src": "639:101:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 88, - "src": "100:643:0", - "usedErrors": [] - } - ], - "src": "41:703:0" -} \ No newline at end of file diff --git a/resources/regressions/sanity-config.json/mutants.log b/resources/regressions/sanity-config.json/mutants.log deleted file mode 100644 index 35b15394..00000000 --- a/resources/regressions/sanity-config.json/mutants.log +++ /dev/null @@ -1 +0,0 @@ -1,BinaryOpMutation,BinaryOpMutation.sol,23:10, % ,- diff --git a/resources/regressions/sanity-config.json/mutants/1/BinaryOpMutation.sol b/resources/regressions/sanity-config.json/mutants/1/BinaryOpMutation.sol deleted file mode 100644 index 1e8be328..00000000 --- a/resources/regressions/sanity-config.json/mutants/1/BinaryOpMutation.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract BinaryOpMutation { - function myAddition(uint256 x, uint256 y) public pure returns (uint256) { - return x + y; - } - - function mySubtraction(uint256 x, uint256 y) public pure returns (uint256) { - return x - y; - } - - function myMultiplication(uint256 x, uint256 y) public pure returns (uint256) { - return x * y; - } - - function myDivision(uint256 x, uint256 y) public pure returns (uint256) { - return x / y; - } - - function myModulo(uint256 x, uint256 y) public pure returns (uint256) { - /// BinaryOpMutation(`%` |==> `-`) of: `return x % y;` - return x-y; - } - - function myExponentiation(uint256 x, uint256 y) public pure returns (uint256) { - return x ** y; - } - -} diff --git a/resources/regressions/test1.json/gambit_results.json b/resources/regressions/test1.json/gambit_results.json deleted file mode 100644 index 612d8c10..00000000 --- a/resources/regressions/test1.json/gambit_results.json +++ /dev/null @@ -1,44 +0,0 @@ -[ - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a+decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "1", - "name": "mutants/1/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a-decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "2", - "name": "mutants/2/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a*decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "3", - "name": "mutants/3/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a/decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "4", - "name": "mutants/4/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a%decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "5", - "name": "mutants/5/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;`\n+ uint256 res = decimals ** a;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "6", - "name": "mutants/6/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - } -] \ No newline at end of file diff --git a/resources/regressions/test1.json/input_json/TenPower.sol_json.ast b/resources/regressions/test1.json/input_json/TenPower.sol_json.ast deleted file mode 100644 index b5bf1c32..00000000 --- a/resources/regressions/test1.json/input_json/TenPower.sol_json.ast +++ /dev/null @@ -1,334 +0,0 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file diff --git a/resources/regressions/test1.json/input_json/TenPower.sol_json.ast.json b/resources/regressions/test1.json/input_json/TenPower.sol_json.ast.json deleted file mode 100644 index b5bf1c32..00000000 --- a/resources/regressions/test1.json/input_json/TenPower.sol_json.ast.json +++ /dev/null @@ -1,334 +0,0 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file diff --git a/resources/regressions/test1.json/mutants.log b/resources/regressions/test1.json/mutants.log deleted file mode 100644 index 8257640c..00000000 --- a/resources/regressions/test1.json/mutants.log +++ /dev/null @@ -1,6 +0,0 @@ -1,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,+ -2,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,- -3,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,* -4,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,/ -5,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,% -6,SwapArgumentsOperatorMutation,10Power/TenPower.sol,8:23,a ** decimals,decimals ** a diff --git a/resources/regressions/test1.json/mutants/1/10Power/TenPower.sol b/resources/regressions/test1.json/mutants/1/10Power/TenPower.sol deleted file mode 100644 index 49908440..00000000 --- a/resources/regressions/test1.json/mutants/1/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 res = a+decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test1.json/mutants/2/10Power/TenPower.sol b/resources/regressions/test1.json/mutants/2/10Power/TenPower.sol deleted file mode 100644 index 23654dcc..00000000 --- a/resources/regressions/test1.json/mutants/2/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 res = a-decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test1.json/mutants/3/10Power/TenPower.sol b/resources/regressions/test1.json/mutants/3/10Power/TenPower.sol deleted file mode 100644 index 66d17601..00000000 --- a/resources/regressions/test1.json/mutants/3/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 res = a*decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test1.json/mutants/4/10Power/TenPower.sol b/resources/regressions/test1.json/mutants/4/10Power/TenPower.sol deleted file mode 100644 index 844dc323..00000000 --- a/resources/regressions/test1.json/mutants/4/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 res = a/decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test1.json/mutants/5/10Power/TenPower.sol b/resources/regressions/test1.json/mutants/5/10Power/TenPower.sol deleted file mode 100644 index 14614412..00000000 --- a/resources/regressions/test1.json/mutants/5/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 res = a%decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test1.json/mutants/6/10Power/TenPower.sol b/resources/regressions/test1.json/mutants/6/10Power/TenPower.sol deleted file mode 100644 index 674f128c..00000000 --- a/resources/regressions/test1.json/mutants/6/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;` - uint256 res = decimals ** a; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test2.json/gambit_results.json b/resources/regressions/test2.json/gambit_results.json deleted file mode 100644 index 612d8c10..00000000 --- a/resources/regressions/test2.json/gambit_results.json +++ /dev/null @@ -1,44 +0,0 @@ -[ - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a+decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "1", - "name": "mutants/1/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a-decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "2", - "name": "mutants/2/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a*decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "3", - "name": "mutants/3/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a/decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "4", - "name": "mutants/4/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a%decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "5", - "name": "mutants/5/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;`\n+ uint256 res = decimals ** a;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "6", - "name": "mutants/6/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - } -] \ No newline at end of file diff --git a/resources/regressions/test2.json/input_json/TenPower.sol_json.ast b/resources/regressions/test2.json/input_json/TenPower.sol_json.ast deleted file mode 100644 index b5bf1c32..00000000 --- a/resources/regressions/test2.json/input_json/TenPower.sol_json.ast +++ /dev/null @@ -1,334 +0,0 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file diff --git a/resources/regressions/test2.json/input_json/TenPower.sol_json.ast.json b/resources/regressions/test2.json/input_json/TenPower.sol_json.ast.json deleted file mode 100644 index b5bf1c32..00000000 --- a/resources/regressions/test2.json/input_json/TenPower.sol_json.ast.json +++ /dev/null @@ -1,334 +0,0 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file diff --git a/resources/regressions/test2.json/mutants.log b/resources/regressions/test2.json/mutants.log deleted file mode 100644 index 8257640c..00000000 --- a/resources/regressions/test2.json/mutants.log +++ /dev/null @@ -1,6 +0,0 @@ -1,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,+ -2,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,- -3,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,* -4,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,/ -5,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,% -6,SwapArgumentsOperatorMutation,10Power/TenPower.sol,8:23,a ** decimals,decimals ** a diff --git a/resources/regressions/test2.json/mutants/1/10Power/TenPower.sol b/resources/regressions/test2.json/mutants/1/10Power/TenPower.sol deleted file mode 100644 index 49908440..00000000 --- a/resources/regressions/test2.json/mutants/1/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 res = a+decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test2.json/mutants/2/10Power/TenPower.sol b/resources/regressions/test2.json/mutants/2/10Power/TenPower.sol deleted file mode 100644 index 23654dcc..00000000 --- a/resources/regressions/test2.json/mutants/2/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 res = a-decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test2.json/mutants/3/10Power/TenPower.sol b/resources/regressions/test2.json/mutants/3/10Power/TenPower.sol deleted file mode 100644 index 66d17601..00000000 --- a/resources/regressions/test2.json/mutants/3/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 res = a*decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test2.json/mutants/4/10Power/TenPower.sol b/resources/regressions/test2.json/mutants/4/10Power/TenPower.sol deleted file mode 100644 index 844dc323..00000000 --- a/resources/regressions/test2.json/mutants/4/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 res = a/decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test2.json/mutants/5/10Power/TenPower.sol b/resources/regressions/test2.json/mutants/5/10Power/TenPower.sol deleted file mode 100644 index 14614412..00000000 --- a/resources/regressions/test2.json/mutants/5/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 res = a%decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test2.json/mutants/6/10Power/TenPower.sol b/resources/regressions/test2.json/mutants/6/10Power/TenPower.sol deleted file mode 100644 index 674f128c..00000000 --- a/resources/regressions/test2.json/mutants/6/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;` - uint256 res = decimals ** a; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test3.json/gambit_results.json b/resources/regressions/test3.json/gambit_results.json deleted file mode 100644 index 612d8c10..00000000 --- a/resources/regressions/test3.json/gambit_results.json +++ /dev/null @@ -1,44 +0,0 @@ -[ - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a+decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "1", - "name": "mutants/1/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a-decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "2", - "name": "mutants/2/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a*decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "3", - "name": "mutants/3/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a/decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "4", - "name": "mutants/4/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a%decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "5", - "name": "mutants/5/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;`\n+ uint256 res = decimals ** a;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "6", - "name": "mutants/6/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - } -] \ No newline at end of file diff --git a/resources/regressions/test3.json/input_json/C.sol_json.ast b/resources/regressions/test3.json/input_json/C.sol_json.ast deleted file mode 100644 index a3306b6e..00000000 --- a/resources/regressions/test3.json/input_json/C.sol_json.ast +++ /dev/null @@ -1,1828 +0,0 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file diff --git a/resources/regressions/test3.json/input_json/C.sol_json.ast.json b/resources/regressions/test3.json/input_json/C.sol_json.ast.json deleted file mode 100644 index a3306b6e..00000000 --- a/resources/regressions/test3.json/input_json/C.sol_json.ast.json +++ /dev/null @@ -1,1828 +0,0 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file diff --git a/resources/regressions/test3.json/input_json/TenPower.sol_json.ast b/resources/regressions/test3.json/input_json/TenPower.sol_json.ast deleted file mode 100644 index b5bf1c32..00000000 --- a/resources/regressions/test3.json/input_json/TenPower.sol_json.ast +++ /dev/null @@ -1,334 +0,0 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file diff --git a/resources/regressions/test3.json/input_json/TenPower.sol_json.ast.json b/resources/regressions/test3.json/input_json/TenPower.sol_json.ast.json deleted file mode 100644 index b5bf1c32..00000000 --- a/resources/regressions/test3.json/input_json/TenPower.sol_json.ast.json +++ /dev/null @@ -1,334 +0,0 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file diff --git a/resources/regressions/test3.json/mutants.log b/resources/regressions/test3.json/mutants.log deleted file mode 100644 index 8257640c..00000000 --- a/resources/regressions/test3.json/mutants.log +++ /dev/null @@ -1,6 +0,0 @@ -1,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,+ -2,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,- -3,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,* -4,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,/ -5,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,% -6,SwapArgumentsOperatorMutation,10Power/TenPower.sol,8:23,a ** decimals,decimals ** a diff --git a/resources/regressions/test3.json/mutants/1/10Power/TenPower.sol b/resources/regressions/test3.json/mutants/1/10Power/TenPower.sol deleted file mode 100644 index 49908440..00000000 --- a/resources/regressions/test3.json/mutants/1/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 res = a+decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test3.json/mutants/2/10Power/TenPower.sol b/resources/regressions/test3.json/mutants/2/10Power/TenPower.sol deleted file mode 100644 index 23654dcc..00000000 --- a/resources/regressions/test3.json/mutants/2/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 res = a-decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test3.json/mutants/3/10Power/TenPower.sol b/resources/regressions/test3.json/mutants/3/10Power/TenPower.sol deleted file mode 100644 index 66d17601..00000000 --- a/resources/regressions/test3.json/mutants/3/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 res = a*decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test3.json/mutants/4/10Power/TenPower.sol b/resources/regressions/test3.json/mutants/4/10Power/TenPower.sol deleted file mode 100644 index 844dc323..00000000 --- a/resources/regressions/test3.json/mutants/4/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 res = a/decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test3.json/mutants/5/10Power/TenPower.sol b/resources/regressions/test3.json/mutants/5/10Power/TenPower.sol deleted file mode 100644 index 14614412..00000000 --- a/resources/regressions/test3.json/mutants/5/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 res = a%decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test3.json/mutants/6/10Power/TenPower.sol b/resources/regressions/test3.json/mutants/6/10Power/TenPower.sol deleted file mode 100644 index 674f128c..00000000 --- a/resources/regressions/test3.json/mutants/6/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;` - uint256 res = decimals ** a; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test4.json/gambit_results.json b/resources/regressions/test4.json/gambit_results.json deleted file mode 100644 index 612d8c10..00000000 --- a/resources/regressions/test4.json/gambit_results.json +++ /dev/null @@ -1,44 +0,0 @@ -[ - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a+decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "1", - "name": "mutants/1/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a-decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "2", - "name": "mutants/2/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a*decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "3", - "name": "mutants/3/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a/decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "4", - "name": "mutants/4/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a%decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "5", - "name": "mutants/5/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;`\n+ uint256 res = decimals ** a;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "6", - "name": "mutants/6/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - } -] \ No newline at end of file diff --git a/resources/regressions/test4.json/input_json/C.sol_json.ast b/resources/regressions/test4.json/input_json/C.sol_json.ast deleted file mode 100644 index a3306b6e..00000000 --- a/resources/regressions/test4.json/input_json/C.sol_json.ast +++ /dev/null @@ -1,1828 +0,0 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file diff --git a/resources/regressions/test4.json/input_json/C.sol_json.ast.json b/resources/regressions/test4.json/input_json/C.sol_json.ast.json deleted file mode 100644 index a3306b6e..00000000 --- a/resources/regressions/test4.json/input_json/C.sol_json.ast.json +++ /dev/null @@ -1,1828 +0,0 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file diff --git a/resources/regressions/test4.json/input_json/TenPower.sol_json.ast b/resources/regressions/test4.json/input_json/TenPower.sol_json.ast deleted file mode 100644 index b5bf1c32..00000000 --- a/resources/regressions/test4.json/input_json/TenPower.sol_json.ast +++ /dev/null @@ -1,334 +0,0 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file diff --git a/resources/regressions/test4.json/input_json/TenPower.sol_json.ast.json b/resources/regressions/test4.json/input_json/TenPower.sol_json.ast.json deleted file mode 100644 index b5bf1c32..00000000 --- a/resources/regressions/test4.json/input_json/TenPower.sol_json.ast.json +++ /dev/null @@ -1,334 +0,0 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file diff --git a/resources/regressions/test4.json/mutants.log b/resources/regressions/test4.json/mutants.log deleted file mode 100644 index 8257640c..00000000 --- a/resources/regressions/test4.json/mutants.log +++ /dev/null @@ -1,6 +0,0 @@ -1,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,+ -2,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,- -3,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,* -4,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,/ -5,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,% -6,SwapArgumentsOperatorMutation,10Power/TenPower.sol,8:23,a ** decimals,decimals ** a diff --git a/resources/regressions/test4.json/mutants/1/10Power/TenPower.sol b/resources/regressions/test4.json/mutants/1/10Power/TenPower.sol deleted file mode 100644 index 49908440..00000000 --- a/resources/regressions/test4.json/mutants/1/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 res = a+decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test4.json/mutants/2/10Power/TenPower.sol b/resources/regressions/test4.json/mutants/2/10Power/TenPower.sol deleted file mode 100644 index 23654dcc..00000000 --- a/resources/regressions/test4.json/mutants/2/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 res = a-decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test4.json/mutants/3/10Power/TenPower.sol b/resources/regressions/test4.json/mutants/3/10Power/TenPower.sol deleted file mode 100644 index 66d17601..00000000 --- a/resources/regressions/test4.json/mutants/3/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 res = a*decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test4.json/mutants/4/10Power/TenPower.sol b/resources/regressions/test4.json/mutants/4/10Power/TenPower.sol deleted file mode 100644 index 844dc323..00000000 --- a/resources/regressions/test4.json/mutants/4/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 res = a/decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test4.json/mutants/5/10Power/TenPower.sol b/resources/regressions/test4.json/mutants/5/10Power/TenPower.sol deleted file mode 100644 index 14614412..00000000 --- a/resources/regressions/test4.json/mutants/5/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 res = a%decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test4.json/mutants/6/10Power/TenPower.sol b/resources/regressions/test4.json/mutants/6/10Power/TenPower.sol deleted file mode 100644 index 674f128c..00000000 --- a/resources/regressions/test4.json/mutants/6/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;` - uint256 res = decimals ** a; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test5.json/gambit_results.json b/resources/regressions/test5.json/gambit_results.json deleted file mode 100644 index 5d0b6160..00000000 --- a/resources/regressions/test5.json/gambit_results.json +++ /dev/null @@ -1,72 +0,0 @@ -[ - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a+decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "1", - "name": "mutants/1/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a-decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "2", - "name": "mutants/2/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a*decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "3", - "name": "mutants/3/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a/decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "4", - "name": "mutants/4/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a%decimals;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "5", - "name": "mutants/5/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n contract TenPower {\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;`\n+ uint256 res = decimals ** a;\n return res;\n // return 10 ** decimals;\n }\n", - "id": "6", - "name": "mutants/6/10Power/TenPower.sol", - "original": "10Power/TenPower.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `-`) of: `return a + b;`\n+ return a-b;\n }\n }\n \n", - "id": "7", - "name": "mutants/7/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `*`) of: `return a + b;`\n+ return a*b;\n }\n }\n \n", - "id": "8", - "name": "mutants/8/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `/`) of: `return a + b;`\n+ return a/b;\n }\n }\n \n", - "id": "9", - "name": "mutants/9/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - }, - { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -8,7 +8,8 @@\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ /// BinaryOpMutation(`+` |==> `%`) of: `return a + b;`\n+ return a%b;\n }\n }\n \n", - "id": "10", - "name": "mutants/10/MultipleContracts/C.sol", - "original": "MultipleContracts/C.sol", - } -] \ No newline at end of file diff --git a/resources/regressions/test5.json/input_json/C.sol_json.ast b/resources/regressions/test5.json/input_json/C.sol_json.ast deleted file mode 100644 index a3306b6e..00000000 --- a/resources/regressions/test5.json/input_json/C.sol_json.ast +++ /dev/null @@ -1,1828 +0,0 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file diff --git a/resources/regressions/test5.json/input_json/C.sol_json.ast.json b/resources/regressions/test5.json/input_json/C.sol_json.ast.json deleted file mode 100644 index a3306b6e..00000000 --- a/resources/regressions/test5.json/input_json/C.sol_json.ast.json +++ /dev/null @@ -1,1828 +0,0 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file diff --git a/resources/regressions/test5.json/input_json/TenPower.sol_json.ast b/resources/regressions/test5.json/input_json/TenPower.sol_json.ast deleted file mode 100644 index b5bf1c32..00000000 --- a/resources/regressions/test5.json/input_json/TenPower.sol_json.ast +++ /dev/null @@ -1,334 +0,0 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file diff --git a/resources/regressions/test5.json/input_json/TenPower.sol_json.ast.json b/resources/regressions/test5.json/input_json/TenPower.sol_json.ast.json deleted file mode 100644 index b5bf1c32..00000000 --- a/resources/regressions/test5.json/input_json/TenPower.sol_json.ast.json +++ /dev/null @@ -1,334 +0,0 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file diff --git a/resources/regressions/test5.json/mutants.log b/resources/regressions/test5.json/mutants.log deleted file mode 100644 index dcaec369..00000000 --- a/resources/regressions/test5.json/mutants.log +++ /dev/null @@ -1,10 +0,0 @@ -1,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,+ -2,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,- -3,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,* -4,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,/ -5,BinaryOpMutation,10Power/TenPower.sol,8:24, ** ,% -6,SwapArgumentsOperatorMutation,10Power/TenPower.sol,8:23,a ** decimals,decimals ** a -7,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,- -8,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,* -9,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,/ -10,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,% diff --git a/resources/regressions/test5.json/mutants/1/10Power/TenPower.sol b/resources/regressions/test5.json/mutants/1/10Power/TenPower.sol deleted file mode 100644 index 49908440..00000000 --- a/resources/regressions/test5.json/mutants/1/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 res = a+decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test5.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test5.json/mutants/10/MultipleContracts/C.sol deleted file mode 100644 index 530045ec..00000000 --- a/resources/regressions/test5.json/mutants/10/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `%`) of: `return a + b;` - return a%b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test5.json/mutants/2/10Power/TenPower.sol b/resources/regressions/test5.json/mutants/2/10Power/TenPower.sol deleted file mode 100644 index 23654dcc..00000000 --- a/resources/regressions/test5.json/mutants/2/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 res = a-decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test5.json/mutants/3/10Power/TenPower.sol b/resources/regressions/test5.json/mutants/3/10Power/TenPower.sol deleted file mode 100644 index 66d17601..00000000 --- a/resources/regressions/test5.json/mutants/3/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 res = a*decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test5.json/mutants/4/10Power/TenPower.sol b/resources/regressions/test5.json/mutants/4/10Power/TenPower.sol deleted file mode 100644 index 844dc323..00000000 --- a/resources/regressions/test5.json/mutants/4/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 res = a/decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test5.json/mutants/5/10Power/TenPower.sol b/resources/regressions/test5.json/mutants/5/10Power/TenPower.sol deleted file mode 100644 index 14614412..00000000 --- a/resources/regressions/test5.json/mutants/5/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 res = a%decimals; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test5.json/mutants/6/10Power/TenPower.sol b/resources/regressions/test5.json/mutants/6/10Power/TenPower.sol deleted file mode 100644 index 674f128c..00000000 --- a/resources/regressions/test5.json/mutants/6/10Power/TenPower.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -contract TenPower { - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;` - uint256 res = decimals ** a; - return res; - // return 10 ** decimals; - } -} diff --git a/resources/regressions/test5.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test5.json/mutants/7/MultipleContracts/C.sol deleted file mode 100644 index a514961f..00000000 --- a/resources/regressions/test5.json/mutants/7/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `-`) of: `return a + b;` - return a-b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test5.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test5.json/mutants/8/MultipleContracts/C.sol deleted file mode 100644 index b85149e4..00000000 --- a/resources/regressions/test5.json/mutants/8/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `*`) of: `return a + b;` - return a*b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test5.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test5.json/mutants/9/MultipleContracts/C.sol deleted file mode 100644 index a5819d3a..00000000 --- a/resources/regressions/test5.json/mutants/9/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `/`) of: `return a + b;` - return a/b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} From 223cd37ba256722f572d672e383ce8242b08bd9e Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 26 Jul 2023 12:02:19 -0700 Subject: [PATCH 050/200] Updated regressions --- .../all_ops.json/gambit_results.json | 534 ++++++++++++++++++ .../regressions/all_ops.json/mutants.log | 76 +++ .../all_ops.json/mutants/1/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/10/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/11/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/12/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/13/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/14/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/15/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/16/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/17/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/18/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/19/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/2/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/20/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/21/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/22/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/23/BOR/BOR.sol | 25 + .../all_ops.json/mutants/24/BOR/BOR.sol | 25 + .../all_ops.json/mutants/25/BOR/BOR.sol | 25 + .../all_ops.json/mutants/26/EDC/EDC.sol | 22 + .../all_ops.json/mutants/27/LOR/LOR.sol | 22 + .../all_ops.json/mutants/28/LOR/LOR.sol | 22 + .../all_ops.json/mutants/29/LOR/LOR.sol | 22 + .../all_ops.json/mutants/3/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/30/LOR/LOR.sol | 22 + .../all_ops.json/mutants/31/LOR/LOR.sol | 22 + .../all_ops.json/mutants/32/LOR/LOR.sol | 22 + .../all_ops.json/mutants/33/LOR/LOR.sol | 22 + .../all_ops.json/mutants/34/LOR/LOR.sol | 22 + .../all_ops.json/mutants/35/LOR/LOR.sol | 22 + .../all_ops.json/mutants/36/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/37/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/38/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/39/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/4/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/40/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/41/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/42/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/43/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/44/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/45/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/46/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/47/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/48/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/49/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/5/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/50/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/51/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/52/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/53/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/54/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/55/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/56/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/57/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/58/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/59/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/6/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/60/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/61/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/62/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/63/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/64/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/65/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/66/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/67/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/68/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/69/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/7/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/70/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/71/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/72/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/73/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/74/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/75/UOR/UOR.sol | 22 + .../all_ops.json/mutants/76/UOR/UOR.sol | 22 + .../all_ops.json/mutants/8/AOR/AOR.sol | 61 ++ .../all_ops.json/mutants/9/AOR/AOR.sol | 61 ++ .../regressions/aor.json/gambit_results.json | 156 +++++ resources/regressions/aor.json/mutants.log | 22 + .../aor.json/mutants/1/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/10/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/11/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/12/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/13/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/14/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/15/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/16/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/17/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/18/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/19/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/2/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/20/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/21/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/22/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/3/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/4/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/5/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/6/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/7/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/8/Ops/AOR/AOR.sol | 61 ++ .../aor.json/mutants/9/Ops/AOR/AOR.sol | 61 ++ .../regressions/bor.json/gambit_results.json | 23 + resources/regressions/bor.json/mutants.log | 3 + .../bor.json/mutants/1/Ops/BOR/BOR.sol | 25 + .../bor.json/mutants/2/Ops/BOR/BOR.sol | 25 + .../bor.json/mutants/3/Ops/BOR/BOR.sol | 25 + .../regressions/edc.json/gambit_results.json | 9 + resources/regressions/edc.json/mutants.log | 1 + .../edc.json/mutants/1/Ops/EDC/EDC.sol | 22 + .../regressions/lor.json/gambit_results.json | 65 +++ resources/regressions/lor.json/mutants.log | 9 + .../lor.json/mutants/1/Ops/LOR/LOR.sol | 22 + .../lor.json/mutants/2/Ops/LOR/LOR.sol | 22 + .../lor.json/mutants/3/Ops/LOR/LOR.sol | 22 + .../lor.json/mutants/4/Ops/LOR/LOR.sol | 22 + .../lor.json/mutants/5/Ops/LOR/LOR.sol | 22 + .../lor.json/mutants/6/Ops/LOR/LOR.sol | 22 + .../lor.json/mutants/7/Ops/LOR/LOR.sol | 22 + .../lor.json/mutants/8/Ops/LOR/LOR.sol | 22 + .../lor.json/mutants/9/Ops/LOR/LOR.sol | 22 + .../regressions/lvr.json/gambit_results.json | 79 +++ resources/regressions/lvr.json/mutants.log | 11 + .../lvr.json/mutants/1/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/10/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/11/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/2/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/3/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/4/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/5/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/6/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/7/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/8/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/9/Ops/LVR/LVR.sol | 43 ++ .../regressions/ror.json/gambit_results.json | 198 +++++++ resources/regressions/ror.json/mutants.log | 28 + .../ror.json/mutants/1/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/10/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/11/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/12/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/13/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/14/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/15/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/16/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/17/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/18/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/19/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/2/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/20/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/21/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/22/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/23/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/24/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/25/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/26/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/27/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/28/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/3/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/4/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/5/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/6/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/7/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/8/Ops/ROR/ROR.sol | 65 +++ .../ror.json/mutants/9/Ops/ROR/ROR.sol | 65 +++ .../gambit_results.json | 352 ++++++++++++ .../mutants.log | 50 ++ .../mutants/1/MultipleContracts/C.sol | 41 ++ .../mutants/10/MultipleContracts/C.sol | 41 ++ .../mutants/11/MultipleContracts/C.sol | 41 ++ .../mutants/12/MultipleContracts/C.sol | 41 ++ .../mutants/13/MultipleContracts/C.sol | 41 ++ .../mutants/14/MultipleContracts/C.sol | 41 ++ .../mutants/15/MultipleContracts/C.sol | 41 ++ .../mutants/16/MultipleContracts/C.sol | 41 ++ .../mutants/17/MultipleContracts/C.sol | 41 ++ .../mutants/18/MultipleContracts/C.sol | 41 ++ .../mutants/19/MultipleContracts/C.sol | 41 ++ .../mutants/2/MultipleContracts/C.sol | 41 ++ .../mutants/20/MultipleContracts/C.sol | 41 ++ .../mutants/21/MultipleContracts/C.sol | 41 ++ .../mutants/22/MultipleContracts/C.sol | 41 ++ .../mutants/23/MultipleContracts/C.sol | 41 ++ .../mutants/24/MultipleContracts/C.sol | 41 ++ .../mutants/25/MultipleContracts/C.sol | 41 ++ .../mutants/26/MultipleContracts/C.sol | 41 ++ .../mutants/27/MultipleContracts/C.sol | 41 ++ .../mutants/28/MultipleContracts/C.sol | 41 ++ .../mutants/29/MultipleContracts/C.sol | 41 ++ .../mutants/3/MultipleContracts/C.sol | 41 ++ .../mutants/30/MultipleContracts/C.sol | 41 ++ .../mutants/31/MultipleContracts/C.sol | 41 ++ .../mutants/32/MultipleContracts/C.sol | 41 ++ .../mutants/33/MultipleContracts/C.sol | 41 ++ .../mutants/34/MultipleContracts/C.sol | 41 ++ .../mutants/35/MultipleContracts/C.sol | 41 ++ .../mutants/36/MultipleContracts/C.sol | 41 ++ .../mutants/37/MultipleContracts/C.sol | 41 ++ .../mutants/38/MultipleContracts/C.sol | 41 ++ .../mutants/39/MultipleContracts/C.sol | 41 ++ .../mutants/4/MultipleContracts/C.sol | 41 ++ .../mutants/40/MultipleContracts/C.sol | 41 ++ .../mutants/41/MultipleContracts/C.sol | 41 ++ .../mutants/42/MultipleContracts/C.sol | 41 ++ .../mutants/43/MultipleContracts/C.sol | 41 ++ .../mutants/44/MultipleContracts/C.sol | 41 ++ .../mutants/45/MultipleContracts/C.sol | 41 ++ .../mutants/46/MultipleContracts/C.sol | 41 ++ .../mutants/47/MultipleContracts/C.sol | 41 ++ .../mutants/48/MultipleContracts/C.sol | 41 ++ .../mutants/49/MultipleContracts/C.sol | 41 ++ .../mutants/5/MultipleContracts/C.sol | 41 ++ .../mutants/50/MultipleContracts/C.sol | 41 ++ .../mutants/6/MultipleContracts/C.sol | 41 ++ .../mutants/7/MultipleContracts/C.sol | 41 ++ .../mutants/8/MultipleContracts/C.sol | 41 ++ .../mutants/9/MultipleContracts/C.sol | 41 ++ .../gambit_results.json | 352 ++++++++++++ .../mutants.log | 50 ++ .../mutants/1/MultipleContracts/C.sol | 41 ++ .../mutants/10/MultipleContracts/C.sol | 41 ++ .../mutants/11/MultipleContracts/C.sol | 41 ++ .../mutants/12/MultipleContracts/C.sol | 41 ++ .../mutants/13/MultipleContracts/C.sol | 41 ++ .../mutants/14/MultipleContracts/C.sol | 41 ++ .../mutants/15/MultipleContracts/C.sol | 41 ++ .../mutants/16/MultipleContracts/C.sol | 41 ++ .../mutants/17/MultipleContracts/C.sol | 41 ++ .../mutants/18/MultipleContracts/C.sol | 41 ++ .../mutants/19/MultipleContracts/C.sol | 41 ++ .../mutants/2/MultipleContracts/C.sol | 41 ++ .../mutants/20/MultipleContracts/C.sol | 41 ++ .../mutants/21/MultipleContracts/C.sol | 41 ++ .../mutants/22/MultipleContracts/C.sol | 41 ++ .../mutants/23/MultipleContracts/C.sol | 41 ++ .../mutants/24/MultipleContracts/C.sol | 41 ++ .../mutants/25/MultipleContracts/C.sol | 41 ++ .../mutants/26/MultipleContracts/C.sol | 41 ++ .../mutants/27/MultipleContracts/C.sol | 41 ++ .../mutants/28/MultipleContracts/C.sol | 41 ++ .../mutants/29/MultipleContracts/C.sol | 41 ++ .../mutants/3/MultipleContracts/C.sol | 41 ++ .../mutants/30/MultipleContracts/C.sol | 41 ++ .../mutants/31/MultipleContracts/C.sol | 41 ++ .../mutants/32/MultipleContracts/C.sol | 41 ++ .../mutants/33/MultipleContracts/C.sol | 41 ++ .../mutants/34/MultipleContracts/C.sol | 41 ++ .../mutants/35/MultipleContracts/C.sol | 41 ++ .../mutants/36/MultipleContracts/C.sol | 41 ++ .../mutants/37/MultipleContracts/C.sol | 41 ++ .../mutants/38/MultipleContracts/C.sol | 41 ++ .../mutants/39/MultipleContracts/C.sol | 41 ++ .../mutants/4/MultipleContracts/C.sol | 41 ++ .../mutants/40/MultipleContracts/C.sol | 41 ++ .../mutants/41/MultipleContracts/C.sol | 41 ++ .../mutants/42/MultipleContracts/C.sol | 41 ++ .../mutants/43/MultipleContracts/C.sol | 41 ++ .../mutants/44/MultipleContracts/C.sol | 41 ++ .../mutants/45/MultipleContracts/C.sol | 41 ++ .../mutants/46/MultipleContracts/C.sol | 41 ++ .../mutants/47/MultipleContracts/C.sol | 41 ++ .../mutants/48/MultipleContracts/C.sol | 41 ++ .../mutants/49/MultipleContracts/C.sol | 41 ++ .../mutants/5/MultipleContracts/C.sol | 41 ++ .../mutants/50/MultipleContracts/C.sol | 41 ++ .../mutants/6/MultipleContracts/C.sol | 41 ++ .../mutants/7/MultipleContracts/C.sol | 41 ++ .../mutants/8/MultipleContracts/C.sol | 41 ++ .../mutants/9/MultipleContracts/C.sol | 41 ++ .../gambit_results.json | 352 ++++++++++++ .../mutants.log | 50 ++ .../mutants/1/MultipleContracts/C.sol | 41 ++ .../mutants/10/MultipleContracts/C.sol | 41 ++ .../mutants/11/MultipleContracts/C.sol | 41 ++ .../mutants/12/MultipleContracts/C.sol | 41 ++ .../mutants/13/MultipleContracts/C.sol | 41 ++ .../mutants/14/MultipleContracts/C.sol | 41 ++ .../mutants/15/MultipleContracts/C.sol | 41 ++ .../mutants/16/MultipleContracts/C.sol | 41 ++ .../mutants/17/MultipleContracts/C.sol | 41 ++ .../mutants/18/MultipleContracts/C.sol | 41 ++ .../mutants/19/MultipleContracts/C.sol | 41 ++ .../mutants/2/MultipleContracts/C.sol | 41 ++ .../mutants/20/MultipleContracts/C.sol | 41 ++ .../mutants/21/MultipleContracts/C.sol | 41 ++ .../mutants/22/MultipleContracts/C.sol | 41 ++ .../mutants/23/MultipleContracts/C.sol | 41 ++ .../mutants/24/MultipleContracts/C.sol | 41 ++ .../mutants/25/MultipleContracts/C.sol | 41 ++ .../mutants/26/MultipleContracts/C.sol | 41 ++ .../mutants/27/MultipleContracts/C.sol | 41 ++ .../mutants/28/MultipleContracts/C.sol | 41 ++ .../mutants/29/MultipleContracts/C.sol | 41 ++ .../mutants/3/MultipleContracts/C.sol | 41 ++ .../mutants/30/MultipleContracts/C.sol | 41 ++ .../mutants/31/MultipleContracts/C.sol | 41 ++ .../mutants/32/MultipleContracts/C.sol | 41 ++ .../mutants/33/MultipleContracts/C.sol | 41 ++ .../mutants/34/MultipleContracts/C.sol | 41 ++ .../mutants/35/MultipleContracts/C.sol | 41 ++ .../mutants/36/MultipleContracts/C.sol | 41 ++ .../mutants/37/MultipleContracts/C.sol | 41 ++ .../mutants/38/MultipleContracts/C.sol | 41 ++ .../mutants/39/MultipleContracts/C.sol | 41 ++ .../mutants/4/MultipleContracts/C.sol | 41 ++ .../mutants/40/MultipleContracts/C.sol | 41 ++ .../mutants/41/MultipleContracts/C.sol | 41 ++ .../mutants/42/MultipleContracts/C.sol | 41 ++ .../mutants/43/MultipleContracts/C.sol | 41 ++ .../mutants/44/MultipleContracts/C.sol | 41 ++ .../mutants/45/MultipleContracts/C.sol | 41 ++ .../mutants/46/MultipleContracts/C.sol | 41 ++ .../mutants/47/MultipleContracts/C.sol | 41 ++ .../mutants/48/MultipleContracts/C.sol | 41 ++ .../mutants/49/MultipleContracts/C.sol | 41 ++ .../mutants/5/MultipleContracts/C.sol | 41 ++ .../mutants/50/MultipleContracts/C.sol | 41 ++ .../mutants/6/MultipleContracts/C.sol | 41 ++ .../mutants/7/MultipleContracts/C.sol | 41 ++ .../mutants/8/MultipleContracts/C.sol | 41 ++ .../mutants/9/MultipleContracts/C.sol | 41 ++ .../gambit_results.json | 184 ++++++ .../mutants.log | 26 + .../mutants/1/MultipleContracts/C.sol | 41 ++ .../mutants/10/MultipleContracts/C.sol | 41 ++ .../mutants/11/MultipleContracts/C.sol | 41 ++ .../mutants/12/MultipleContracts/C.sol | 41 ++ .../mutants/13/MultipleContracts/C.sol | 41 ++ .../mutants/14/MultipleContracts/C.sol | 41 ++ .../mutants/15/MultipleContracts/C.sol | 41 ++ .../mutants/16/MultipleContracts/C.sol | 41 ++ .../mutants/17/MultipleContracts/C.sol | 41 ++ .../mutants/18/MultipleContracts/C.sol | 41 ++ .../mutants/19/MultipleContracts/C.sol | 41 ++ .../mutants/2/MultipleContracts/C.sol | 41 ++ .../mutants/20/MultipleContracts/C.sol | 41 ++ .../mutants/21/MultipleContracts/C.sol | 41 ++ .../mutants/22/MultipleContracts/C.sol | 41 ++ .../mutants/23/MultipleContracts/C.sol | 41 ++ .../mutants/24/MultipleContracts/C.sol | 41 ++ .../mutants/25/MultipleContracts/C.sol | 41 ++ .../mutants/26/MultipleContracts/C.sol | 41 ++ .../mutants/3/MultipleContracts/C.sol | 41 ++ .../mutants/4/MultipleContracts/C.sol | 41 ++ .../mutants/5/MultipleContracts/C.sol | 41 ++ .../mutants/6/MultipleContracts/C.sol | 41 ++ .../mutants/7/MultipleContracts/C.sol | 41 ++ .../mutants/8/MultipleContracts/C.sol | 41 ++ .../mutants/9/MultipleContracts/C.sol | 41 ++ .../gambit_results.json | 366 ++++++++++++ .../test_multiple_files_1.json/mutants.log | 52 ++ .../mutants/1/Ops/AOR/AOR.sol | 61 ++ .../mutants/10/Ops/AOR/AOR.sol | 61 ++ .../mutants/11/Ops/AOR/AOR.sol | 61 ++ .../mutants/12/Ops/AOR/AOR.sol | 61 ++ .../mutants/13/Ops/AOR/AOR.sol | 61 ++ .../mutants/14/Ops/AOR/AOR.sol | 61 ++ .../mutants/15/Ops/AOR/AOR.sol | 61 ++ .../mutants/16/Ops/AOR/AOR.sol | 61 ++ .../mutants/17/Ops/AOR/AOR.sol | 61 ++ .../mutants/18/Ops/AOR/AOR.sol | 61 ++ .../mutants/19/Ops/AOR/AOR.sol | 61 ++ .../mutants/2/Ops/AOR/AOR.sol | 61 ++ .../mutants/20/Ops/AOR/AOR.sol | 61 ++ .../mutants/21/Ops/AOR/AOR.sol | 61 ++ .../mutants/22/Ops/AOR/AOR.sol | 61 ++ .../mutants/23/Ops/AOR/AOR.sol | 61 ++ .../mutants/24/Ops/AOR/AOR.sol | 61 ++ .../mutants/25/Ops/AOR/AOR.sol | 61 ++ .../mutants/26/Ops/AOR/AOR.sol | 61 ++ .../mutants/27/Ops/AOR/AOR.sol | 61 ++ .../mutants/28/MultipleContracts/C.sol | 41 ++ .../mutants/29/MultipleContracts/C.sol | 41 ++ .../mutants/3/Ops/AOR/AOR.sol | 61 ++ .../mutants/30/MultipleContracts/C.sol | 41 ++ .../mutants/31/MultipleContracts/C.sol | 41 ++ .../mutants/32/MultipleContracts/C.sol | 41 ++ .../mutants/33/MultipleContracts/C.sol | 41 ++ .../mutants/34/MultipleContracts/C.sol | 41 ++ .../mutants/35/MultipleContracts/C.sol | 41 ++ .../mutants/36/MultipleContracts/C.sol | 41 ++ .../mutants/37/MultipleContracts/C.sol | 41 ++ .../mutants/38/MultipleContracts/C.sol | 41 ++ .../mutants/39/MultipleContracts/C.sol | 41 ++ .../mutants/4/Ops/AOR/AOR.sol | 61 ++ .../mutants/40/MultipleContracts/C.sol | 41 ++ .../mutants/41/MultipleContracts/C.sol | 41 ++ .../mutants/42/MultipleContracts/C.sol | 41 ++ .../mutants/43/MultipleContracts/C.sol | 41 ++ .../mutants/44/MultipleContracts/C.sol | 41 ++ .../mutants/45/MultipleContracts/C.sol | 41 ++ .../mutants/46/MultipleContracts/C.sol | 41 ++ .../mutants/47/MultipleContracts/C.sol | 41 ++ .../mutants/48/MultipleContracts/C.sol | 41 ++ .../mutants/49/MultipleContracts/C.sol | 41 ++ .../mutants/5/Ops/AOR/AOR.sol | 61 ++ .../mutants/50/MultipleContracts/C.sol | 41 ++ .../mutants/51/MultipleContracts/C.sol | 41 ++ .../mutants/52/MultipleContracts/C.sol | 41 ++ .../mutants/6/Ops/AOR/AOR.sol | 61 ++ .../mutants/7/Ops/AOR/AOR.sol | 61 ++ .../mutants/8/Ops/AOR/AOR.sol | 61 ++ .../mutants/9/Ops/AOR/AOR.sol | 61 ++ .../regressions/uor.json/gambit_results.json | 16 + resources/regressions/uor.json/mutants.log | 2 + .../uor.json/mutants/1/Ops/UOR/UOR.sol | 22 + .../uor.json/mutants/2/Ops/UOR/UOR.sol | 22 + 406 files changed, 20902 insertions(+) create mode 100644 resources/regressions/all_ops.json/gambit_results.json create mode 100644 resources/regressions/all_ops.json/mutants.log create mode 100644 resources/regressions/all_ops.json/mutants/1/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/10/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/11/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/12/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/13/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/14/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/15/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/16/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/17/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/18/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/19/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/2/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/20/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/21/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/22/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/23/BOR/BOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/24/BOR/BOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/25/BOR/BOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol create mode 100644 resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/3/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/4/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/5/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/6/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/7/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/8/AOR/AOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/9/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/gambit_results.json create mode 100644 resources/regressions/aor.json/mutants.log create mode 100644 resources/regressions/aor.json/mutants/1/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/10/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/11/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/12/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/13/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/14/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/15/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/16/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/17/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/18/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/19/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/2/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/20/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/21/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/22/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/3/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/4/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/5/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/6/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/7/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/8/Ops/AOR/AOR.sol create mode 100644 resources/regressions/aor.json/mutants/9/Ops/AOR/AOR.sol create mode 100644 resources/regressions/bor.json/gambit_results.json create mode 100644 resources/regressions/bor.json/mutants.log create mode 100644 resources/regressions/bor.json/mutants/1/Ops/BOR/BOR.sol create mode 100644 resources/regressions/bor.json/mutants/2/Ops/BOR/BOR.sol create mode 100644 resources/regressions/bor.json/mutants/3/Ops/BOR/BOR.sol create mode 100644 resources/regressions/edc.json/gambit_results.json create mode 100644 resources/regressions/edc.json/mutants.log create mode 100644 resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol create mode 100644 resources/regressions/lor.json/gambit_results.json create mode 100644 resources/regressions/lor.json/mutants.log create mode 100644 resources/regressions/lor.json/mutants/1/Ops/LOR/LOR.sol create mode 100644 resources/regressions/lor.json/mutants/2/Ops/LOR/LOR.sol create mode 100644 resources/regressions/lor.json/mutants/3/Ops/LOR/LOR.sol create mode 100644 resources/regressions/lor.json/mutants/4/Ops/LOR/LOR.sol create mode 100644 resources/regressions/lor.json/mutants/5/Ops/LOR/LOR.sol create mode 100644 resources/regressions/lor.json/mutants/6/Ops/LOR/LOR.sol create mode 100644 resources/regressions/lor.json/mutants/7/Ops/LOR/LOR.sol create mode 100644 resources/regressions/lor.json/mutants/8/Ops/LOR/LOR.sol create mode 100644 resources/regressions/lor.json/mutants/9/Ops/LOR/LOR.sol create mode 100644 resources/regressions/lvr.json/gambit_results.json create mode 100644 resources/regressions/lvr.json/mutants.log create mode 100644 resources/regressions/lvr.json/mutants/1/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol create mode 100644 resources/regressions/ror.json/gambit_results.json create mode 100644 resources/regressions/ror.json/mutants.log create mode 100644 resources/regressions/ror.json/mutants/1/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/10/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/11/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/12/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/13/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/14/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/15/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/16/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/17/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/18/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/19/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/2/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/20/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/21/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/22/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/23/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/24/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/25/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/26/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/27/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/28/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/3/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/4/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/5/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/6/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/7/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/8/Ops/ROR/ROR.sol create mode 100644 resources/regressions/ror.json/mutants/9/Ops/ROR/ROR.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/gambit_results.json create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants.log create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/gambit_results.json create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants.log create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/gambit_results.json create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants.log create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/gambit_results.json create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants.log create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/gambit_results.json create mode 100644 resources/regressions/test_multiple_files_1.json/mutants.log create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/1/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/10/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/11/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/12/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/13/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/14/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/15/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/16/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/17/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/18/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/19/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/2/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/20/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/21/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/22/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/23/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/24/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/25/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/26/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/27/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/3/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/4/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/5/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/6/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/7/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/8/Ops/AOR/AOR.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/9/Ops/AOR/AOR.sol create mode 100644 resources/regressions/uor.json/gambit_results.json create mode 100644 resources/regressions/uor.json/mutants.log create mode 100644 resources/regressions/uor.json/mutants/1/Ops/UOR/UOR.sol create mode 100644 resources/regressions/uor.json/mutants/2/Ops/UOR/UOR.sol diff --git a/resources/regressions/all_ops.json/gambit_results.json b/resources/regressions/all_ops.json/gambit_results.json new file mode 100644 index 00000000..d2da62fd --- /dev/null +++ b/resources/regressions/all_ops.json/gambit_results.json @@ -0,0 +1,534 @@ +[ + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", + "id": "1", + "name": "mutants/1/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "id": "2", + "name": "mutants/2/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "id": "3", + "name": "mutants/3/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "id": "4", + "name": "mutants/4/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", + "id": "5", + "name": "mutants/5/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "id": "6", + "name": "mutants/6/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "id": "7", + "name": "mutants/7/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "id": "8", + "name": "mutants/8/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "id": "9", + "name": "mutants/9/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "id": "10", + "name": "mutants/10/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "id": "11", + "name": "mutants/11/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "id": "12", + "name": "mutants/12/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "id": "13", + "name": "mutants/13/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "id": "14", + "name": "mutants/14/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "id": "15", + "name": "mutants/15/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", + "id": "16", + "name": "mutants/16/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "id": "17", + "name": "mutants/17/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", + "id": "18", + "name": "mutants/18/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", + "id": "19", + "name": "mutants/19/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", + "id": "20", + "name": "mutants/20/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", + "id": "21", + "name": "mutants/21/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", + "id": "22", + "name": "mutants/22/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ConditionalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `function bw_or(int256 a, int256 b) public pure returns (int256) {`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", + "id": "23", + "name": "mutants/23/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + }, + { + "description": "ConditionalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `function bw_and(int256 a, int256 b) public pure returns (int256) {`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", + "id": "24", + "name": "mutants/24/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + }, + { + "description": "ConditionalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `function bw_xor(int256 a, int256 b) public pure returns (int256) {`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", + "id": "25", + "name": "mutants/25/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + }, + { + "description": "ElimDelegateCall", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `function setVars(address _contract) public payable {`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", + "id": "26", + "name": "mutants/26/EDC/EDC.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", + "id": "27", + "name": "mutants/27/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", + "id": "28", + "name": "mutants/28/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", + "id": "29", + "name": "mutants/29/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "id": "30", + "name": "mutants/30/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "id": "31", + "name": "mutants/31/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "id": "32", + "name": "mutants/32/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", + "id": "33", + "name": "mutants/33/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", + "id": "34", + "name": "mutants/34/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", + "id": "35", + "name": "mutants/35/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `function unsigned_zero() public pure returns (uint256) {`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", + "id": "36", + "name": "mutants/36/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function unsigned_one() public pure returns (uint256) {`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", + "id": "37", + "name": "mutants/37/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function unsigned_one() public pure returns (uint256) {`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", + "id": "38", + "name": "mutants/38/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "id": "39", + "name": "mutants/39/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", + "id": "40", + "name": "mutants/40/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "id": "41", + "name": "mutants/41/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", + "id": "42", + "name": "mutants/42/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", + "id": "43", + "name": "mutants/43/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", + "id": "44", + "name": "mutants/44/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `function signed_zero() public pure returns (int256) {`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", + "id": "45", + "name": "mutants/45/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `function signed_zero() public pure returns (int256) {`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", + "id": "46", + "name": "mutants/46/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "id": "47", + "name": "mutants/47/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "id": "48", + "name": "mutants/48/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "id": "49", + "name": "mutants/49/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "id": "50", + "name": "mutants/50/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "id": "51", + "name": "mutants/51/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "id": "52", + "name": "mutants/52/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "id": "53", + "name": "mutants/53/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "id": "54", + "name": "mutants/54/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "id": "55", + "name": "mutants/55/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "id": "56", + "name": "mutants/56/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "id": "57", + "name": "mutants/57/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "id": "58", + "name": "mutants/58/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "59", + "name": "mutants/59/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "60", + "name": "mutants/60/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "61", + "name": "mutants/61/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "id": "62", + "name": "mutants/62/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "id": "63", + "name": "mutants/63/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "64", + "name": "mutants/64/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "65", + "name": "mutants/65/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "66", + "name": "mutants/66/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "id": "67", + "name": "mutants/67/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "id": "68", + "name": "mutants/68/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "id": "69", + "name": "mutants/69/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "id": "70", + "name": "mutants/70/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "id": "71", + "name": "mutants/71/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", + "id": "72", + "name": "mutants/72/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", + "id": "73", + "name": "mutants/73/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", + "id": "74", + "name": "mutants/74/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "UnaryOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `function signed_bw_not(int256 x) public pure returns (int256) {`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", + "id": "75", + "name": "mutants/75/UOR/UOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + }, + { + "description": "UnaryOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `function signed_neg(int256 x) public pure returns (int256) {`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", + "id": "76", + "name": "mutants/76/UOR/UOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/all_ops.json/mutants.log b/resources/regressions/all_ops.json/mutants.log new file mode 100644 index 00000000..c0eb94f0 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants.log @@ -0,0 +1,76 @@ +1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,- +2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,* +3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,/ +4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,% +5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,+ +6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,* +7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,/ +8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,% +9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,+ +10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,- +11,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,/ +12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,% +13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,+ +14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,- +15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,/ +16,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,** +17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,% +18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,+ +19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,- +20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,* +21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,/ +22,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,% +23,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,9:9,|,& +24,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,15:9,&,| +25,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,21:9,^,& +26,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,15:29,delegatecall,call +27,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,a +28,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,b +29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,false +30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,a +31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,b +32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,true +33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),x < y +34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),a != (x >= y) +35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),true +36,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,14:15,0,1 +37,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,0 +38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 +39,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 +40,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 +41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 +42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 +43,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 +44,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 +45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,-1 +46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,1 +47,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,<= +48,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,!= +49,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:7,x < y,false +50,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,< +51,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,== +52,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:7,x <= y,true +53,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,>= +54,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,!= +55,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:7,x > y,false +56,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,> +57,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,== +58,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:7,x >= y,true +59,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,<= +60,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,>= +61,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:7,x == y,false +62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,true +63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false +64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< +65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> +66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true +67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true +68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,false +69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> +70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== +71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true +72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< +73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> +74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true +75,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,13:7,~, - +76,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,18:7,~, ~ diff --git a/resources/regressions/all_ops.json/mutants/1/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/1/AOR/AOR.sol new file mode 100644 index 00000000..0bf48eb3 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/1/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/10/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/10/AOR/AOR.sol new file mode 100644 index 00000000..2af6a527 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/10/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) - b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/11/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/11/AOR/AOR.sol new file mode 100644 index 00000000..7023f526 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/11/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) / b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/12/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/12/AOR/AOR.sol new file mode 100644 index 00000000..7f3fb060 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/12/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) % b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/13/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/13/AOR/AOR.sol new file mode 100644 index 00000000..c5bae4da --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/13/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) + b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/14/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/14/AOR/AOR.sol new file mode 100644 index 00000000..c694d72e --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/14/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) - b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/15/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/15/AOR/AOR.sol new file mode 100644 index 00000000..19b65f09 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/15/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) / b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/16/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/16/AOR/AOR.sol new file mode 100644 index 00000000..4b20e4c5 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/16/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) ** b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/17/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/17/AOR/AOR.sol new file mode 100644 index 00000000..44cb1b9b --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/17/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) % b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/18/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/18/AOR/AOR.sol new file mode 100644 index 00000000..0ab879c1 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/18/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/19/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/19/AOR/AOR.sol new file mode 100644 index 00000000..81aa5028 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/19/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a - b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/2/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/2/AOR/AOR.sol new file mode 100644 index 00000000..6e93b2bb --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/2/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a * b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/20/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/20/AOR/AOR.sol new file mode 100644 index 00000000..b5cb7df8 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/20/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a * b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/21/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/21/AOR/AOR.sol new file mode 100644 index 00000000..ab78d9a3 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/21/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a / b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/22/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/22/AOR/AOR.sol new file mode 100644 index 00000000..b07036aa --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/22/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a % b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/23/BOR/BOR.sol b/resources/regressions/all_ops.json/mutants/23/BOR/BOR.sol new file mode 100644 index 00000000..ecbde264 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/23/BOR/BOR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Bitwise Operator Replacement (BOR) +contract BOR { + // Expect 1 mutants: + // a & b; + /// ConditionalOperatorReplacement(`|` |==> `&`) of: `function bw_or(int256 a, int256 b) public pure returns (int256) {` + function bw_or(int256 a, int256 b) public pure returns (int256) { + return a & b; + } + + // Expect 1 mutants: + // a | b; + function bw_and(int256 a, int256 b) public pure returns (int256) { + return a & b; + } + + // Expect 1 mutants: + // a | b; + function bw_xor(int256 a, int256 b) public pure returns (int256) { + return a ^ b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/24/BOR/BOR.sol b/resources/regressions/all_ops.json/mutants/24/BOR/BOR.sol new file mode 100644 index 00000000..0b930c8b --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/24/BOR/BOR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Bitwise Operator Replacement (BOR) +contract BOR { + // Expect 1 mutants: + // a & b; + function bw_or(int256 a, int256 b) public pure returns (int256) { + return a | b; + } + + // Expect 1 mutants: + // a | b; + /// ConditionalOperatorReplacement(`&` |==> `|`) of: `function bw_and(int256 a, int256 b) public pure returns (int256) {` + function bw_and(int256 a, int256 b) public pure returns (int256) { + return a | b; + } + + // Expect 1 mutants: + // a | b; + function bw_xor(int256 a, int256 b) public pure returns (int256) { + return a ^ b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/25/BOR/BOR.sol b/resources/regressions/all_ops.json/mutants/25/BOR/BOR.sol new file mode 100644 index 00000000..38c31bb9 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/25/BOR/BOR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Bitwise Operator Replacement (BOR) +contract BOR { + // Expect 1 mutants: + // a & b; + function bw_or(int256 a, int256 b) public pure returns (int256) { + return a | b; + } + + // Expect 1 mutants: + // a | b; + function bw_and(int256 a, int256 b) public pure returns (int256) { + return a & b; + } + + // Expect 1 mutants: + // a | b; + /// ConditionalOperatorReplacement(`^` |==> `&`) of: `function bw_xor(int256 a, int256 b) public pure returns (int256) {` + function bw_xor(int256 a, int256 b) public pure returns (int256) { + return a & b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol b/resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol new file mode 100644 index 00000000..116f6d30 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.13; + +contract Helper { + function setVars(uint _num) public payable {} +} + +contract EDC { + uint public num; + address public sender; + uint public value; + bool public delegateSuccessful; + bytes public myData; + + /// ElimDelegateCall(`delegatecall` |==> `call`) of: `function setVars(address _contract) public payable {` + function setVars(address _contract) public payable { + (bool success, ) = _contract.call( + abi.encodeWithSignature("setVars(uint256)", 1) + ); + require(success, "Delegatecall failed"); + } +} diff --git a/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol new file mode 100644 index 00000000..c53deb85 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `function and(bool a, bool b) public pure returns (bool) {` + function and(bool a, bool b) public pure returns (bool) { + return a; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol new file mode 100644 index 00000000..aca2816e --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `function and(bool a, bool b) public pure returns (bool) {` + function and(bool a, bool b) public pure returns (bool) { + return b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol new file mode 100644 index 00000000..22f2231c --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `function and(bool a, bool b) public pure returns (bool) {` + function and(bool a, bool b) public pure returns (bool) { + return false; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/all_ops.json/mutants/3/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/3/AOR/AOR.sol new file mode 100644 index 00000000..f5716560 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/3/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a / b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol new file mode 100644 index 00000000..fe893a77 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `function or(bool a, bool b) public pure returns (bool) {` + function or(bool a, bool b) public pure returns (bool) { + return a; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol new file mode 100644 index 00000000..5f462cfb --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `function or(bool a, bool b) public pure returns (bool) {` + function or(bool a, bool b) public pure returns (bool) { + return b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol new file mode 100644 index 00000000..908f3789 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `function or(bool a, bool b) public pure returns (bool) {` + function or(bool a, bool b) public pure returns (bool) { + return true; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol new file mode 100644 index 00000000..abd8b54a --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + function more_or(bool a, int x, int y) public pure returns (bool) { + return x < y; + } +} diff --git a/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol new file mode 100644 index 00000000..c8114f8a --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + function more_or(bool a, int x, int y) public pure returns (bool) { + return a != (x >= y); + } +} diff --git a/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol new file mode 100644 index 00000000..7345fcb8 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + function more_or(bool a, int x, int y) public pure returns (bool) { + return true; + } +} diff --git a/resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol new file mode 100644 index 00000000..98b6efde --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `function unsigned_zero() public pure returns (uint256) {` + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 1; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol new file mode 100644 index 00000000..c2a1c544 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `0`) of: `function unsigned_one() public pure returns (uint256) {` + function unsigned_one() public pure returns (uint256) { + uint256 one = 0; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol new file mode 100644 index 00000000..5ab66ba2 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `2`) of: `function unsigned_one() public pure returns (uint256) {` + function unsigned_one() public pure returns (uint256) { + uint256 one = 2; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol new file mode 100644 index 00000000..36f8cc18 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {` + function signed_neg_one() public pure returns (int256) { + int256 neg_one = 0; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/4/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/4/AOR/AOR.sol new file mode 100644 index 00000000..b6ab1ee7 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/4/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a % b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol new file mode 100644 index 00000000..133b1662 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `1`) of: `function signed_neg_one() public pure returns (int256) {` + function signed_neg_one() public pure returns (int256) { + int256 neg_one = 1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol new file mode 100644 index 00000000..36f8cc18 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {` + function signed_neg_one() public pure returns (int256) { + int256 neg_one = 0; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol new file mode 100644 index 00000000..0d9d0db1 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `0`) of: `function signed_pos_one() public pure returns (int256) {` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 0; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol new file mode 100644 index 00000000..a4306e44 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `-1`) of: `function signed_pos_one() public pure returns (int256) {` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = -1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol new file mode 100644 index 00000000..e45a7d13 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `2`) of: `function signed_pos_one() public pure returns (int256) {` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 2; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol new file mode 100644 index 00000000..5dc16fda --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `-1`) of: `function signed_zero() public pure returns (int256) {` + function signed_zero() public pure returns (int256) { + int256 zero = -1; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol new file mode 100644 index 00000000..189644ec --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `function signed_zero() public pure returns (int256) {` + function signed_zero() public pure returns (int256) { + int256 zero = 1; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol new file mode 100644 index 00000000..702970ed --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + function less(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol new file mode 100644 index 00000000..9f373363 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + function less(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol new file mode 100644 index 00000000..b1e4be58 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + function less(uint256 x, uint256 y) public pure returns (bool) { + return false; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/5/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/5/AOR/AOR.sol new file mode 100644 index 00000000..aadef707 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/5/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol new file mode 100644 index 00000000..798cab21 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol new file mode 100644 index 00000000..2f618548 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol new file mode 100644 index 00000000..2fab50f3 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol new file mode 100644 index 00000000..870659c2 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + function more(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol new file mode 100644 index 00000000..09cfeee6 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + function more(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol new file mode 100644 index 00000000..25e6a76b --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + function more(uint256 x, uint256 y) public pure returns (bool) { + return false; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol new file mode 100644 index 00000000..6f949f30 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol new file mode 100644 index 00000000..bbd7a0dd --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol new file mode 100644 index 00000000..1e265ce4 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol new file mode 100644 index 00000000..54f533c7 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`==` |==> `<=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/6/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/6/AOR/AOR.sol new file mode 100644 index 00000000..7e16e706 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/6/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a * b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol new file mode 100644 index 00000000..178c6ef3 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`==` |==> `>=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol new file mode 100644 index 00000000..cef8eda4 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return false; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol new file mode 100644 index 00000000..9ccc07ad --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {` + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol new file mode 100644 index 00000000..c8455bbd --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {` + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return false; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol new file mode 100644 index 00000000..b4611f6a --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol new file mode 100644 index 00000000..b64ac68a --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol new file mode 100644 index 00000000..01df1502 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return true; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol new file mode 100644 index 00000000..24c9bd52 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {` + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol new file mode 100644 index 00000000..02e292bf --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {` + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return false; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol new file mode 100644 index 00000000..ca40eb15 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return (x + y) > z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/7/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/7/AOR/AOR.sol new file mode 100644 index 00000000..3b94bb20 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/7/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a / b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol new file mode 100644 index 00000000..e5431891 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return (x + y) == z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol new file mode 100644 index 00000000..52200b58 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol new file mode 100644 index 00000000..b7ada02e --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return (x + y) < z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol new file mode 100644 index 00000000..4a913691 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return (x + y) > z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol new file mode 100644 index 00000000..5e60497b --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return true; + } +} diff --git a/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol new file mode 100644 index 00000000..4066c6e6 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// Unary Operator Replacement +contract UOR { + // Expect no mutants: cannot negate an unsigned integer + function unsigned_bw_not(uint256 x) public pure returns (uint256) { + return ~x; + } + + // Expect a single mutant: -x + /// UnaryOperatorReplacement(`` |==> ` - `) of: `function signed_bw_not(int256 x) public pure returns (int256) {` + function signed_bw_not(int256 x) public pure returns (int256) { + return - ~x; + } + + // Expect a single mutant: ~x + function signed_neg(int256 x) public pure returns (int256) { + return -x; + } +} diff --git a/resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol new file mode 100644 index 00000000..f2828633 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// Unary Operator Replacement +contract UOR { + // Expect no mutants: cannot negate an unsigned integer + function unsigned_bw_not(uint256 x) public pure returns (uint256) { + return ~x; + } + + // Expect a single mutant: -x + function signed_bw_not(int256 x) public pure returns (int256) { + return ~x; + } + + // Expect a single mutant: ~x + /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `function signed_neg(int256 x) public pure returns (int256) {` + function signed_neg(int256 x) public pure returns (int256) { + return ~ -x; + } +} diff --git a/resources/regressions/all_ops.json/mutants/8/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/8/AOR/AOR.sol new file mode 100644 index 00000000..8f8abb63 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/8/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a % b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/all_ops.json/mutants/9/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/9/AOR/AOR.sol new file mode 100644 index 00000000..618e784d --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/9/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) + b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/gambit_results.json b/resources/regressions/aor.json/gambit_results.json new file mode 100644 index 00000000..4edbedf9 --- /dev/null +++ b/resources/regressions/aor.json/gambit_results.json @@ -0,0 +1,156 @@ +[ + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", + "id": "1", + "name": "mutants/1/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "id": "2", + "name": "mutants/2/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "id": "3", + "name": "mutants/3/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "id": "4", + "name": "mutants/4/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", + "id": "5", + "name": "mutants/5/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "id": "6", + "name": "mutants/6/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "id": "7", + "name": "mutants/7/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "id": "8", + "name": "mutants/8/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "id": "9", + "name": "mutants/9/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "id": "10", + "name": "mutants/10/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "id": "11", + "name": "mutants/11/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "id": "12", + "name": "mutants/12/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "id": "13", + "name": "mutants/13/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "id": "14", + "name": "mutants/14/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "id": "15", + "name": "mutants/15/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", + "id": "16", + "name": "mutants/16/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "id": "17", + "name": "mutants/17/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", + "id": "18", + "name": "mutants/18/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", + "id": "19", + "name": "mutants/19/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", + "id": "20", + "name": "mutants/20/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", + "id": "21", + "name": "mutants/21/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", + "id": "22", + "name": "mutants/22/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/aor.json/mutants.log b/resources/regressions/aor.json/mutants.log new file mode 100644 index 00000000..ebb486f6 --- /dev/null +++ b/resources/regressions/aor.json/mutants.log @@ -0,0 +1,22 @@ +1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,- +2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,* +3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,/ +4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,% +5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,+ +6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,* +7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,/ +8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,% +9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,+ +10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,- +11,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,/ +12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,% +13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,+ +14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,- +15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,/ +16,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,** +17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,% +18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,+ +19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,- +20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,* +21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,/ +22,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,% diff --git a/resources/regressions/aor.json/mutants/1/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/1/Ops/AOR/AOR.sol new file mode 100644 index 00000000..0bf48eb3 --- /dev/null +++ b/resources/regressions/aor.json/mutants/1/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/10/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/10/Ops/AOR/AOR.sol new file mode 100644 index 00000000..2af6a527 --- /dev/null +++ b/resources/regressions/aor.json/mutants/10/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) - b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/11/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/11/Ops/AOR/AOR.sol new file mode 100644 index 00000000..7023f526 --- /dev/null +++ b/resources/regressions/aor.json/mutants/11/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) / b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/12/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/12/Ops/AOR/AOR.sol new file mode 100644 index 00000000..7f3fb060 --- /dev/null +++ b/resources/regressions/aor.json/mutants/12/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) % b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/13/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/13/Ops/AOR/AOR.sol new file mode 100644 index 00000000..c5bae4da --- /dev/null +++ b/resources/regressions/aor.json/mutants/13/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) + b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/14/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/14/Ops/AOR/AOR.sol new file mode 100644 index 00000000..c694d72e --- /dev/null +++ b/resources/regressions/aor.json/mutants/14/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) - b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/15/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/15/Ops/AOR/AOR.sol new file mode 100644 index 00000000..19b65f09 --- /dev/null +++ b/resources/regressions/aor.json/mutants/15/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) / b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/16/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/16/Ops/AOR/AOR.sol new file mode 100644 index 00000000..4b20e4c5 --- /dev/null +++ b/resources/regressions/aor.json/mutants/16/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) ** b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/17/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/17/Ops/AOR/AOR.sol new file mode 100644 index 00000000..44cb1b9b --- /dev/null +++ b/resources/regressions/aor.json/mutants/17/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) % b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/18/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/18/Ops/AOR/AOR.sol new file mode 100644 index 00000000..0ab879c1 --- /dev/null +++ b/resources/regressions/aor.json/mutants/18/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } +} diff --git a/resources/regressions/aor.json/mutants/19/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/19/Ops/AOR/AOR.sol new file mode 100644 index 00000000..81aa5028 --- /dev/null +++ b/resources/regressions/aor.json/mutants/19/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a - b; + } +} diff --git a/resources/regressions/aor.json/mutants/2/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/2/Ops/AOR/AOR.sol new file mode 100644 index 00000000..6e93b2bb --- /dev/null +++ b/resources/regressions/aor.json/mutants/2/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a * b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/20/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/20/Ops/AOR/AOR.sol new file mode 100644 index 00000000..b5cb7df8 --- /dev/null +++ b/resources/regressions/aor.json/mutants/20/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a * b; + } +} diff --git a/resources/regressions/aor.json/mutants/21/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/21/Ops/AOR/AOR.sol new file mode 100644 index 00000000..ab78d9a3 --- /dev/null +++ b/resources/regressions/aor.json/mutants/21/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a / b; + } +} diff --git a/resources/regressions/aor.json/mutants/22/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/22/Ops/AOR/AOR.sol new file mode 100644 index 00000000..b07036aa --- /dev/null +++ b/resources/regressions/aor.json/mutants/22/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a % b; + } +} diff --git a/resources/regressions/aor.json/mutants/3/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/3/Ops/AOR/AOR.sol new file mode 100644 index 00000000..f5716560 --- /dev/null +++ b/resources/regressions/aor.json/mutants/3/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a / b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/4/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/4/Ops/AOR/AOR.sol new file mode 100644 index 00000000..b6ab1ee7 --- /dev/null +++ b/resources/regressions/aor.json/mutants/4/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a % b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/5/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/5/Ops/AOR/AOR.sol new file mode 100644 index 00000000..aadef707 --- /dev/null +++ b/resources/regressions/aor.json/mutants/5/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/6/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/6/Ops/AOR/AOR.sol new file mode 100644 index 00000000..7e16e706 --- /dev/null +++ b/resources/regressions/aor.json/mutants/6/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a * b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/7/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/7/Ops/AOR/AOR.sol new file mode 100644 index 00000000..3b94bb20 --- /dev/null +++ b/resources/regressions/aor.json/mutants/7/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a / b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/8/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/8/Ops/AOR/AOR.sol new file mode 100644 index 00000000..8f8abb63 --- /dev/null +++ b/resources/regressions/aor.json/mutants/8/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a % b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/aor.json/mutants/9/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/9/Ops/AOR/AOR.sol new file mode 100644 index 00000000..618e784d --- /dev/null +++ b/resources/regressions/aor.json/mutants/9/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) + b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/bor.json/gambit_results.json b/resources/regressions/bor.json/gambit_results.json new file mode 100644 index 00000000..b57ede07 --- /dev/null +++ b/resources/regressions/bor.json/gambit_results.json @@ -0,0 +1,23 @@ +[ + { + "description": "ConditionalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `function bw_or(int256 a, int256 b) public pure returns (int256) {`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", + "id": "1", + "name": "mutants/1/Ops/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + }, + { + "description": "ConditionalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `function bw_and(int256 a, int256 b) public pure returns (int256) {`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", + "id": "2", + "name": "mutants/2/Ops/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + }, + { + "description": "ConditionalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `function bw_xor(int256 a, int256 b) public pure returns (int256) {`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", + "id": "3", + "name": "mutants/3/Ops/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/bor.json/mutants.log b/resources/regressions/bor.json/mutants.log new file mode 100644 index 00000000..7c82aad0 --- /dev/null +++ b/resources/regressions/bor.json/mutants.log @@ -0,0 +1,3 @@ +1,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,9:9,|,& +2,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,15:9,&,| +3,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,21:9,^,& diff --git a/resources/regressions/bor.json/mutants/1/Ops/BOR/BOR.sol b/resources/regressions/bor.json/mutants/1/Ops/BOR/BOR.sol new file mode 100644 index 00000000..ecbde264 --- /dev/null +++ b/resources/regressions/bor.json/mutants/1/Ops/BOR/BOR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Bitwise Operator Replacement (BOR) +contract BOR { + // Expect 1 mutants: + // a & b; + /// ConditionalOperatorReplacement(`|` |==> `&`) of: `function bw_or(int256 a, int256 b) public pure returns (int256) {` + function bw_or(int256 a, int256 b) public pure returns (int256) { + return a & b; + } + + // Expect 1 mutants: + // a | b; + function bw_and(int256 a, int256 b) public pure returns (int256) { + return a & b; + } + + // Expect 1 mutants: + // a | b; + function bw_xor(int256 a, int256 b) public pure returns (int256) { + return a ^ b; + } +} diff --git a/resources/regressions/bor.json/mutants/2/Ops/BOR/BOR.sol b/resources/regressions/bor.json/mutants/2/Ops/BOR/BOR.sol new file mode 100644 index 00000000..0b930c8b --- /dev/null +++ b/resources/regressions/bor.json/mutants/2/Ops/BOR/BOR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Bitwise Operator Replacement (BOR) +contract BOR { + // Expect 1 mutants: + // a & b; + function bw_or(int256 a, int256 b) public pure returns (int256) { + return a | b; + } + + // Expect 1 mutants: + // a | b; + /// ConditionalOperatorReplacement(`&` |==> `|`) of: `function bw_and(int256 a, int256 b) public pure returns (int256) {` + function bw_and(int256 a, int256 b) public pure returns (int256) { + return a | b; + } + + // Expect 1 mutants: + // a | b; + function bw_xor(int256 a, int256 b) public pure returns (int256) { + return a ^ b; + } +} diff --git a/resources/regressions/bor.json/mutants/3/Ops/BOR/BOR.sol b/resources/regressions/bor.json/mutants/3/Ops/BOR/BOR.sol new file mode 100644 index 00000000..38c31bb9 --- /dev/null +++ b/resources/regressions/bor.json/mutants/3/Ops/BOR/BOR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Bitwise Operator Replacement (BOR) +contract BOR { + // Expect 1 mutants: + // a & b; + function bw_or(int256 a, int256 b) public pure returns (int256) { + return a | b; + } + + // Expect 1 mutants: + // a | b; + function bw_and(int256 a, int256 b) public pure returns (int256) { + return a & b; + } + + // Expect 1 mutants: + // a | b; + /// ConditionalOperatorReplacement(`^` |==> `&`) of: `function bw_xor(int256 a, int256 b) public pure returns (int256) {` + function bw_xor(int256 a, int256 b) public pure returns (int256) { + return a & b; + } +} diff --git a/resources/regressions/edc.json/gambit_results.json b/resources/regressions/edc.json/gambit_results.json new file mode 100644 index 00000000..6db307fc --- /dev/null +++ b/resources/regressions/edc.json/gambit_results.json @@ -0,0 +1,9 @@ +[ + { + "description": "ElimDelegateCall", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `function setVars(address _contract) public payable {`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", + "id": "1", + "name": "mutants/1/Ops/EDC/EDC.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/edc.json/mutants.log b/resources/regressions/edc.json/mutants.log new file mode 100644 index 00000000..cd87b38e --- /dev/null +++ b/resources/regressions/edc.json/mutants.log @@ -0,0 +1 @@ +1,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,15:29,delegatecall,call diff --git a/resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol b/resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol new file mode 100644 index 00000000..116f6d30 --- /dev/null +++ b/resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.13; + +contract Helper { + function setVars(uint _num) public payable {} +} + +contract EDC { + uint public num; + address public sender; + uint public value; + bool public delegateSuccessful; + bytes public myData; + + /// ElimDelegateCall(`delegatecall` |==> `call`) of: `function setVars(address _contract) public payable {` + function setVars(address _contract) public payable { + (bool success, ) = _contract.call( + abi.encodeWithSignature("setVars(uint256)", 1) + ); + require(success, "Delegatecall failed"); + } +} diff --git a/resources/regressions/lor.json/gambit_results.json b/resources/regressions/lor.json/gambit_results.json new file mode 100644 index 00000000..3c192042 --- /dev/null +++ b/resources/regressions/lor.json/gambit_results.json @@ -0,0 +1,65 @@ +[ + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", + "id": "1", + "name": "mutants/1/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", + "id": "2", + "name": "mutants/2/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", + "id": "3", + "name": "mutants/3/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "id": "4", + "name": "mutants/4/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "id": "5", + "name": "mutants/5/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "id": "6", + "name": "mutants/6/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", + "id": "7", + "name": "mutants/7/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", + "id": "8", + "name": "mutants/8/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", + "id": "9", + "name": "mutants/9/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/lor.json/mutants.log b/resources/regressions/lor.json/mutants.log new file mode 100644 index 00000000..1a5626b1 --- /dev/null +++ b/resources/regressions/lor.json/mutants.log @@ -0,0 +1,9 @@ +1,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,a +2,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,b +3,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,false +4,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,a +5,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,b +6,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,true +7,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),x < y +8,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),a != (x >= y) +9,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),true diff --git a/resources/regressions/lor.json/mutants/1/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/1/Ops/LOR/LOR.sol new file mode 100644 index 00000000..c53deb85 --- /dev/null +++ b/resources/regressions/lor.json/mutants/1/Ops/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `function and(bool a, bool b) public pure returns (bool) {` + function and(bool a, bool b) public pure returns (bool) { + return a; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/lor.json/mutants/2/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/2/Ops/LOR/LOR.sol new file mode 100644 index 00000000..aca2816e --- /dev/null +++ b/resources/regressions/lor.json/mutants/2/Ops/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `function and(bool a, bool b) public pure returns (bool) {` + function and(bool a, bool b) public pure returns (bool) { + return b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/lor.json/mutants/3/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/3/Ops/LOR/LOR.sol new file mode 100644 index 00000000..22f2231c --- /dev/null +++ b/resources/regressions/lor.json/mutants/3/Ops/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `function and(bool a, bool b) public pure returns (bool) {` + function and(bool a, bool b) public pure returns (bool) { + return false; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/lor.json/mutants/4/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/4/Ops/LOR/LOR.sol new file mode 100644 index 00000000..fe893a77 --- /dev/null +++ b/resources/regressions/lor.json/mutants/4/Ops/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `function or(bool a, bool b) public pure returns (bool) {` + function or(bool a, bool b) public pure returns (bool) { + return a; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/lor.json/mutants/5/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/5/Ops/LOR/LOR.sol new file mode 100644 index 00000000..5f462cfb --- /dev/null +++ b/resources/regressions/lor.json/mutants/5/Ops/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `function or(bool a, bool b) public pure returns (bool) {` + function or(bool a, bool b) public pure returns (bool) { + return b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/lor.json/mutants/6/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/6/Ops/LOR/LOR.sol new file mode 100644 index 00000000..908f3789 --- /dev/null +++ b/resources/regressions/lor.json/mutants/6/Ops/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `function or(bool a, bool b) public pure returns (bool) {` + function or(bool a, bool b) public pure returns (bool) { + return true; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/lor.json/mutants/7/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/7/Ops/LOR/LOR.sol new file mode 100644 index 00000000..abd8b54a --- /dev/null +++ b/resources/regressions/lor.json/mutants/7/Ops/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + function more_or(bool a, int x, int y) public pure returns (bool) { + return x < y; + } +} diff --git a/resources/regressions/lor.json/mutants/8/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/8/Ops/LOR/LOR.sol new file mode 100644 index 00000000..c8114f8a --- /dev/null +++ b/resources/regressions/lor.json/mutants/8/Ops/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + function more_or(bool a, int x, int y) public pure returns (bool) { + return a != (x >= y); + } +} diff --git a/resources/regressions/lor.json/mutants/9/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/9/Ops/LOR/LOR.sol new file mode 100644 index 00000000..7345fcb8 --- /dev/null +++ b/resources/regressions/lor.json/mutants/9/Ops/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + function more_or(bool a, int x, int y) public pure returns (bool) { + return true; + } +} diff --git a/resources/regressions/lvr.json/gambit_results.json b/resources/regressions/lvr.json/gambit_results.json new file mode 100644 index 00000000..4602371c --- /dev/null +++ b/resources/regressions/lvr.json/gambit_results.json @@ -0,0 +1,79 @@ +[ + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `function unsigned_zero() public pure returns (uint256) {`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", + "id": "1", + "name": "mutants/1/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function unsigned_one() public pure returns (uint256) {`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", + "id": "2", + "name": "mutants/2/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function unsigned_one() public pure returns (uint256) {`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", + "id": "3", + "name": "mutants/3/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "id": "4", + "name": "mutants/4/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", + "id": "5", + "name": "mutants/5/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "id": "6", + "name": "mutants/6/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", + "id": "7", + "name": "mutants/7/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", + "id": "8", + "name": "mutants/8/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", + "id": "9", + "name": "mutants/9/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `function signed_zero() public pure returns (int256) {`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", + "id": "10", + "name": "mutants/10/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `function signed_zero() public pure returns (int256) {`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", + "id": "11", + "name": "mutants/11/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/lvr.json/mutants.log b/resources/regressions/lvr.json/mutants.log new file mode 100644 index 00000000..11f120d5 --- /dev/null +++ b/resources/regressions/lvr.json/mutants.log @@ -0,0 +1,11 @@ +1,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,14:15,0,1 +2,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,0 +3,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 +4,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 +5,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 +6,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 +7,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 +8,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 +9,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 +10,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,-1 +11,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,1 diff --git a/resources/regressions/lvr.json/mutants/1/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/1/Ops/LVR/LVR.sol new file mode 100644 index 00000000..98b6efde --- /dev/null +++ b/resources/regressions/lvr.json/mutants/1/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `function unsigned_zero() public pure returns (uint256) {` + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 1; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol new file mode 100644 index 00000000..5dc16fda --- /dev/null +++ b/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `-1`) of: `function signed_zero() public pure returns (int256) {` + function signed_zero() public pure returns (int256) { + int256 zero = -1; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol new file mode 100644 index 00000000..189644ec --- /dev/null +++ b/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `function signed_zero() public pure returns (int256) {` + function signed_zero() public pure returns (int256) { + int256 zero = 1; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol new file mode 100644 index 00000000..c2a1c544 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `0`) of: `function unsigned_one() public pure returns (uint256) {` + function unsigned_one() public pure returns (uint256) { + uint256 one = 0; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol new file mode 100644 index 00000000..5ab66ba2 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `2`) of: `function unsigned_one() public pure returns (uint256) {` + function unsigned_one() public pure returns (uint256) { + uint256 one = 2; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol new file mode 100644 index 00000000..36f8cc18 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {` + function signed_neg_one() public pure returns (int256) { + int256 neg_one = 0; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol new file mode 100644 index 00000000..133b1662 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `1`) of: `function signed_neg_one() public pure returns (int256) {` + function signed_neg_one() public pure returns (int256) { + int256 neg_one = 1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol new file mode 100644 index 00000000..36f8cc18 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {` + function signed_neg_one() public pure returns (int256) { + int256 neg_one = 0; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol new file mode 100644 index 00000000..0d9d0db1 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `0`) of: `function signed_pos_one() public pure returns (int256) {` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 0; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol new file mode 100644 index 00000000..a4306e44 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `-1`) of: `function signed_pos_one() public pure returns (int256) {` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = -1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol new file mode 100644 index 00000000..e45a7d13 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `2`) of: `function signed_pos_one() public pure returns (int256) {` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 2; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/ror.json/gambit_results.json b/resources/regressions/ror.json/gambit_results.json new file mode 100644 index 00000000..51d32fd5 --- /dev/null +++ b/resources/regressions/ror.json/gambit_results.json @@ -0,0 +1,198 @@ +[ + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "id": "1", + "name": "mutants/1/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "id": "2", + "name": "mutants/2/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "id": "3", + "name": "mutants/3/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "id": "4", + "name": "mutants/4/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "id": "5", + "name": "mutants/5/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "id": "6", + "name": "mutants/6/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "id": "7", + "name": "mutants/7/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "id": "8", + "name": "mutants/8/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "id": "9", + "name": "mutants/9/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "id": "10", + "name": "mutants/10/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "id": "11", + "name": "mutants/11/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "id": "12", + "name": "mutants/12/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "13", + "name": "mutants/13/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "14", + "name": "mutants/14/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "15", + "name": "mutants/15/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "id": "16", + "name": "mutants/16/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "id": "17", + "name": "mutants/17/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "18", + "name": "mutants/18/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "19", + "name": "mutants/19/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "20", + "name": "mutants/20/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "id": "21", + "name": "mutants/21/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "id": "22", + "name": "mutants/22/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "id": "23", + "name": "mutants/23/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "id": "24", + "name": "mutants/24/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "id": "25", + "name": "mutants/25/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", + "id": "26", + "name": "mutants/26/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", + "id": "27", + "name": "mutants/27/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", + "id": "28", + "name": "mutants/28/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/ror.json/mutants.log b/resources/regressions/ror.json/mutants.log new file mode 100644 index 00000000..a4dbcaf7 --- /dev/null +++ b/resources/regressions/ror.json/mutants.log @@ -0,0 +1,28 @@ +1,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,<= +2,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,!= +3,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:7,x < y,false +4,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,< +5,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,== +6,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:7,x <= y,true +7,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,>= +8,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,!= +9,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:7,x > y,false +10,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,> +11,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,== +12,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:7,x >= y,true +13,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,<= +14,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,>= +15,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:7,x == y,false +16,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,true +17,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false +18,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< +19,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> +20,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true +21,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true +22,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,false +23,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> +24,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== +25,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true +26,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< +27,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> +28,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true diff --git a/resources/regressions/ror.json/mutants/1/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/1/Ops/ROR/ROR.sol new file mode 100644 index 00000000..702970ed --- /dev/null +++ b/resources/regressions/ror.json/mutants/1/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + function less(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/10/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/10/Ops/ROR/ROR.sol new file mode 100644 index 00000000..6f949f30 --- /dev/null +++ b/resources/regressions/ror.json/mutants/10/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/11/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/11/Ops/ROR/ROR.sol new file mode 100644 index 00000000..bbd7a0dd --- /dev/null +++ b/resources/regressions/ror.json/mutants/11/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/12/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/12/Ops/ROR/ROR.sol new file mode 100644 index 00000000..1e265ce4 --- /dev/null +++ b/resources/regressions/ror.json/mutants/12/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/13/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/13/Ops/ROR/ROR.sol new file mode 100644 index 00000000..54f533c7 --- /dev/null +++ b/resources/regressions/ror.json/mutants/13/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`==` |==> `<=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/14/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/14/Ops/ROR/ROR.sol new file mode 100644 index 00000000..178c6ef3 --- /dev/null +++ b/resources/regressions/ror.json/mutants/14/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`==` |==> `>=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/15/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/15/Ops/ROR/ROR.sol new file mode 100644 index 00000000..cef8eda4 --- /dev/null +++ b/resources/regressions/ror.json/mutants/15/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return false; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/16/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/16/Ops/ROR/ROR.sol new file mode 100644 index 00000000..9ccc07ad --- /dev/null +++ b/resources/regressions/ror.json/mutants/16/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {` + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/17/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/17/Ops/ROR/ROR.sol new file mode 100644 index 00000000..c8455bbd --- /dev/null +++ b/resources/regressions/ror.json/mutants/17/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {` + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return false; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/18/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/18/Ops/ROR/ROR.sol new file mode 100644 index 00000000..b4611f6a --- /dev/null +++ b/resources/regressions/ror.json/mutants/18/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/19/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/19/Ops/ROR/ROR.sol new file mode 100644 index 00000000..b64ac68a --- /dev/null +++ b/resources/regressions/ror.json/mutants/19/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/2/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/2/Ops/ROR/ROR.sol new file mode 100644 index 00000000..9f373363 --- /dev/null +++ b/resources/regressions/ror.json/mutants/2/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + function less(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/20/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/20/Ops/ROR/ROR.sol new file mode 100644 index 00000000..01df1502 --- /dev/null +++ b/resources/regressions/ror.json/mutants/20/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return true; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/21/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/21/Ops/ROR/ROR.sol new file mode 100644 index 00000000..24c9bd52 --- /dev/null +++ b/resources/regressions/ror.json/mutants/21/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {` + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/22/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/22/Ops/ROR/ROR.sol new file mode 100644 index 00000000..02e292bf --- /dev/null +++ b/resources/regressions/ror.json/mutants/22/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {` + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return false; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/23/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/23/Ops/ROR/ROR.sol new file mode 100644 index 00000000..ca40eb15 --- /dev/null +++ b/resources/regressions/ror.json/mutants/23/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return (x + y) > z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/24/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/24/Ops/ROR/ROR.sol new file mode 100644 index 00000000..e5431891 --- /dev/null +++ b/resources/regressions/ror.json/mutants/24/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return (x + y) == z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/25/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/25/Ops/ROR/ROR.sol new file mode 100644 index 00000000..52200b58 --- /dev/null +++ b/resources/regressions/ror.json/mutants/25/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/26/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/26/Ops/ROR/ROR.sol new file mode 100644 index 00000000..b7ada02e --- /dev/null +++ b/resources/regressions/ror.json/mutants/26/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return (x + y) < z; + } +} diff --git a/resources/regressions/ror.json/mutants/27/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/27/Ops/ROR/ROR.sol new file mode 100644 index 00000000..4a913691 --- /dev/null +++ b/resources/regressions/ror.json/mutants/27/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return (x + y) > z; + } +} diff --git a/resources/regressions/ror.json/mutants/28/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/28/Ops/ROR/ROR.sol new file mode 100644 index 00000000..5e60497b --- /dev/null +++ b/resources/regressions/ror.json/mutants/28/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return true; + } +} diff --git a/resources/regressions/ror.json/mutants/3/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/3/Ops/ROR/ROR.sol new file mode 100644 index 00000000..b1e4be58 --- /dev/null +++ b/resources/regressions/ror.json/mutants/3/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + function less(uint256 x, uint256 y) public pure returns (bool) { + return false; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/4/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/4/Ops/ROR/ROR.sol new file mode 100644 index 00000000..798cab21 --- /dev/null +++ b/resources/regressions/ror.json/mutants/4/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/5/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/5/Ops/ROR/ROR.sol new file mode 100644 index 00000000..2f618548 --- /dev/null +++ b/resources/regressions/ror.json/mutants/5/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/6/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/6/Ops/ROR/ROR.sol new file mode 100644 index 00000000..2fab50f3 --- /dev/null +++ b/resources/regressions/ror.json/mutants/6/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/7/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/7/Ops/ROR/ROR.sol new file mode 100644 index 00000000..870659c2 --- /dev/null +++ b/resources/regressions/ror.json/mutants/7/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + function more(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/8/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/8/Ops/ROR/ROR.sol new file mode 100644 index 00000000..09cfeee6 --- /dev/null +++ b/resources/regressions/ror.json/mutants/8/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + function more(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/ror.json/mutants/9/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/9/Ops/ROR/ROR.sol new file mode 100644 index 00000000..25e6a76b --- /dev/null +++ b/resources/regressions/ror.json/mutants/9/Ops/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + function more(uint256 x, uint256 y) public pure returns (bool) { + return false; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json new file mode 100644 index 00000000..f0ee3d5b --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json @@ -0,0 +1,352 @@ +[ + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "1", + "name": "mutants/1/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "id": "2", + "name": "mutants/2/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "id": "3", + "name": "mutants/3/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "id": "4", + "name": "mutants/4/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "id": "5", + "name": "mutants/5/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "id": "6", + "name": "mutants/6/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "7", + "name": "mutants/7/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "8", + "name": "mutants/8/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "id": "9", + "name": "mutants/9/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "id": "10", + "name": "mutants/10/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "11", + "name": "mutants/11/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "12", + "name": "mutants/12/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "id": "13", + "name": "mutants/13/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "14", + "name": "mutants/14/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "15", + "name": "mutants/15/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "16", + "name": "mutants/16/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "17", + "name": "mutants/17/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "18", + "name": "mutants/18/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "19", + "name": "mutants/19/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "id": "20", + "name": "mutants/20/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "id": "21", + "name": "mutants/21/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "22", + "name": "mutants/22/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "23", + "name": "mutants/23/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "24", + "name": "mutants/24/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "25", + "name": "mutants/25/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "26", + "name": "mutants/26/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "id": "27", + "name": "mutants/27/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "id": "28", + "name": "mutants/28/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "id": "29", + "name": "mutants/29/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "id": "30", + "name": "mutants/30/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "id": "31", + "name": "mutants/31/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "32", + "name": "mutants/32/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "33", + "name": "mutants/33/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "id": "34", + "name": "mutants/34/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "id": "35", + "name": "mutants/35/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "36", + "name": "mutants/36/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "37", + "name": "mutants/37/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "id": "38", + "name": "mutants/38/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "39", + "name": "mutants/39/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "40", + "name": "mutants/40/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "41", + "name": "mutants/41/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "42", + "name": "mutants/42/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "43", + "name": "mutants/43/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "44", + "name": "mutants/44/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "id": "45", + "name": "mutants/45/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "id": "46", + "name": "mutants/46/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "47", + "name": "mutants/47/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "48", + "name": "mutants/48/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "49", + "name": "mutants/49/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "50", + "name": "mutants/50/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants.log b/resources/regressions/test_multiple_contracts_1.json/mutants.log new file mode 100644 index 00000000..addf7287 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants.log @@ -0,0 +1,50 @@ +1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) +2,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +3,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +4,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +7,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +8,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +9,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +10,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +11,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +13,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +14,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +15,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +18,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +19,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +20,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +22,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +23,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +24,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +25,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) +27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +32,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +35,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +36,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +37,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +41,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +42,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +44,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +46,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol new file mode 100644 index 00000000..2b897019 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {` + function getarray(address[] memory c, address e) internal pure { + assert(true); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol new file mode 100644 index 00000000..bd19211d --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;` + a[0] = msg.sender; + assert(true); + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol new file mode 100644 index 00000000..78fb8fff --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 0; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol new file mode 100644 index 00000000..636ec2a5 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 11; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol new file mode 100644 index 00000000..55c70e64 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a + decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol new file mode 100644 index 00000000..d1dd4817 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol new file mode 100644 index 00000000..ab7d6850 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol new file mode 100644 index 00000000..0f717ac0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol new file mode 100644 index 00000000..fc066a0b --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol new file mode 100644 index 00000000..5855f2b1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol new file mode 100644 index 00000000..b0df3143 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol new file mode 100644 index 00000000..9b7c4f8f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + assert(true); + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol new file mode 100644 index 00000000..6db2ec1f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();` + address[] memory b = this.foo(); + assert(true); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol new file mode 100644 index 00000000..1f74417d --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + assert(true); + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol new file mode 100644 index 00000000..f51cc82f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol new file mode 100644 index 00000000..6c5aaae7 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol new file mode 100644 index 00000000..ae66ae12 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol new file mode 100644 index 00000000..363381e5 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol new file mode 100644 index 00000000..2b897019 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {` + function getarray(address[] memory c, address e) internal pure { + assert(true); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol new file mode 100644 index 00000000..9b7c4f8f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + assert(true); + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol new file mode 100644 index 00000000..7d4cc026 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a - b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol new file mode 100644 index 00000000..c4dbc3b0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a * b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol new file mode 100644 index 00000000..7d4cc026 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a - b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol new file mode 100644 index 00000000..14f324bf --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a / b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol new file mode 100644 index 00000000..d1846219 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a % b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol new file mode 100644 index 00000000..11fcfc14 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](0); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol new file mode 100644 index 00000000..fa48e881 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](2); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol new file mode 100644 index 00000000..71c41805 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);` + address[] memory a = new address[](1); + assert(true); + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol new file mode 100644 index 00000000..bd19211d --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;` + a[0] = msg.sender; + assert(true); + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol new file mode 100644 index 00000000..78fb8fff --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 0; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol new file mode 100644 index 00000000..636ec2a5 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 11; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol new file mode 100644 index 00000000..55c70e64 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a + decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol new file mode 100644 index 00000000..d1dd4817 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol new file mode 100644 index 00000000..c4dbc3b0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a * b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol new file mode 100644 index 00000000..ab7d6850 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol new file mode 100644 index 00000000..0f717ac0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol new file mode 100644 index 00000000..fc066a0b --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol new file mode 100644 index 00000000..5855f2b1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol new file mode 100644 index 00000000..b0df3143 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol new file mode 100644 index 00000000..6db2ec1f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();` + address[] memory b = this.foo(); + assert(true); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol new file mode 100644 index 00000000..1f74417d --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + assert(true); + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol new file mode 100644 index 00000000..f51cc82f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol new file mode 100644 index 00000000..6c5aaae7 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol new file mode 100644 index 00000000..ae66ae12 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol new file mode 100644 index 00000000..14f324bf --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a / b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol new file mode 100644 index 00000000..363381e5 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol new file mode 100644 index 00000000..d1846219 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a % b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol new file mode 100644 index 00000000..11fcfc14 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](0); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol new file mode 100644 index 00000000..fa48e881 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](2); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol new file mode 100644 index 00000000..71c41805 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);` + address[] memory a = new address[](1); + assert(true); + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json new file mode 100644 index 00000000..f0ee3d5b --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json @@ -0,0 +1,352 @@ +[ + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "1", + "name": "mutants/1/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "id": "2", + "name": "mutants/2/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "id": "3", + "name": "mutants/3/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "id": "4", + "name": "mutants/4/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "id": "5", + "name": "mutants/5/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "id": "6", + "name": "mutants/6/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "7", + "name": "mutants/7/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "8", + "name": "mutants/8/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "id": "9", + "name": "mutants/9/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "id": "10", + "name": "mutants/10/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "11", + "name": "mutants/11/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "12", + "name": "mutants/12/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "id": "13", + "name": "mutants/13/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "14", + "name": "mutants/14/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "15", + "name": "mutants/15/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "16", + "name": "mutants/16/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "17", + "name": "mutants/17/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "18", + "name": "mutants/18/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "19", + "name": "mutants/19/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "id": "20", + "name": "mutants/20/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "id": "21", + "name": "mutants/21/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "22", + "name": "mutants/22/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "23", + "name": "mutants/23/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "24", + "name": "mutants/24/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "25", + "name": "mutants/25/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "26", + "name": "mutants/26/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "id": "27", + "name": "mutants/27/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "id": "28", + "name": "mutants/28/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "id": "29", + "name": "mutants/29/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "id": "30", + "name": "mutants/30/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "id": "31", + "name": "mutants/31/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "32", + "name": "mutants/32/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "33", + "name": "mutants/33/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "id": "34", + "name": "mutants/34/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "id": "35", + "name": "mutants/35/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "36", + "name": "mutants/36/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "37", + "name": "mutants/37/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "id": "38", + "name": "mutants/38/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "39", + "name": "mutants/39/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "40", + "name": "mutants/40/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "41", + "name": "mutants/41/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "42", + "name": "mutants/42/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "43", + "name": "mutants/43/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "44", + "name": "mutants/44/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "id": "45", + "name": "mutants/45/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "id": "46", + "name": "mutants/46/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "47", + "name": "mutants/47/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "48", + "name": "mutants/48/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "49", + "name": "mutants/49/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "50", + "name": "mutants/50/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants.log b/resources/regressions/test_multiple_contracts_2.json/mutants.log new file mode 100644 index 00000000..addf7287 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants.log @@ -0,0 +1,50 @@ +1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) +2,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +3,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +4,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +7,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +8,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +9,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +10,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +11,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +13,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +14,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +15,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +18,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +19,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +20,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +22,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +23,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +24,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +25,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) +27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +32,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +35,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +36,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +37,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +41,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +42,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +44,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +46,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol new file mode 100644 index 00000000..2b897019 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {` + function getarray(address[] memory c, address e) internal pure { + assert(true); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol new file mode 100644 index 00000000..bd19211d --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;` + a[0] = msg.sender; + assert(true); + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol new file mode 100644 index 00000000..78fb8fff --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 0; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol new file mode 100644 index 00000000..636ec2a5 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 11; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol new file mode 100644 index 00000000..55c70e64 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a + decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol new file mode 100644 index 00000000..d1dd4817 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol new file mode 100644 index 00000000..ab7d6850 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol new file mode 100644 index 00000000..0f717ac0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol new file mode 100644 index 00000000..fc066a0b --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol new file mode 100644 index 00000000..5855f2b1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol new file mode 100644 index 00000000..b0df3143 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol new file mode 100644 index 00000000..9b7c4f8f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + assert(true); + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol new file mode 100644 index 00000000..6db2ec1f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();` + address[] memory b = this.foo(); + assert(true); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol new file mode 100644 index 00000000..1f74417d --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + assert(true); + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol new file mode 100644 index 00000000..f51cc82f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol new file mode 100644 index 00000000..6c5aaae7 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol new file mode 100644 index 00000000..ae66ae12 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol new file mode 100644 index 00000000..363381e5 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol new file mode 100644 index 00000000..2b897019 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {` + function getarray(address[] memory c, address e) internal pure { + assert(true); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol new file mode 100644 index 00000000..9b7c4f8f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + assert(true); + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol new file mode 100644 index 00000000..7d4cc026 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a - b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol new file mode 100644 index 00000000..c4dbc3b0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a * b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol new file mode 100644 index 00000000..7d4cc026 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a - b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol new file mode 100644 index 00000000..14f324bf --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a / b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol new file mode 100644 index 00000000..d1846219 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a % b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol new file mode 100644 index 00000000..11fcfc14 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](0); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol new file mode 100644 index 00000000..fa48e881 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](2); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol new file mode 100644 index 00000000..71c41805 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);` + address[] memory a = new address[](1); + assert(true); + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol new file mode 100644 index 00000000..bd19211d --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;` + a[0] = msg.sender; + assert(true); + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol new file mode 100644 index 00000000..78fb8fff --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 0; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol new file mode 100644 index 00000000..636ec2a5 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 11; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol new file mode 100644 index 00000000..55c70e64 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a + decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol new file mode 100644 index 00000000..d1dd4817 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol new file mode 100644 index 00000000..c4dbc3b0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a * b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol new file mode 100644 index 00000000..ab7d6850 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol new file mode 100644 index 00000000..0f717ac0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol new file mode 100644 index 00000000..fc066a0b --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol new file mode 100644 index 00000000..5855f2b1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol new file mode 100644 index 00000000..b0df3143 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol new file mode 100644 index 00000000..6db2ec1f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();` + address[] memory b = this.foo(); + assert(true); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol new file mode 100644 index 00000000..1f74417d --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + assert(true); + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol new file mode 100644 index 00000000..f51cc82f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol new file mode 100644 index 00000000..6c5aaae7 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol new file mode 100644 index 00000000..ae66ae12 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol new file mode 100644 index 00000000..14f324bf --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a / b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol new file mode 100644 index 00000000..363381e5 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol new file mode 100644 index 00000000..d1846219 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a % b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol new file mode 100644 index 00000000..11fcfc14 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](0); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol new file mode 100644 index 00000000..fa48e881 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](2); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol new file mode 100644 index 00000000..71c41805 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);` + address[] memory a = new address[](1); + assert(true); + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json new file mode 100644 index 00000000..f0ee3d5b --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json @@ -0,0 +1,352 @@ +[ + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "1", + "name": "mutants/1/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "id": "2", + "name": "mutants/2/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "id": "3", + "name": "mutants/3/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "id": "4", + "name": "mutants/4/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "id": "5", + "name": "mutants/5/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "id": "6", + "name": "mutants/6/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "7", + "name": "mutants/7/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "8", + "name": "mutants/8/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "id": "9", + "name": "mutants/9/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "id": "10", + "name": "mutants/10/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "11", + "name": "mutants/11/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "12", + "name": "mutants/12/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "id": "13", + "name": "mutants/13/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "14", + "name": "mutants/14/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "15", + "name": "mutants/15/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "16", + "name": "mutants/16/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "17", + "name": "mutants/17/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "18", + "name": "mutants/18/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "19", + "name": "mutants/19/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "id": "20", + "name": "mutants/20/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "id": "21", + "name": "mutants/21/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "22", + "name": "mutants/22/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "23", + "name": "mutants/23/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "24", + "name": "mutants/24/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "25", + "name": "mutants/25/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "26", + "name": "mutants/26/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "id": "27", + "name": "mutants/27/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "id": "28", + "name": "mutants/28/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "id": "29", + "name": "mutants/29/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "id": "30", + "name": "mutants/30/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "id": "31", + "name": "mutants/31/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "32", + "name": "mutants/32/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "33", + "name": "mutants/33/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "id": "34", + "name": "mutants/34/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "id": "35", + "name": "mutants/35/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "36", + "name": "mutants/36/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "37", + "name": "mutants/37/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "id": "38", + "name": "mutants/38/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "39", + "name": "mutants/39/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "40", + "name": "mutants/40/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "41", + "name": "mutants/41/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "42", + "name": "mutants/42/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "43", + "name": "mutants/43/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "44", + "name": "mutants/44/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "id": "45", + "name": "mutants/45/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "id": "46", + "name": "mutants/46/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "47", + "name": "mutants/47/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "48", + "name": "mutants/48/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "49", + "name": "mutants/49/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "50", + "name": "mutants/50/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants.log b/resources/regressions/test_multiple_contracts_3.json/mutants.log new file mode 100644 index 00000000..addf7287 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants.log @@ -0,0 +1,50 @@ +1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) +2,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +3,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +4,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +7,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +8,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +9,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +10,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +11,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +13,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +14,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +15,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +18,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +19,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +20,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +22,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +23,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +24,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +25,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) +27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +32,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +35,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +36,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +37,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +41,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +42,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +44,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +46,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol new file mode 100644 index 00000000..2b897019 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {` + function getarray(address[] memory c, address e) internal pure { + assert(true); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol new file mode 100644 index 00000000..bd19211d --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;` + a[0] = msg.sender; + assert(true); + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol new file mode 100644 index 00000000..78fb8fff --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 0; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol new file mode 100644 index 00000000..636ec2a5 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 11; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol new file mode 100644 index 00000000..55c70e64 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a + decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol new file mode 100644 index 00000000..d1dd4817 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol new file mode 100644 index 00000000..ab7d6850 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol new file mode 100644 index 00000000..0f717ac0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol new file mode 100644 index 00000000..fc066a0b --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol new file mode 100644 index 00000000..5855f2b1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol new file mode 100644 index 00000000..b0df3143 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol new file mode 100644 index 00000000..9b7c4f8f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + assert(true); + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol new file mode 100644 index 00000000..6db2ec1f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();` + address[] memory b = this.foo(); + assert(true); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol new file mode 100644 index 00000000..1f74417d --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + assert(true); + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol new file mode 100644 index 00000000..f51cc82f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol new file mode 100644 index 00000000..6c5aaae7 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol new file mode 100644 index 00000000..ae66ae12 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol new file mode 100644 index 00000000..363381e5 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol new file mode 100644 index 00000000..2b897019 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {` + function getarray(address[] memory c, address e) internal pure { + assert(true); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol new file mode 100644 index 00000000..9b7c4f8f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + assert(true); + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol new file mode 100644 index 00000000..7d4cc026 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a - b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol new file mode 100644 index 00000000..c4dbc3b0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a * b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol new file mode 100644 index 00000000..7d4cc026 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a - b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol new file mode 100644 index 00000000..14f324bf --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a / b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol new file mode 100644 index 00000000..d1846219 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a % b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol new file mode 100644 index 00000000..11fcfc14 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](0); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol new file mode 100644 index 00000000..fa48e881 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](2); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol new file mode 100644 index 00000000..71c41805 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);` + address[] memory a = new address[](1); + assert(true); + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol new file mode 100644 index 00000000..bd19211d --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;` + a[0] = msg.sender; + assert(true); + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol new file mode 100644 index 00000000..78fb8fff --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 0; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol new file mode 100644 index 00000000..636ec2a5 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 11; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol new file mode 100644 index 00000000..55c70e64 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a + decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol new file mode 100644 index 00000000..d1dd4817 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol new file mode 100644 index 00000000..c4dbc3b0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a * b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol new file mode 100644 index 00000000..ab7d6850 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol new file mode 100644 index 00000000..0f717ac0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol new file mode 100644 index 00000000..fc066a0b --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol new file mode 100644 index 00000000..5855f2b1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol new file mode 100644 index 00000000..b0df3143 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol new file mode 100644 index 00000000..6db2ec1f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();` + address[] memory b = this.foo(); + assert(true); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol new file mode 100644 index 00000000..1f74417d --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + assert(true); + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol new file mode 100644 index 00000000..f51cc82f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol new file mode 100644 index 00000000..6c5aaae7 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol new file mode 100644 index 00000000..ae66ae12 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol new file mode 100644 index 00000000..14f324bf --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a / b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol new file mode 100644 index 00000000..363381e5 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol new file mode 100644 index 00000000..d1846219 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a % b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol new file mode 100644 index 00000000..11fcfc14 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](0); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol new file mode 100644 index 00000000..fa48e881 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](2); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol new file mode 100644 index 00000000..71c41805 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);` + address[] memory a = new address[](1); + assert(true); + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json new file mode 100644 index 00000000..7310fa15 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json @@ -0,0 +1,184 @@ +[ + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "id": "1", + "name": "mutants/1/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "id": "2", + "name": "mutants/2/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "id": "3", + "name": "mutants/3/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "id": "4", + "name": "mutants/4/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "id": "5", + "name": "mutants/5/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "6", + "name": "mutants/6/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "7", + "name": "mutants/7/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "8", + "name": "mutants/8/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "9", + "name": "mutants/9/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "10", + "name": "mutants/10/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "11", + "name": "mutants/11/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "12", + "name": "mutants/12/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "13", + "name": "mutants/13/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "id": "14", + "name": "mutants/14/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "id": "15", + "name": "mutants/15/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "id": "16", + "name": "mutants/16/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "id": "17", + "name": "mutants/17/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "id": "18", + "name": "mutants/18/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "19", + "name": "mutants/19/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "20", + "name": "mutants/20/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "21", + "name": "mutants/21/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "22", + "name": "mutants/22/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "23", + "name": "mutants/23/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "24", + "name": "mutants/24/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "25", + "name": "mutants/25/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "26", + "name": "mutants/26/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants.log b/resources/regressions/test_multiple_contracts_4.json/mutants.log new file mode 100644 index 00000000..6bf4ccf9 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants.log @@ -0,0 +1,26 @@ +1,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +2,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +3,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +4,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +9,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +10,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +11,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +12,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +13,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +14,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +15,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +21,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +22,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +23,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +24,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +25,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +26,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol new file mode 100644 index 00000000..7d4cc026 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a - b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol new file mode 100644 index 00000000..f51cc82f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol new file mode 100644 index 00000000..6c5aaae7 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol new file mode 100644 index 00000000..ae66ae12 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol new file mode 100644 index 00000000..363381e5 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol new file mode 100644 index 00000000..7d4cc026 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a - b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol new file mode 100644 index 00000000..c4dbc3b0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a * b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol new file mode 100644 index 00000000..14f324bf --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a / b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol new file mode 100644 index 00000000..d1846219 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a % b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol new file mode 100644 index 00000000..55c70e64 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a + decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol new file mode 100644 index 00000000..d1dd4817 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol new file mode 100644 index 00000000..c4dbc3b0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a * b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol new file mode 100644 index 00000000..ab7d6850 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol new file mode 100644 index 00000000..0f717ac0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol new file mode 100644 index 00000000..fc066a0b --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol new file mode 100644 index 00000000..f51cc82f --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol new file mode 100644 index 00000000..6c5aaae7 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol new file mode 100644 index 00000000..ae66ae12 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol new file mode 100644 index 00000000..363381e5 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol new file mode 100644 index 00000000..14f324bf --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a / b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol new file mode 100644 index 00000000..d1846219 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a % b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol new file mode 100644 index 00000000..55c70e64 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a + decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol new file mode 100644 index 00000000..d1dd4817 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol new file mode 100644 index 00000000..ab7d6850 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol new file mode 100644 index 00000000..0f717ac0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol new file mode 100644 index 00000000..fc066a0b --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/gambit_results.json b/resources/regressions/test_multiple_files_1.json/gambit_results.json new file mode 100644 index 00000000..1a74345a --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/gambit_results.json @@ -0,0 +1,366 @@ +[ + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", + "id": "1", + "name": "mutants/1/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", + "id": "2", + "name": "mutants/2/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "id": "3", + "name": "mutants/3/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "id": "4", + "name": "mutants/4/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "id": "5", + "name": "mutants/5/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", + "id": "6", + "name": "mutants/6/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", + "id": "7", + "name": "mutants/7/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "id": "8", + "name": "mutants/8/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "id": "9", + "name": "mutants/9/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "id": "10", + "name": "mutants/10/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", + "id": "11", + "name": "mutants/11/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "id": "12", + "name": "mutants/12/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "id": "13", + "name": "mutants/13/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "id": "14", + "name": "mutants/14/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "id": "15", + "name": "mutants/15/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", + "id": "16", + "name": "mutants/16/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "id": "17", + "name": "mutants/17/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "id": "18", + "name": "mutants/18/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "id": "19", + "name": "mutants/19/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", + "id": "20", + "name": "mutants/20/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "id": "21", + "name": "mutants/21/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ assert(true);\n }\n }\n", + "id": "22", + "name": "mutants/22/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", + "id": "23", + "name": "mutants/23/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", + "id": "24", + "name": "mutants/24/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", + "id": "25", + "name": "mutants/25/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", + "id": "26", + "name": "mutants/26/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", + "id": "27", + "name": "mutants/27/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "28", + "name": "mutants/28/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "id": "29", + "name": "mutants/29/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "id": "30", + "name": "mutants/30/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "id": "31", + "name": "mutants/31/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "id": "32", + "name": "mutants/32/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "id": "33", + "name": "mutants/33/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "34", + "name": "mutants/34/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "35", + "name": "mutants/35/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "id": "36", + "name": "mutants/36/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "id": "37", + "name": "mutants/37/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "38", + "name": "mutants/38/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "39", + "name": "mutants/39/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "id": "40", + "name": "mutants/40/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "41", + "name": "mutants/41/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "42", + "name": "mutants/42/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "43", + "name": "mutants/43/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "44", + "name": "mutants/44/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "45", + "name": "mutants/45/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "46", + "name": "mutants/46/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "id": "47", + "name": "mutants/47/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "id": "48", + "name": "mutants/48/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "49", + "name": "mutants/49/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "50", + "name": "mutants/50/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "51", + "name": "mutants/51/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "52", + "name": "mutants/52/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/test_multiple_files_1.json/mutants.log b/resources/regressions/test_multiple_files_1.json/mutants.log new file mode 100644 index 00000000..ea3380b2 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants.log @@ -0,0 +1,52 @@ +1,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:0,return a + b,assert(true) +2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,- +3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,* +4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,/ +5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,% +6,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:0,return a - b,assert(true) +7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,+ +8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,* +9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,/ +10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,% +11,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:0,return ((a)) * b,assert(true) +12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,+ +13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,- +14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,/ +15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,% +16,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:0,return ((a)) * b,assert(true) +17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,+ +18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,- +19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,/ +20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,** +21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,% +22,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:0,return a ** b,assert(true) +23,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,+ +24,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,- +25,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,* +26,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,/ +27,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,% +28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) +29,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +33,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +34,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +35,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +36,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +37,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +38,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +41,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +42,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +43,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +44,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +46,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +47,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +48,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +51,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +52,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% diff --git a/resources/regressions/test_multiple_files_1.json/mutants/1/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/1/Ops/AOR/AOR.sol new file mode 100644 index 00000000..013ca45d --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/1/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + assert(true); + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/10/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/10/Ops/AOR/AOR.sol new file mode 100644 index 00000000..8f8abb63 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/10/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a % b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/11/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/11/Ops/AOR/AOR.sol new file mode 100644 index 00000000..1820a4e0 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/11/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + assert(true); + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/12/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/12/Ops/AOR/AOR.sol new file mode 100644 index 00000000..618e784d --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/12/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) + b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/13/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/13/Ops/AOR/AOR.sol new file mode 100644 index 00000000..2af6a527 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/13/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) - b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/14/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/14/Ops/AOR/AOR.sol new file mode 100644 index 00000000..7023f526 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/14/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) / b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/15/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/15/Ops/AOR/AOR.sol new file mode 100644 index 00000000..7f3fb060 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/15/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) % b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/16/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/16/Ops/AOR/AOR.sol new file mode 100644 index 00000000..d1a15b52 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/16/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + assert(true); + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/17/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/17/Ops/AOR/AOR.sol new file mode 100644 index 00000000..c5bae4da --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/17/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) + b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/18/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/18/Ops/AOR/AOR.sol new file mode 100644 index 00000000..c694d72e --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/18/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) - b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/19/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/19/Ops/AOR/AOR.sol new file mode 100644 index 00000000..19b65f09 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/19/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) / b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/2/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/2/Ops/AOR/AOR.sol new file mode 100644 index 00000000..0bf48eb3 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/2/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/20/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/20/Ops/AOR/AOR.sol new file mode 100644 index 00000000..4b20e4c5 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/20/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) ** b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/21/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/21/Ops/AOR/AOR.sol new file mode 100644 index 00000000..44cb1b9b --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/21/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) % b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/22/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/22/Ops/AOR/AOR.sol new file mode 100644 index 00000000..5f7a7932 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/22/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + assert(true); + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/23/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/23/Ops/AOR/AOR.sol new file mode 100644 index 00000000..0ab879c1 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/23/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/24/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/24/Ops/AOR/AOR.sol new file mode 100644 index 00000000..81aa5028 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/24/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a - b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/25/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/25/Ops/AOR/AOR.sol new file mode 100644 index 00000000..b5cb7df8 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/25/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a * b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/26/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/26/Ops/AOR/AOR.sol new file mode 100644 index 00000000..ab78d9a3 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/26/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a / b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/27/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/27/Ops/AOR/AOR.sol new file mode 100644 index 00000000..b07036aa --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/27/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a % b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol new file mode 100644 index 00000000..2b897019 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {` + function getarray(address[] memory c, address e) internal pure { + assert(true); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol new file mode 100644 index 00000000..9b7c4f8f --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + assert(true); + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/3/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/3/Ops/AOR/AOR.sol new file mode 100644 index 00000000..6e93b2bb --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/3/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a * b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol new file mode 100644 index 00000000..7d4cc026 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a - b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol new file mode 100644 index 00000000..c4dbc3b0 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a * b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol new file mode 100644 index 00000000..14f324bf --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a / b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol new file mode 100644 index 00000000..d1846219 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + function add(int8 a, int8 b) public pure returns (int8) { + return a % b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol new file mode 100644 index 00000000..11fcfc14 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](0); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol new file mode 100644 index 00000000..fa48e881 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](2); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol new file mode 100644 index 00000000..71c41805 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);` + address[] memory a = new address[](1); + assert(true); + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol new file mode 100644 index 00000000..bd19211d --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;` + a[0] = msg.sender; + assert(true); + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol new file mode 100644 index 00000000..78fb8fff --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 0; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol new file mode 100644 index 00000000..636ec2a5 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 11; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/4/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/4/Ops/AOR/AOR.sol new file mode 100644 index 00000000..f5716560 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/4/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a / b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol new file mode 100644 index 00000000..55c70e64 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a + decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol new file mode 100644 index 00000000..d1dd4817 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol new file mode 100644 index 00000000..ab7d6850 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol new file mode 100644 index 00000000..0f717ac0 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol new file mode 100644 index 00000000..fc066a0b --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol new file mode 100644 index 00000000..5855f2b1 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol new file mode 100644 index 00000000..b0df3143 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol new file mode 100644 index 00000000..6db2ec1f --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();` + address[] memory b = this.foo(); + assert(true); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol new file mode 100644 index 00000000..1f74417d --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + assert(true); + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol new file mode 100644 index 00000000..f51cc82f --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/5/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/5/Ops/AOR/AOR.sol new file mode 100644 index 00000000..b6ab1ee7 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/5/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a % b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol new file mode 100644 index 00000000..6c5aaae7 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol new file mode 100644 index 00000000..ae66ae12 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol new file mode 100644 index 00000000..363381e5 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/6/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/6/Ops/AOR/AOR.sol new file mode 100644 index 00000000..3540a7a1 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/6/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + assert(true); + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/7/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/7/Ops/AOR/AOR.sol new file mode 100644 index 00000000..aadef707 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/7/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/8/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/8/Ops/AOR/AOR.sol new file mode 100644 index 00000000..7e16e706 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/8/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a * b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/9/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/9/Ops/AOR/AOR.sol new file mode 100644 index 00000000..3b94bb20 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/9/Ops/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a / b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/uor.json/gambit_results.json b/resources/regressions/uor.json/gambit_results.json new file mode 100644 index 00000000..9567b0eb --- /dev/null +++ b/resources/regressions/uor.json/gambit_results.json @@ -0,0 +1,16 @@ +[ + { + "description": "UnaryOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `function signed_bw_not(int256 x) public pure returns (int256) {`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", + "id": "1", + "name": "mutants/1/Ops/UOR/UOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + }, + { + "description": "UnaryOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `function signed_neg(int256 x) public pure returns (int256) {`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", + "id": "2", + "name": "mutants/2/Ops/UOR/UOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/uor.json/mutants.log b/resources/regressions/uor.json/mutants.log new file mode 100644 index 00000000..ac8f7394 --- /dev/null +++ b/resources/regressions/uor.json/mutants.log @@ -0,0 +1,2 @@ +1,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,13:7,~, - +2,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,18:7,~, ~ diff --git a/resources/regressions/uor.json/mutants/1/Ops/UOR/UOR.sol b/resources/regressions/uor.json/mutants/1/Ops/UOR/UOR.sol new file mode 100644 index 00000000..4066c6e6 --- /dev/null +++ b/resources/regressions/uor.json/mutants/1/Ops/UOR/UOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// Unary Operator Replacement +contract UOR { + // Expect no mutants: cannot negate an unsigned integer + function unsigned_bw_not(uint256 x) public pure returns (uint256) { + return ~x; + } + + // Expect a single mutant: -x + /// UnaryOperatorReplacement(`` |==> ` - `) of: `function signed_bw_not(int256 x) public pure returns (int256) {` + function signed_bw_not(int256 x) public pure returns (int256) { + return - ~x; + } + + // Expect a single mutant: ~x + function signed_neg(int256 x) public pure returns (int256) { + return -x; + } +} diff --git a/resources/regressions/uor.json/mutants/2/Ops/UOR/UOR.sol b/resources/regressions/uor.json/mutants/2/Ops/UOR/UOR.sol new file mode 100644 index 00000000..f2828633 --- /dev/null +++ b/resources/regressions/uor.json/mutants/2/Ops/UOR/UOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// Unary Operator Replacement +contract UOR { + // Expect no mutants: cannot negate an unsigned integer + function unsigned_bw_not(uint256 x) public pure returns (uint256) { + return ~x; + } + + // Expect a single mutant: -x + function signed_bw_not(int256 x) public pure returns (int256) { + return ~x; + } + + // Expect a single mutant: ~x + /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `function signed_neg(int256 x) public pure returns (int256) {` + function signed_neg(int256 x) public pure returns (int256) { + return ~ -x; + } +} From c3e6a8a0bf4d4ec9ee9f20be1ff3ebe7241152e5 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 26 Jul 2023 12:02:28 -0700 Subject: [PATCH 051/200] Fixed bugt in make_regressions --- scripts/make_regressions.sh | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/scripts/make_regressions.sh b/scripts/make_regressions.sh index ba109b91..fe93846d 100644 --- a/scripts/make_regressions.sh +++ b/scripts/make_regressions.sh @@ -35,6 +35,31 @@ print_vars() { } +double_check_make_regressions() { + printf "\033[33m[!!!] WARNING!\033[0m You are about to remake all regression tests!!\n" + printf " This will overwrite the \033[44;37;1m%s\033[0m directory!\n" "$REGRESSIONS" + printf " (\033[1mNote:\033[0m regressions are tracked by Git, so you can recover to a previous state)\n" + while true; do + printf "Do you wish to proceed? [Y/n] " + read -n 1 user_response + echo + + case $user_response in + y | Y) + printf "Continuing with make_regressions.sh...\n" + return 0 + ;; + n | N) + printf "Exiting without continuing\n" + exit 0 + ;; + *) + printf "Unrecognized response: '%s'\n" $user_response + ;; + esac + done +} + build_release() { old_dir=$(pwd) cd "$GAMBIT" || exit 1 @@ -114,12 +139,16 @@ summary() { echo "Removing old regressions" rm -rf "$REGRESSIONS" } - echo "Moving Temporary regessions to regressions location" - echo " $TMP_REGRESSIONS -> $REGRESSIONS" + echo + echo "[+] Moving Temporary regessions to regressions location" + echo " $TMP_REGRESSIONS -> $REGRESSIONS" + echo + mv "$TMP_REGRESSIONS" "$REGRESSIONS" clean_state fi } +double_check_make_regressions print_vars build_release clean_state From 1172a4bf9a255beb0d45f1738cba4fed94cce008 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 26 Jul 2023 13:29:50 -0700 Subject: [PATCH 052/200] Updated version to 1.0.0 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 283c6e4e..51a87efa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gambit" -version = "0.2.1" +version = "1.0.0" edition = "2021" authors = [ "Chandrakana Nandi ", From 82d0637c3770505b9deae497c11aff7393eab0d1 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 28 Jul 2023 12:59:46 -0700 Subject: [PATCH 053/200] Updated cli with deprecations, cleanre filename invocation --- src/cli.rs | 33 +++++++++--- src/lib.rs | 4 ++ src/main.rs | 144 ++++++++++++++++++++++++++++++++++++++++++++-------- src/util.rs | 10 ++++ 4 files changed, 163 insertions(+), 28 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 34ce8652..3c55608e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -50,6 +50,14 @@ fn default_num_mutants() -> Option { None } +fn default_include_paths() -> Vec { + vec![] +} + +fn default_import_paths() -> Vec { + vec![] +} + /// Mutate solidity code. /// /// The `mutate` command requires either a `--filename` or a `--json` @@ -64,8 +72,8 @@ fn default_num_mutants() -> Option { /// Only one filename can be specified from command line at a time, but multiple /// files can be specified in a configuration. #[derive(Debug, Clone, Parser, Deserialize, Serialize)] -#[command(rename_all = "kebab-case")] -#[serde(rename_all = "kebab-case", deny_unknown_fields)] +#[command(rename_all = "snake_case")] +#[serde(rename_all = "snake_case", deny_unknown_fields)] pub struct MutateParams { /// Json file with config #[arg(long, short, conflicts_with = "filename")] @@ -89,7 +97,7 @@ pub struct MutateParams { /// /// will work because `--sourceroot` is by default `.` which, in this case, /// expands to `/path/to`, which contains `file.sol`. - #[arg(long, short, conflicts_with = "json")] + #[arg(conflicts_with = "json")] pub filename: Option, /// If specified, randomly downsamples the number of mutants @@ -154,11 +162,20 @@ pub struct MutateParams { #[arg(long)] pub contract: Option, - /// Basepath argument to solc - #[arg(long)] + #[arg(long = "import-path", short = 'I')] + #[serde(default = "default_import_paths")] + pub import_paths: Vec, + + /// Deprecated: Basepath argument to solc (`--base-path`) + #[arg(long, hide = true)] pub solc_base_path: Option, - /// Allowpath argument to solc + /// Deprecated: Include paths argument to solc (`--include-paths`) + #[arg(long = "solc-include-path", hide = true)] + #[serde(default = "default_include_paths")] + pub solc_include_paths: Vec, + + /// Allowpath argument to solc used during validation #[arg(long)] pub solc_allow_paths: Option>, @@ -166,11 +183,12 @@ pub struct MutateParams { #[arg(long, num_args(1..))] pub solc_remappings: Option>, - /// Specify this + /// Do not validate mutants by invoking solc #[arg(long, default_value = "false")] #[serde(default = "default_skip_validate")] pub skip_validate: bool, + /// Log any invalid mutations that are encountered during mutant validation #[arg(long, default_value = "false")] #[serde(default = "default_log_invalid")] pub log_invalid: bool, @@ -186,6 +204,7 @@ pub struct GambitConfigFile { pub enum Command { Mutate(Box), // Maybe we want to do other things in the future like support checking mutants? Summary(SummaryParams), + Version, } /// Summarize mutants generated by a Gambit run. By default, all mutant ids are diff --git a/src/lib.rs b/src/lib.rs index 1ebdbd98..e3d1ce03 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -236,3 +236,7 @@ pub fn run_summary(params: SummaryParams) -> Result<(), Box Result<(), Box> { @@ -110,14 +110,68 @@ fn main() -> Result<(), Box> { None }; - // PARAM: solc_basepath - log::debug!(" [.] Resolving params.solc_base_path"); - let basepath = if let Some(basepaths) = ¶ms.solc_base_path { - Some(resolve_config_file_path(basepaths, &json_parent_directory)?) - .map(|bp| bp.to_str().unwrap().to_string()) - } else { - Some(json_parent_directory.to_str().unwrap().to_string()) - }; + log::debug!( + " [.] Resolving params.import_paths: {:?}", + params.solc_base_path + ); + + let mut import_paths = params + .import_paths + .iter() + .map(|ip| { + PathBuf::from(ip) + .canonicalize() + .expect(format!("Could not canonicalize path {}", ip).as_str()) + .to_str() + .unwrap() + .to_string() + }) + .collect::>(); + + log::debug!( + " [.] Resolving params.solc_base_path: {:?}", + params.solc_base_path + ); + if let Some(ref base_path) = params.solc_base_path { + print_deprecation_warning( + "solc_base_path", + "1.0.0", + "Use import_path instead", + ); + let base_path = PathBuf::from(&base_path) + .canonicalize() + .expect(format!("Could not canonicalize path {}", base_path).as_str()) + .to_str() + .unwrap() + .to_string(); + if !import_paths.contains(&base_path) { + import_paths.push(base_path); + } + params.solc_base_path = None; + } + + if !params.solc_include_paths.is_empty() { + print_deprecation_warning( + "solc_include_path", + "1.0.0", + "Use import_path instead", + ); + for include_path in params.solc_include_paths.iter() { + let include_path = PathBuf::from(&include_path) + .canonicalize() + .expect( + format!("Could not canonicalize path {}", include_path) + .as_str(), + ) + .to_str() + .unwrap() + .to_string(); + if !import_paths.contains(&include_path) { + import_paths.push(include_path); + } + } + params.solc_include_paths = vec![]; + } // PARAM: solc_remappings log::debug!(" [.] Resolving params.solc_remapping"); @@ -142,7 +196,7 @@ fn main() -> Result<(), Box> { params.filename = Some(filepath.to_str().unwrap().to_string()); params.outdir = Some(outdir); params.solc_allow_paths = allow_paths; - params.solc_base_path = basepath; + params.import_paths = import_paths; params.solc_remappings = remapping; } run_mutate(mutate_params)?; @@ -191,22 +245,67 @@ fn main() -> Result<(), Box> { solc_allowpaths ); + log::debug!( + " [.] Resolving params.import_paths: {:?}", + params.solc_base_path + ); + + let mut import_paths = params + .import_paths + .iter() + .map(|ip| { + PathBuf::from(ip) + .canonicalize() + .expect(format!("Could not canonicalize path {}", ip).as_str()) + .to_str() + .unwrap() + .to_string() + }) + .collect::>(); + log::debug!( " [.] Resolving params.solc_base_path: {:?}", params.solc_base_path ); - let solc_base_path = params.solc_base_path.map(|bp| { - PathBuf::from(bp) + if let Some(ref base_path) = params.solc_base_path { + print_deprecation_warning( + "--solc_base_path", + "1.0.0", + "Use --import_path/-I instead", + ); + let base_path = PathBuf::from(&base_path) .canonicalize() - .unwrap() + .expect(format!("Could not canonicalize path {}", base_path).as_str()) .to_str() .unwrap() - .to_string() - }); - log::debug!( - " [.] Resolved params.solc_base_path to {:?}", - solc_base_path - ); + .to_string(); + if !import_paths.contains(&base_path) { + import_paths.push(base_path); + } + params.solc_base_path = None; + } + + if !params.solc_include_paths.is_empty() { + print_deprecation_warning( + "--solc_include_path", + "1.0.0", + "Use --import_path/-I instead", + ); + for include_path in params.solc_include_paths.iter() { + let include_path = PathBuf::from(&include_path) + .canonicalize() + .expect( + format!("Could not canonicalize path {}", include_path).as_str(), + ) + .to_str() + .unwrap() + .to_string(); + if !import_paths.contains(&include_path) { + import_paths.push(include_path); + } + } + params.solc_include_paths = vec![]; + } log::debug!(" [.] Resolving params.solc_remapping"); let solc_remapping = params.solc_remappings.as_ref().map(|rms| { @@ -228,7 +327,7 @@ fn main() -> Result<(), Box> { params.filename = Some(filepath.to_str().unwrap().to_string()); params.outdir = Some(outdir); params.solc_allow_paths = solc_allowpaths; - params.solc_base_path = solc_base_path; + params.import_paths = import_paths; params.solc_remappings = solc_remapping; run_mutate(vec![*params])?; @@ -237,6 +336,9 @@ fn main() -> Result<(), Box> { Command::Summary(params) => { run_summary(params)?; } + Command::Version => { + print_version(); + } } Ok(()) } diff --git a/src/util.rs b/src/util.rs index 40c33247..2aebefa5 100644 --- a/src/util.rs +++ b/src/util.rs @@ -399,3 +399,13 @@ pub fn get_import_path(resolver: &FileResolver, import_no: usize) -> Option None, } } + +/// Print a deprecation warning to stderr +pub fn print_deprecation_warning(argument: &str, version: &str, message: &str) { + let yellow = ansi_term::Color::Yellow; + let text = yellow.paint(format!( + "Deprecation Warning: {}\n `{}` was deprecated in Gambit v{}. {}", + argument, argument, version, message + )); + eprintln!("{}", text) +} From 26d22dc74fd0015436c24e564f7f4d4765ef7b9b Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 28 Jul 2023 13:00:03 -0700 Subject: [PATCH 054/200] Newer solang version --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 51a87efa..5753bfb5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ authors = [ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -solang = { git = "https://github.com/hyperledger/solang.git", rev = "08128dffcb4ce18e7de2cfc61c84a75e1650c061", default-features = false } +solang = { git = "https://github.com/hyperledger/solang.git", rev = "ffb8844f8a8f7f985a6f923156c5443e66eb6e40", default-features = false } ansi_term = "0.12" clap = { version = "4.0.29", features = ["derive"] } clap_complete = "4.0.6" @@ -30,7 +30,7 @@ scanner-rust = "2.0.16" serde = { version = "1", features = ["derive"] } serde_json = "1" similar = "2" -solang-parser = { git = "https://github.com/hyperledger/solang.git", rev = "08128dffcb4ce18e7de2cfc61c84a75e1650c061" } +solang-parser = { git = "https://github.com/hyperledger/solang.git", rev = "ffb8844f8a8f7f985a6f923156c5443e66eb6e40" } strum = "0.24.1" strum_macros = "0.24.3" tempfile = "3" From 1774302e8fa462b11eca64fe378bfc37fcd7e9da Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 28 Jul 2023 14:04:09 -0700 Subject: [PATCH 055/200] Refactored main function --- src/main.rs | 630 ++++++++++++++++++++++++------------------------- src/mutator.rs | 1 + 2 files changed, 310 insertions(+), 321 deletions(-) diff --git a/src/main.rs b/src/main.rs index 2f1ca336..4b270ba4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,328 +9,11 @@ use gambit::{ fn main() -> Result<(), Box> { let _ = env_logger::builder().try_init(); match Command::parse() { - Command::Mutate(mut params) => { - // The user has specified a configuration file. - // - // Configuration files have two forms: (1) a JSON array of JSON - // objects, where each object represents a `MutateParams` struct, - // and (2) a single JSON object representing a `MutateParams` - // struct. The second case is syntactic sugar for an array with a - // single object. - // - // To tell the difference we deserialzie as a `serde_json::Value` - // and check if it's an array or an object and create a - // `Vec` based on this. - if let Some(json_path) = ¶ms.json { - log::info!("Running from configuration"); - // Run from config file - let json_contents = std::fs::read_to_string(json_path)?; - let json: serde_json::Value = serde_json::from_reader(json_contents.as_bytes())?; - log::info!("Read configuration json: {:#?}", json); - - let mut mutate_params: Vec = if json.is_array() { - serde_json::from_str(&json_contents)? - } else if json.is_object() { - vec![serde_json::from_str(&json_contents)?] - } else { - panic!("Invalid configuration file: must be an array or an object") - }; - log::debug!("Deserialized JSON into MutateParams: {:#?}", &mutate_params); - - let config_pb = PathBuf::from(&json_path); - let config_pb = config_pb.canonicalize()?; - let config_parent_pb = config_pb.parent().unwrap(); - let json_parent_directory = config_parent_pb.canonicalize()?; - - log::info!("config: {:?}", config_pb); - log::info!("canonical config: {:?}", config_pb); - log::info!("config parent: {}", config_parent_pb.display()); - - log::info!("Performing Path Resolution for Configurations"); - log::info!("Found {} configurations", mutate_params.len()); - - for (i, params) in mutate_params.iter_mut().enumerate() { - // Source Root Resolution - log::info!("Configuration {}", i + 1); - - // PARAM: Filename - log::info!(" [.] Resolving params.filename"); - let filename = params - .filename - .clone() - .expect("No filename in configuration"); - let filepath = PathBuf::from(&filename); - let filepath = if filepath.is_absolute() { - filepath - } else { - let joined = config_parent_pb.join(filepath); - joined - .canonicalize() - .expect(format!("Couldn't find file at {}", joined.display()).as_str()) - }; - - // PARAM: Outdir - // + If an absolute `outdir` is specified, normalize it - // + If a relative (non-absolute) `outdir` is specified, - // normalize it with respect to the JSON parent directory - // + If no `outdir` is specified, use `$CWD/gambit_out` - // - // Note: we cannot use `resolve_config_file_path` because - // `outdir` might not exist yet - - log::debug!(" [.] Resolving params.outdir"); - let outdir_path = match ¶ms.outdir { - Some(outdir) => { - let outdir_path = PathBuf::from(outdir); - if outdir_path.is_absolute() { - normalize_path(&outdir_path) - } else { - normalize_path(&json_parent_directory.join(&outdir_path)) - } - } - None => normalize_path( - &PathBuf::from(".").join(default_gambit_output_directory()), - ), - }; - let outdir = outdir_path.to_str().unwrap().to_string(); - log::debug!( - " [->] Resolved path `{:?}` to `{}`", - ¶ms.outdir.clone(), - &outdir, - ); - - // PARAM: solc_allowpaths - log::debug!(" [.] Resolving params.solc_allow_paths"); - let allow_paths = if let Some(allow_paths) = ¶ms.solc_allow_paths { - Some(resolve_config_file_paths( - allow_paths, - &json_parent_directory, - )?) - } else { - None - }; - - log::debug!( - " [.] Resolving params.import_paths: {:?}", - params.solc_base_path - ); - - let mut import_paths = params - .import_paths - .iter() - .map(|ip| { - PathBuf::from(ip) - .canonicalize() - .expect(format!("Could not canonicalize path {}", ip).as_str()) - .to_str() - .unwrap() - .to_string() - }) - .collect::>(); - - log::debug!( - " [.] Resolving params.solc_base_path: {:?}", - params.solc_base_path - ); - if let Some(ref base_path) = params.solc_base_path { - print_deprecation_warning( - "solc_base_path", - "1.0.0", - "Use import_path instead", - ); - let base_path = PathBuf::from(&base_path) - .canonicalize() - .expect(format!("Could not canonicalize path {}", base_path).as_str()) - .to_str() - .unwrap() - .to_string(); - if !import_paths.contains(&base_path) { - import_paths.push(base_path); - } - params.solc_base_path = None; - } - - if !params.solc_include_paths.is_empty() { - print_deprecation_warning( - "solc_include_path", - "1.0.0", - "Use import_path instead", - ); - for include_path in params.solc_include_paths.iter() { - let include_path = PathBuf::from(&include_path) - .canonicalize() - .expect( - format!("Could not canonicalize path {}", include_path) - .as_str(), - ) - .to_str() - .unwrap() - .to_string(); - if !import_paths.contains(&include_path) { - import_paths.push(include_path); - } - } - params.solc_include_paths = vec![]; - } - - // PARAM: solc_remappings - log::debug!(" [.] Resolving params.solc_remapping"); - let remapping: Option> = - params.solc_remappings.as_ref().map(|remapping| { - remapping - .iter() - .map(|rm| { - repair_remapping( - rm.as_str(), - Some(json_parent_directory.to_str().unwrap()), - ) - }) - .collect() - }); - - // Finally, update params with resolved source root and filename. - // (We don't update earlier to preserve the state of params - // for error reporting: reporting the parsed in value of - // `params` will be more helpful to the end user than - // reporting the modified value of params). - params.filename = Some(filepath.to_str().unwrap().to_string()); - params.outdir = Some(outdir); - params.solc_allow_paths = allow_paths; - params.import_paths = import_paths; - params.solc_remappings = remapping; - } - run_mutate(mutate_params)?; + Command::Mutate(params) => { + if params.json.is_some() { + run_mutate_on_json(params)?; } else { - log::info!("Running CLI MutateParams: {:#?}", ¶ms); - - // # Path Resolution for CLI Provided Parameters - log::info!(" Performing File Resolution"); - // let filename = params.filename.expect("No provided filename"); - - log::debug!(" [.] Resolving params.filename"); - let filename = params - .filename - .clone() - .expect("No filename in configuration"); - let filepath = PathBuf::from(&filename).canonicalize().unwrap(); - - log::debug!(" [.] Resolving params.outdir {:?}", ¶ms.outdir); - - let outdir = normalize_path(&PathBuf::from( - ¶ms.outdir.unwrap_or(default_gambit_output_directory()), - )) - .to_str() - .unwrap() - .to_string(); - log::debug!(" [.] Resolved params.outdir to {}", outdir); - - log::debug!( - " [.] Resolving params.solc_allowpaths: {:?}", - params.solc_allow_paths - ); - let solc_allowpaths = params.solc_allow_paths.map(|aps| { - aps.iter() - .map(|p| { - PathBuf::from(p) - .canonicalize() - .unwrap() - .to_str() - .unwrap() - .to_string() - }) - .collect() - }); - log::debug!( - " [.] Resolved params.solc_allowpaths to {:?}", - solc_allowpaths - ); - - log::debug!( - " [.] Resolving params.import_paths: {:?}", - params.solc_base_path - ); - - let mut import_paths = params - .import_paths - .iter() - .map(|ip| { - PathBuf::from(ip) - .canonicalize() - .expect(format!("Could not canonicalize path {}", ip).as_str()) - .to_str() - .unwrap() - .to_string() - }) - .collect::>(); - - log::debug!( - " [.] Resolving params.solc_base_path: {:?}", - params.solc_base_path - ); - if let Some(ref base_path) = params.solc_base_path { - print_deprecation_warning( - "--solc_base_path", - "1.0.0", - "Use --import_path/-I instead", - ); - let base_path = PathBuf::from(&base_path) - .canonicalize() - .expect(format!("Could not canonicalize path {}", base_path).as_str()) - .to_str() - .unwrap() - .to_string(); - if !import_paths.contains(&base_path) { - import_paths.push(base_path); - } - params.solc_base_path = None; - } - - if !params.solc_include_paths.is_empty() { - print_deprecation_warning( - "--solc_include_path", - "1.0.0", - "Use --import_path/-I instead", - ); - for include_path in params.solc_include_paths.iter() { - let include_path = PathBuf::from(&include_path) - .canonicalize() - .expect( - format!("Could not canonicalize path {}", include_path).as_str(), - ) - .to_str() - .unwrap() - .to_string(); - if !import_paths.contains(&include_path) { - import_paths.push(include_path); - } - } - params.solc_include_paths = vec![]; - } - - log::debug!(" [.] Resolving params.solc_remapping"); - let solc_remapping = params.solc_remappings.as_ref().map(|rms| { - rms.iter() - .map(|rm| repair_remapping(rm.as_str(), None)) - .collect() - }); - log::debug!( - " [->] Resolved params.solc_remapping:\n {:#?} to \n {:#?}", - ¶ms.solc_remappings, - &solc_remapping - ); - - // Finally, update params with resolved source root and filename. - // (We don't update earlier to preserve the state of params - // for error reporting: reporting the parsed in value of - // `params` will be more helpful to the end user than - // reporting the modified value of params). - params.filename = Some(filepath.to_str().unwrap().to_string()); - params.outdir = Some(outdir); - params.solc_allow_paths = solc_allowpaths; - params.import_paths = import_paths; - params.solc_remappings = solc_remapping; - - run_mutate(vec![*params])?; + run_mutate_on_filename(params)?; } } Command::Summary(params) => { @@ -378,3 +61,308 @@ fn resolve_config_file_paths( } Ok(result) } + +fn run_mutate_on_json(params: Box) -> Result<(), Box> { + // The user has specified a configuration file. + // + // Configuration files have two forms: (1) a JSON array of JSON + // objects, where each object represents a `MutateParams` struct, + // and (2) a single JSON object representing a `MutateParams` + // struct. The second case is syntactic sugar for an array with a + // single object. + // + // To tell the difference we deserialzie as a `serde_json::Value` + // and check if it's an array or an object and create a + // `Vec` based on this. + let json_path = ¶ms.json.ok_or("No JSON Path")?; + log::info!("Running from configuration"); + // Run from config file + let json_contents = std::fs::read_to_string(json_path)?; + let json: serde_json::Value = serde_json::from_reader(json_contents.as_bytes())?; + log::info!("Read configuration json: {:#?}", json); + + let mut mutate_params: Vec = if json.is_array() { + serde_json::from_str(&json_contents)? + } else if json.is_object() { + vec![serde_json::from_str(&json_contents)?] + } else { + panic!("Invalid configuration file: must be an array or an object") + }; + log::debug!("Deserialized JSON into MutateParams: {:#?}", &mutate_params); + + let config_pb = PathBuf::from(&json_path); + let config_pb = config_pb.canonicalize()?; + let config_parent_pb = config_pb.parent().unwrap(); + let json_parent_directory = config_parent_pb.canonicalize()?; + + log::info!("config: {:?}", config_pb); + log::info!("canonical config: {:?}", config_pb); + log::info!("config parent: {}", config_parent_pb.display()); + + log::info!("Performing Path Resolution for Configurations"); + log::info!("Found {} configurations", mutate_params.len()); + + for (i, params) in mutate_params.iter_mut().enumerate() { + // Source Root Resolution + log::info!("Configuration {}", i + 1); + + // PARAM: Filename + log::info!(" [.] Resolving params.filename"); + let filename = params + .filename + .clone() + .expect("No filename in configuration"); + let filepath = PathBuf::from(&filename); + let filepath = if filepath.is_absolute() { + filepath + } else { + let joined = config_parent_pb.join(filepath); + joined + .canonicalize() + .expect(format!("Couldn't find file at {}", joined.display()).as_str()) + }; + + // PARAM: Outdir + // + If an absolute `outdir` is specified, normalize it + // + If a relative (non-absolute) `outdir` is specified, + // normalize it with respect to the JSON parent directory + // + If no `outdir` is specified, use `$CWD/gambit_out` + // + // Note: we cannot use `resolve_config_file_path` because + // `outdir` might not exist yet + + log::debug!(" [.] Resolving params.outdir"); + let outdir_path = match ¶ms.outdir { + Some(outdir) => { + let outdir_path = PathBuf::from(outdir); + if outdir_path.is_absolute() { + normalize_path(&outdir_path) + } else { + normalize_path(&json_parent_directory.join(&outdir_path)) + } + } + None => normalize_path(&PathBuf::from(".").join(default_gambit_output_directory())), + }; + let outdir = outdir_path.to_str().unwrap().to_string(); + log::debug!( + " [->] Resolved path `{:?}` to `{}`", + ¶ms.outdir.clone(), + &outdir, + ); + + // PARAM: solc_allowpaths + log::debug!(" [.] Resolving params.solc_allow_paths"); + let allow_paths = if let Some(allow_paths) = ¶ms.solc_allow_paths { + Some(resolve_config_file_paths( + allow_paths, + &json_parent_directory, + )?) + } else { + None + }; + + log::debug!( + " [.] Resolving params.import_paths: {:?}", + params.solc_base_path + ); + + let mut import_paths = params + .import_paths + .iter() + .map(|ip| { + PathBuf::from(ip) + .canonicalize() + .expect(format!("Could not canonicalize path {}", ip).as_str()) + .to_str() + .unwrap() + .to_string() + }) + .collect::>(); + + log::debug!( + " [.] Resolving params.solc_base_path: {:?}", + params.solc_base_path + ); + if let Some(ref base_path) = params.solc_base_path { + print_deprecation_warning("solc_base_path", "1.0.0", "Use import_path instead"); + let base_path = PathBuf::from(&base_path) + .canonicalize() + .expect(format!("Could not canonicalize path {}", base_path).as_str()) + .to_str() + .unwrap() + .to_string(); + if !import_paths.contains(&base_path) { + import_paths.push(base_path); + } + params.solc_base_path = None; + } + + if !params.solc_include_paths.is_empty() { + print_deprecation_warning("solc_include_path", "1.0.0", "Use import_path instead"); + for include_path in params.solc_include_paths.iter() { + let include_path = PathBuf::from(&include_path) + .canonicalize() + .expect(format!("Could not canonicalize path {}", include_path).as_str()) + .to_str() + .unwrap() + .to_string(); + if !import_paths.contains(&include_path) { + import_paths.push(include_path); + } + } + params.solc_include_paths = vec![]; + } + + // PARAM: solc_remappings + log::debug!(" [.] Resolving params.solc_remapping"); + let remapping: Option> = params.solc_remappings.as_ref().map(|remapping| { + remapping + .iter() + .map(|rm| { + repair_remapping(rm.as_str(), Some(json_parent_directory.to_str().unwrap())) + }) + .collect() + }); + + // Finally, update params with resolved source root and filename. + // (We don't update earlier to preserve the state of params + // for error reporting: reporting the parsed in value of + // `params` will be more helpful to the end user than + // reporting the modified value of params). + params.filename = Some(filepath.to_str().unwrap().to_string()); + params.outdir = Some(outdir); + params.solc_allow_paths = allow_paths; + params.import_paths = import_paths; + params.solc_remappings = remapping; + } + run_mutate(mutate_params)?; + Ok(()) +} + +fn run_mutate_on_filename(mut params: Box) -> Result<(), Box> { + log::info!("Running CLI MutateParams: {:#?}", ¶ms); + + // # Path Resolution for CLI Provided Parameters + log::info!(" Performing File Resolution"); + // let filename = params.filename.expect("No provided filename"); + + log::debug!(" [.] Resolving params.filename"); + let filename = params + .filename + .clone() + .expect("No filename in configuration"); + let filepath = PathBuf::from(&filename).canonicalize().unwrap(); + + log::debug!(" [.] Resolving params.outdir {:?}", ¶ms.outdir); + + let outdir = normalize_path(&PathBuf::from( + ¶ms.outdir.unwrap_or(default_gambit_output_directory()), + )) + .to_str() + .unwrap() + .to_string(); + log::debug!(" [.] Resolved params.outdir to {}", outdir); + + log::debug!( + " [.] Resolving params.solc_allowpaths: {:?}", + params.solc_allow_paths + ); + let solc_allowpaths = params.solc_allow_paths.map(|aps| { + aps.iter() + .map(|p| { + PathBuf::from(p) + .canonicalize() + .unwrap() + .to_str() + .unwrap() + .to_string() + }) + .collect() + }); + log::debug!( + " [.] Resolved params.solc_allowpaths to {:?}", + solc_allowpaths + ); + + log::debug!( + " [.] Resolving params.import_paths: {:?}", + params.solc_base_path + ); + + let mut import_paths = params + .import_paths + .iter() + .map(|ip| { + PathBuf::from(ip) + .canonicalize() + .expect(format!("Could not canonicalize path {}", ip).as_str()) + .to_str() + .unwrap() + .to_string() + }) + .collect::>(); + + log::debug!( + " [.] Resolving params.solc_base_path: {:?}", + params.solc_base_path + ); + if let Some(ref base_path) = params.solc_base_path { + print_deprecation_warning("--solc_base_path", "1.0.0", "Use --import_path/-I instead"); + let base_path = PathBuf::from(&base_path) + .canonicalize() + .expect(format!("Could not canonicalize path {}", base_path).as_str()) + .to_str() + .unwrap() + .to_string(); + if !import_paths.contains(&base_path) { + import_paths.push(base_path); + } + params.solc_base_path = None; + } + + if !params.solc_include_paths.is_empty() { + print_deprecation_warning( + "--solc_include_path", + "1.0.0", + "Use --import_path/-I instead", + ); + for include_path in params.solc_include_paths.iter() { + let include_path = PathBuf::from(&include_path) + .canonicalize() + .expect(format!("Could not canonicalize path {}", include_path).as_str()) + .to_str() + .unwrap() + .to_string(); + if !import_paths.contains(&include_path) { + import_paths.push(include_path); + } + } + params.solc_include_paths = vec![]; + } + + log::debug!(" [.] Resolving params.solc_remapping"); + let solc_remapping = params.solc_remappings.as_ref().map(|rms| { + rms.iter() + .map(|rm| repair_remapping(rm.as_str(), None)) + .collect() + }); + log::debug!( + " [->] Resolved params.solc_remapping:\n {:#?} to \n {:#?}", + ¶ms.solc_remappings, + &solc_remapping + ); + + // Finally, update params with resolved source root and filename. + // (We don't update earlier to preserve the state of params + // for error reporting: reporting the parsed in value of + // `params` will be more helpful to the end user than + // reporting the modified value of params). + params.filename = Some(filepath.to_str().unwrap().to_string()); + params.outdir = Some(outdir); + params.solc_allow_paths = solc_allowpaths; + params.import_paths = import_paths; + params.solc_remappings = solc_remapping; + + run_mutate(vec![*params])?; + Ok(()) +} diff --git a/src/mutator.rs b/src/mutator.rs index 9d20864c..7b2ab9c8 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -101,6 +101,7 @@ impl From<&MutateParams> for Mutator { .into(), ); solc.with_optimize(value.solc_optimize); + if let Some(basepath) = value.solc_base_path.clone() { solc.with_basepath(basepath); } From 4125b0ea44e025af5ff860c859796770bbdc78f2 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 28 Jul 2023 14:05:20 -0700 Subject: [PATCH 056/200] Updated confs with snake_case --- benchmarks/config-jsons/aor.json | 4 +++- benchmarks/config-jsons/bor.json | 4 +++- benchmarks/config-jsons/edc.json | 4 +++- benchmarks/config-jsons/lor.json | 4 +++- benchmarks/config-jsons/lvr.json | 4 +++- benchmarks/config-jsons/ror.json | 4 +++- benchmarks/config-jsons/test_multiple_contracts_1.json | 8 ++++++-- benchmarks/config-jsons/test_multiple_contracts_2.json | 8 ++++++-- benchmarks/config-jsons/test_multiple_contracts_3.json | 8 ++++++-- benchmarks/config-jsons/test_multiple_contracts_4.json | 8 ++++++-- benchmarks/config-jsons/test_multiple_files_1.json | 8 ++++++-- benchmarks/config-jsons/uor.json | 4 +++- 12 files changed, 51 insertions(+), 17 deletions(-) diff --git a/benchmarks/config-jsons/aor.json b/benchmarks/config-jsons/aor.json index 5937a06d..ba4945cd 100644 --- a/benchmarks/config-jsons/aor.json +++ b/benchmarks/config-jsons/aor.json @@ -1,7 +1,9 @@ [ { "filename": "../Ops/AOR/AOR.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "mutations": [ "aor" ] diff --git a/benchmarks/config-jsons/bor.json b/benchmarks/config-jsons/bor.json index 73688b9f..9e3b7f31 100644 --- a/benchmarks/config-jsons/bor.json +++ b/benchmarks/config-jsons/bor.json @@ -1,7 +1,9 @@ [ { "filename": "../Ops/BOR/BOR.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "mutations": [ "bor" ] diff --git a/benchmarks/config-jsons/edc.json b/benchmarks/config-jsons/edc.json index 51487b7d..2bc430c7 100644 --- a/benchmarks/config-jsons/edc.json +++ b/benchmarks/config-jsons/edc.json @@ -1,7 +1,9 @@ [ { "filename": "../Ops/EDC/EDC.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "mutations": [ "edc" ] diff --git a/benchmarks/config-jsons/lor.json b/benchmarks/config-jsons/lor.json index 995c1be3..daccb97d 100644 --- a/benchmarks/config-jsons/lor.json +++ b/benchmarks/config-jsons/lor.json @@ -1,7 +1,9 @@ [ { "filename": "../Ops/LOR/LOR.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "mutations": [ "logical-operator-replacement" ] diff --git a/benchmarks/config-jsons/lvr.json b/benchmarks/config-jsons/lvr.json index 2af8215d..1f93f802 100644 --- a/benchmarks/config-jsons/lvr.json +++ b/benchmarks/config-jsons/lvr.json @@ -1,7 +1,9 @@ [ { "filename": "../Ops/LVR/LVR.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "mutations": [ "lvr" ] diff --git a/benchmarks/config-jsons/ror.json b/benchmarks/config-jsons/ror.json index f6e72d29..759613fe 100644 --- a/benchmarks/config-jsons/ror.json +++ b/benchmarks/config-jsons/ror.json @@ -1,7 +1,9 @@ [ { "filename": "../Ops/ROR/ROR.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "mutations": [ "relational-operator-replacement" ] diff --git a/benchmarks/config-jsons/test_multiple_contracts_1.json b/benchmarks/config-jsons/test_multiple_contracts_1.json index 36dee39c..e9c49def 100644 --- a/benchmarks/config-jsons/test_multiple_contracts_1.json +++ b/benchmarks/config-jsons/test_multiple_contracts_1.json @@ -1,7 +1,9 @@ [ { "filename": "../MultipleContracts/C.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "contract": "Utils", "functions": [ "getarray" @@ -10,7 +12,9 @@ }, { "filename": "../MultipleContracts/C.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "contract": "C", "functions": [ "getarray", diff --git a/benchmarks/config-jsons/test_multiple_contracts_2.json b/benchmarks/config-jsons/test_multiple_contracts_2.json index b87e5e2c..356bbba4 100644 --- a/benchmarks/config-jsons/test_multiple_contracts_2.json +++ b/benchmarks/config-jsons/test_multiple_contracts_2.json @@ -1,7 +1,9 @@ [ { "filename": "../MultipleContracts/C.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "contract": "Utils", "functions": [ "add" @@ -10,7 +12,9 @@ }, { "filename": "../MultipleContracts/C.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "contract": "C", "functions": [ "get10PowerDecimals" diff --git a/benchmarks/config-jsons/test_multiple_contracts_3.json b/benchmarks/config-jsons/test_multiple_contracts_3.json index bfa0b09c..cea27292 100644 --- a/benchmarks/config-jsons/test_multiple_contracts_3.json +++ b/benchmarks/config-jsons/test_multiple_contracts_3.json @@ -1,13 +1,17 @@ [ { "filename": "../MultipleContracts/C.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "contract": "Utils", "solc": "solc" }, { "filename": "../MultipleContracts/C.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "contract": "C", "solc": "solc" } diff --git a/benchmarks/config-jsons/test_multiple_contracts_4.json b/benchmarks/config-jsons/test_multiple_contracts_4.json index 4ea50e82..17c43e14 100644 --- a/benchmarks/config-jsons/test_multiple_contracts_4.json +++ b/benchmarks/config-jsons/test_multiple_contracts_4.json @@ -1,7 +1,9 @@ [ { "filename": "../MultipleContracts/C.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "contract": "Utils", "functions": [ "add" @@ -14,7 +16,9 @@ }, { "filename": "../MultipleContracts/C.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "contract": "C", "functions": [ "add" diff --git a/benchmarks/config-jsons/test_multiple_files_1.json b/benchmarks/config-jsons/test_multiple_files_1.json index ab78b973..00830eca 100644 --- a/benchmarks/config-jsons/test_multiple_files_1.json +++ b/benchmarks/config-jsons/test_multiple_files_1.json @@ -1,12 +1,16 @@ [ { "filename": "../Ops/AOR/AOR.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "contract": "AOR" }, { "filename": "../MultipleContracts/C.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "contract": "C", "functions": [ "getarray" diff --git a/benchmarks/config-jsons/uor.json b/benchmarks/config-jsons/uor.json index 4696c241..5df4d65a 100644 --- a/benchmarks/config-jsons/uor.json +++ b/benchmarks/config-jsons/uor.json @@ -1,7 +1,9 @@ [ { "filename": "../Ops/UOR/UOR.sol", - "solc-base-path": "..", + "import_paths": [ + ".." + ], "mutations": [ "uor" ] From 87cc081b5fb48d37cc7fd97edac33523a7305500 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 28 Jul 2023 14:32:20 -0700 Subject: [PATCH 057/200] Fixed import_path bug --- benchmarks/config-jsons/all_ops.json | 28 ++++++++++++++++------ src/main.rs | 35 +++++++++++++++++++++------- src/mutator.rs | 17 +++++++------- 3 files changed, 55 insertions(+), 25 deletions(-) diff --git a/benchmarks/config-jsons/all_ops.json b/benchmarks/config-jsons/all_ops.json index a98d91a8..2a0a3ea2 100644 --- a/benchmarks/config-jsons/all_ops.json +++ b/benchmarks/config-jsons/all_ops.json @@ -1,49 +1,63 @@ [ { "filename": "../Ops/AOR/AOR.sol", - "solc-base-path": "../Ops", + "import_paths": [ + "../Ops" + ], "mutations": [ "AOR" ] }, { "filename": "../Ops/BOR/BOR.sol", - "solc-base-path": "../Ops", + "import_paths": [ + "../Ops" + ], "mutations": [ "BOR" ] }, { "filename": "../Ops/EDC/EDC.sol", - "solc-base-path": "../Ops", + "import_paths": [ + "../Ops" + ], "mutations": [ "EDC" ] }, { "filename": "../Ops/LOR/LOR.sol", - "solc-base-path": "../Ops", + "import_paths": [ + "../Ops" + ], "mutations": [ "LOR" ] }, { "filename": "../Ops/LVR/LVR.sol", - "solc-base-path": "../Ops", + "import_paths": [ + "../Ops" + ], "mutations": [ "LVR" ] }, { "filename": "../Ops/ROR/ROR.sol", - "solc-base-path": "../Ops", + "import_paths": [ + "../Ops" + ], "mutations": [ "ROR" ] }, { "filename": "../Ops/UOR/UOR.sol", - "solc-base-path": "../Ops", + "import_paths": [ + "../Ops" + ], "mutations": [ "UOR" ] diff --git a/src/main.rs b/src/main.rs index 4b270ba4..aa9145c7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -170,9 +170,14 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box) -> Result<(), Box) -> Result<(), Box) -> Result<(), Box] Resolved params.import_paths: {:?}", import_paths); + // PARAM: solc_remappings log::debug!(" [.] Resolving params.solc_remapping"); let remapping: Option> = params.solc_remappings.as_ref().map(|remapping| { diff --git a/src/mutator.rs b/src/mutator.rs index 7b2ab9c8..d8d4d30c 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -140,16 +140,15 @@ impl From<&MutateParams> for Mutator { let mut file_resolver = FileResolver::new(); // Add base path to file resolver - match &value.solc_base_path { - Some(base_path) => { + if value.import_paths.is_empty() { + file_resolver + .add_import_path(&PathBuf::from("")) + .expect(format!("Failed to add import path {}", "").as_str()); + } else { + for import_path in value.import_paths.iter() { file_resolver - .add_import_path(&PathBuf::from(base_path)) - .expect( - format!("Failed to add base_path as import path: {}", base_path).as_str(), - ); - } - None => { - file_resolver.add_import_path(&PathBuf::from(".")).unwrap(); + .add_import_path(&PathBuf::from(import_path)) + .expect(format!("Failed to add import path {}", import_path).as_str()); } } From be233516067bf23b102f1e25963088bad06541f2 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 28 Jul 2023 15:43:16 -0700 Subject: [PATCH 058/200] modified validation to only use solc values, not manually specified args --- src/compile.rs | 113 +++++++++++++++++++++++++++++++------------------ src/filter.rs | 14 +++--- src/lib.rs | 5 ++- 3 files changed, 83 insertions(+), 49 deletions(-) diff --git a/src/compile.rs b/src/compile.rs index 351b504b..8cc812b1 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -19,11 +19,20 @@ static OPTIMIZE: &str = "--optimize"; pub struct Solc { /// The solc executable string pub solc: String, + /// The output directory for solc to compile to (-o|--output-dir in solc) output_directory: PathBuf, + /// The root of the virtual filesystem (--base-path in solc) basepath: Option, + /// Make additional source directory availabe to the default import callback (--include-path in solc) + include_paths: Vec, + /// Allow a given path for imports (--allow-paths in solc) allow_paths: Option>, + /// Specify remappings (xyz=/path/to/xyz in solc) remappings: Option>, + /// Enable optimization flag (--optimize in solc) optimize: bool, + /// Bypass all other flags and manually specify raw arguments passed to solc + raw_args: Option>, } impl Solc { @@ -32,9 +41,11 @@ impl Solc { solc, output_directory, basepath: None, + include_paths: vec![], allow_paths: None, remappings: None, optimize: false, + raw_args: None, } } @@ -49,11 +60,30 @@ impl Solc { } } + pub fn with_output_directory(&mut self, output_directory: PathBuf) -> &Self { + self.output_directory = output_directory; + self + } + pub fn with_basepath(&mut self, basepath: String) -> &Self { self.basepath = Some(basepath); self } + pub fn with_include_path(&mut self, include_path: String) -> &Self { + self.include_paths.push(include_path); + self + } + + pub fn with_import_path(&mut self, import_path: String) -> &Self { + if self.basepath.is_none() { + self.basepath = Some(import_path); + } else { + self.include_paths.push(import_path); + } + self + } + pub fn with_allow_paths(&mut self, allow_paths: Vec) -> &Self { self.allow_paths = Some(allow_paths); self @@ -68,17 +98,18 @@ impl Solc { self.optimize = optimize; self } + + pub fn with_raw_args(&mut self, raw_args: Vec) -> &Self { + self.raw_args = Some(raw_args); + self + } } impl Solc { /// Invoke the full solidity compiler and return the exit code, stdout, and stderr - pub fn compile( - &self, - solidity_file: &Path, - outdir: &Path, - ) -> Result> { + pub fn compile(&self, solidity_file: &Path) -> Result> { log::debug!("Invoking full compilation on {}", solidity_file.display()); - self.invoke_compiler(solidity_file, outdir, false) + self.invoke_compiler(solidity_file, false) } /// Perform the actual compilation by invoking a process. This is a wrapper @@ -95,10 +126,9 @@ impl Solc { fn invoke_compiler( &self, solidity_file: &Path, - ast_dir: &Path, stop_after_parse: bool, ) -> Result> { - let flags = self.make_compilation_flags(solidity_file, ast_dir, stop_after_parse); + let flags = self.make_compilation_flags(solidity_file, stop_after_parse); let flags: Vec<&str> = flags.iter().map(|s| s as &str).collect(); let pretty_flags = flags .iter() @@ -144,46 +174,45 @@ impl Solc { } /// Create the compilation flags for compiling `solidity_file` in `ast_dir` - fn make_compilation_flags( - &self, - solidity_file: &Path, - ast_dir: &Path, - stop_after_parse: bool, - ) -> Vec { - let mut flags: Vec = vec![ - "--ast-compact-json".into(), - solidity_file.to_str().unwrap().into(), - "--output-dir".into(), - ast_dir.to_str().unwrap().into(), - "--overwrite".into(), - ]; - if stop_after_parse { - flags.push("--stop-after".into()); - flags.push("parsing".into()); - } + fn make_compilation_flags(&self, solidity_file: &Path, stop_after_parse: bool) -> Vec { + if let Some(ref flags) = self.raw_args { + flags.clone() + } else { + let mut flags: Vec = vec![ + "--ast-compact-json".into(), + solidity_file.to_str().unwrap().into(), + "--output-dir".into(), + self.output_directory.to_str().unwrap().into(), + "--overwrite".into(), + ]; + if stop_after_parse { + flags.push("--stop-after".into()); + flags.push("parsing".into()); + } - if let Some(basepath) = &self.basepath { - flags.push("--base-path".into()); - flags.push(basepath.clone()); - } + if let Some(basepath) = &self.basepath { + flags.push("--base-path".into()); + flags.push(basepath.clone()); + } - if let Some(allow_paths) = &self.allow_paths { - flags.push(ALLOWPATH.into()); - for r in allow_paths { - flags.push(r.clone()); + if let Some(allow_paths) = &self.allow_paths { + flags.push(ALLOWPATH.into()); + for r in allow_paths { + flags.push(r.clone()); + } } - } - if let Some(remaps) = &self.remappings { - for r in remaps { - flags.push(r.clone()); + if let Some(remaps) = &self.remappings { + for r in remaps { + flags.push(r.clone()); + } } - } - if self.optimize { - flags.push(OPTIMIZE.into()); - } + if self.optimize { + flags.push(OPTIMIZE.into()); + } - flags + flags + } } } diff --git a/src/filter.rs b/src/filter.rs index 8e60dba2..ceb40eb3 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -13,7 +13,7 @@ pub trait MutantFilter { /// `self.validate()` returns `true`. When successful, return an /// Ok((valid-mutants, invalid-mutants)) fn filter_mutants( - &self, + &mut self, mutator: &Mutator, num_mutants: usize, ) -> Result<(Vec, Vec), Box>; @@ -44,7 +44,7 @@ impl RandomDownSampleFilter { impl MutantFilter for RandomDownSampleFilter { fn filter_mutants( - &self, + &mut self, mutator: &Mutator, num_mutants: usize, ) -> Result<(Vec, Vec), Box> { @@ -97,7 +97,7 @@ pub struct Validator { impl Validator { /// validate a mutant by writing it to disk and compiling it. If compilation /// fails then this is an invalid mutant. - pub fn validate_mutant(&self, mutant: &Mutant) -> Result> { + pub fn validate_mutant(&mut self, mutant: &Mutant) -> Result> { let source_filename = mutant.path(); let source_parent_dir = source_filename.parent().unwrap(); let mutant_file = NamedTempFile::new_in(source_parent_dir)?; @@ -109,7 +109,11 @@ impl Validator { ); let dir = tempdir()?; MutantWriter::write_mutant_to_file(mutant_file_path, mutant)?; - let was_success = match self.solc.compile(mutant_file_path, dir.path()) { + let was_success = match self + .solc + .with_output_directory(dir.into_path()) + .compile(mutant_file_path) + { Ok((code, _, _)) => code == 0, Err(_) => false, }; @@ -117,7 +121,7 @@ impl Validator { } /// Return a tuple of (valid-mutants, invalid-mutants) - pub fn get_valid_mutants(&self, mutants: &[Mutant]) -> (Vec, Vec) { + pub fn get_valid_mutants(&mut self, mutants: &[Mutant]) -> (Vec, Vec) { log::info!("Validating mutants..."); let mut valid_mutants = vec![]; let mut invalid_mutants: Vec = vec![]; diff --git a/src/lib.rs b/src/lib.rs index e3d1ce03..24bb8121 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -135,7 +135,7 @@ pub fn run_mutate( // TODO: Separate out Filtering from Validation // Check if we are filtering - let validator = Validator { + let mut validator = Validator { solc: Solc::new(params.solc.clone(), outdir_path.clone()), }; let (sampled, invalid) = if let Some(num_mutants) = params.num_mutants { @@ -147,7 +147,8 @@ pub fn run_mutate( } else { Some(params.seed) }; - let filter = RandomDownSampleFilter::new(seed, !params.skip_validate, validator); + let mut filter = + RandomDownSampleFilter::new(seed, !params.skip_validate, validator); let (sampled, invalid) = filter.filter_mutants(&mutator, num_mutants)?; if !params.skip_validate { log::info!( From 2bb2ec9276b6818979ef2d04d329358e52b13feb Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 28 Jul 2023 16:33:22 -0700 Subject: [PATCH 059/200] Deprecate, fixes to cli, fix test --- src/cli.rs | 13 +++++++++++++ src/main.rs | 46 +++++++++++++++++++++++++++++++++++----------- src/mutator.rs | 23 ++--------------------- src/util.rs | 19 ++++++++++++++----- 4 files changed, 64 insertions(+), 37 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 3c55608e..32776ab7 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -162,10 +162,16 @@ pub struct MutateParams { #[arg(long)] pub contract: Option, + /// Specify a directory to search for solidity files during import #[arg(long = "import-path", short = 'I')] #[serde(default = "default_import_paths")] pub import_paths: Vec, + /// Map directory to search for solidity files [format: map=path] + #[arg(long = "import-map", short = 'm')] + #[serde(default = "default_import_paths")] + pub import_maps: Vec, + /// Deprecated: Basepath argument to solc (`--base-path`) #[arg(long, hide = true)] pub solc_base_path: Option, @@ -192,6 +198,13 @@ pub struct MutateParams { #[arg(long, default_value = "false")] #[serde(default = "default_log_invalid")] pub log_invalid: bool, + + /// Manually specify any solc arguments. These will bypass any other args + /// passed to solc (e.g., --solc_include_paths). This is meant as a backup + /// method in case the normal Gambit CLI does not provide the needed + /// flexibility + #[arg(long, default_value=None)] + pub solc_raw_args: Option>, } #[derive(Debug, Deserialize, Serialize)] diff --git a/src/main.rs b/src/main.rs index aa9145c7..0ebbb3e8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -230,16 +230,26 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box] Resolved params.import_paths: {:?}", import_paths); - // PARAM: solc_remappings + let mut import_maps = vec![]; + for import_map in params.import_maps.iter() { + let import_map = repair_remapping( + import_map.as_str(), + Some(json_parent_directory.to_str().unwrap()), + ); + import_maps.push(import_map); + } log::debug!(" [.] Resolving params.solc_remapping"); - let remapping: Option> = params.solc_remappings.as_ref().map(|remapping| { - remapping - .iter() - .map(|rm| { - repair_remapping(rm.as_str(), Some(json_parent_directory.to_str().unwrap())) - }) - .collect() - }); + if let Some(ref remappings) = params.solc_remappings { + print_deprecation_warning("solc_remapping", "1.0.0", "Use import_map instead"); + for remapping in remappings.iter() { + let import_map = repair_remapping( + remapping.as_str(), + Some(json_parent_directory.to_str().unwrap()), + ); + import_maps.push(import_map); + } + params.solc_remappings = None; + } // Finally, update params with resolved source root and filename. // (We don't update earlier to preserve the state of params @@ -248,9 +258,9 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box) -> Result<(), Box for Mutator { solc.with_remappings(remappings); } - // let sourceroot = match &value.sourceroot { - // Some(sourceroot) => PathBuf::from(sourceroot), - // None => { - // // Attempt to use CWD as the sourceroot. Ensuer that the - // // filename belongs to (is prefixed by) the sourceroot - // let sourceroot = PathBuf::from(".").canonicalize().unwrap(); - // let filename = &value - // .filename - // .as_ref() - // .unwrap_or_else(|| panic!("Found unresolved filename in params: {:?}", value)); - // let filepath = PathBuf::from(filename).canonicalize().unwrap(); - // if !&filepath.starts_with(&sourceroot) { - // panic!("Unresolved sourceroot! Attempted to use the current working directory {} but filename {} was not a descendent.", sourceroot.display(), filepath.display()); - // } - - // sourceroot - // } - // }; - let mut filenames: Vec = vec![]; if let Some(filename) = &value.filename { log::info!("Creating Source from filename: {}", filename); @@ -142,8 +123,8 @@ impl From<&MutateParams> for Mutator { // Add base path to file resolver if value.import_paths.is_empty() { file_resolver - .add_import_path(&PathBuf::from("")) - .expect(format!("Failed to add import path {}", "").as_str()); + .add_import_path(&PathBuf::from(".")) + .expect(format!("Failed to add import path {}", ".").as_str()); } else { for import_path in value.import_paths.iter() { file_resolver diff --git a/src/util.rs b/src/util.rs index 2aebefa5..ade176b1 100644 --- a/src/util.rs +++ b/src/util.rs @@ -88,7 +88,13 @@ pub fn repair_remapping(remap_str: &str, resolve_against: Option<&str>) -> Strin let resolved_path = PathBuf::from(against_path_str) .join(rhs) .canonicalize() - .unwrap(); + .expect( + format!( + "Unable to resolve remapping target `{}` against base path `{}`", + rhs, against_path_str + ) + .as_str(), + ); let resolved = resolved_path.to_str().unwrap(); let result = lhs.to_owned() + EQUAL + resolved; log::debug!("Repaired to {}", result); @@ -299,10 +305,13 @@ mod tests { #[test] pub fn test_simplify_path() { - assert_simplifed_path("benchmarks/10Power", "benchmarks/10Power"); - assert_simplifed_path("benchmarks/10Power", "benchmarks/../benchmarks/10Power"); - assert_simplifed_path("benchmarks", "benchmarks/../benchmarks/10Power/.."); - assert_simplifed_path("", "benchmarks/../benchmarks/10Power/../.."); + assert_simplifed_path("benchmarks/Ops/AOR", "benchmarks/Ops/AOR"); + assert_simplifed_path( + "benchmarks/Ops/BOR", + "benchmarks/Ops/../.././benchmarks/Ops/BOR", + ); + assert_simplifed_path("benchmarks", "benchmarks/../benchmarks/Ops/.."); + assert_simplifed_path("", "benchmarks/../benchmarks/Ops/../.."); } /// Helper function to assert simplified paths From ff8df9c98c8da9dc77a9d5fc846da32b8093aa78 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 28 Jul 2023 16:49:00 -0700 Subject: [PATCH 060/200] Updated run_regressions.sh and make_regressions.sh --- scripts/make_regressions.sh | 5 +- scripts/run_regressions.sh | 139 ++++++++++++++++++++++-------------- 2 files changed, 88 insertions(+), 56 deletions(-) diff --git a/scripts/make_regressions.sh b/scripts/make_regressions.sh index fe93846d..88d5cb7a 100644 --- a/scripts/make_regressions.sh +++ b/scripts/make_regressions.sh @@ -32,7 +32,6 @@ print_vars() { echo "configs: $CONFIGS" echo "regressions: $REGRESSIONS" echo "temporary regressions: $TMP_REGRESSIONS" - } double_check_make_regressions() { @@ -80,7 +79,7 @@ setup() { mkdir -p "$TMP_REGRESSIONS" } -run_regressions() { +make_regressions() { echo "Running on $NUM_CONFIGS configurations" starting_dir=$(pwd) failed_confs=() @@ -153,5 +152,5 @@ print_vars build_release clean_state setup -run_regressions +make_regressions summary diff --git a/scripts/run_regressions.sh b/scripts/run_regressions.sh index a2aa2673..41cf1a3f 100644 --- a/scripts/run_regressions.sh +++ b/scripts/run_regressions.sh @@ -20,63 +20,96 @@ SCRIPTS=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) GAMBIT="$SCRIPTS/.." +GAMBIT_EXECUTABLE="$GAMBIT/target/release/gambit" CONFIGS="$GAMBIT/benchmarks/config-jsons" REGRESSIONS="$GAMBIT"/resources/regressions -echo "scripts: $SCRIPTS" -echo "gambit: $GAMBIT" -echo "configs: $CONFIGS" -echo "regressions: $REGRESSIONS" +TMP_REGRESSIONS="$GAMBIT"/resources/tmp_regressions -[ -e "$REGRESSIONS" ] || { - echo "No regressions exist!" -} +NUM_CONFIGS=$(ls "$CONFIGS" | wc -l | xargs) passed=() failed=() -echo "Running tests..." -cd "$GAMBIT" || { - echo "Error: couldn't cd $GAMBIT" - exit 1 + +print_vars() { + echo "scripts: $SCRIPTS" + echo "gambit: $GAMBIT" + echo "configs: $CONFIGS" + echo "regressions: $REGRESSIONS" + echo "temporary regressions: $TMP_REGRESSIONS" } -for conf_path in "$CONFIGS"/*; do - echo - echo - printf "\033[1m- Conf path: %s\033[0m\n" "$conf_path" - - conf=$(basename "$conf_path") - regression_dir="$REGRESSIONS"/"$conf" - - printf " \033[1mRunning:\033[0m %s\n" "gambit mutate --json $conf_path" - stdout="$(cargo run -- mutate --json "$conf_path")" - printf " \033[1mGambit Output:\033[0m '\033[3m%s\033[0m'\n" "$stdout" - printf " \033[1mDiffing\033[0m gambit_out and %s\n" "$regression_dir" - bash "$SCRIPTS"/remove_sourceroots.sh gambit_out/gambit_results.json - if diff -q -r gambit_out "$regression_dir"; then - printf " \033[92mSUCCESS\033[0m\n" - passed+=("$conf") - else - printf " \033[91mFAILED:\033[0m %s\n" "$conf" - failed+=("$conf") - fi - rm -rf gambit_out - -done - -printf "\n\n\033[96mREGRESSION SUMMARY\033[0m\n" -printf "\033[96m==================\033[0m\n\n" - -printf "\033[92mPassed:\033[0m %s of %s tests\n" ${#passed[@]} $((${#failed[@]} + ${#passed[@]})) -printf "\033[92m-------\033[0m\n" - -for conf in "${passed[@]}"; do - printf "\033[92m[+]\033[0m %s\n" "$conf" -done - -printf "\n" - -printf "\033[91mFailed:\033[0m %s of %s tests\n" ${#failed[@]} $((${#failed[@]} + ${#passed[@]})) -printf "\033[91m-------\033[0m\n" - -for conf in "${failed[@]}"; do - printf "\033[91m[-]\033[0m %s\n" "$conf" -done + +build_release() { + old_dir=$(pwd) + cd "$GAMBIT" || exit 1 + cargo build --release + + cd "$old_dir" || exit 1 +} + +run_regressions() { + echo "Running regression tests on $NUM_CONFIGS configurations" + + starting_dir=$(pwd) + cd "$GAMBIT" || { + echo "Error: couldn't cd $GAMBIT" + exit 1 + } + + conf_idx=0 + + for conf_path in "$CONFIGS"/*; do + conf_idx=$((conf_idx + 1)) + echo + echo + printf "\033[1mConfiguration %s/%s: %s\033[0m\n" "$conf_idx" "$NUM_CONFIGS" "$conf_path" + + conf=$(basename "$conf_path") + regression_dir="$REGRESSIONS"/"$conf" + + printf " \033[1mRunning:\033[0m %s\n" "gambit mutate --json $conf_path" + stdout="$("$GAMBIT_EXECUTABLE" mutate --json "$conf_path")" + printf " \033[1mGambit Output:\033[0m '\033[3m%s\033[0m'\n" "$stdout" + printf " \033[1mDiffing\033[0m gambit_out and %s\n" "$regression_dir" + bash "$SCRIPTS"/remove_sourceroots.sh gambit_out/gambit_results.json + if diff -q -r gambit_out "$regression_dir"; then + printf " \033[92mSUCCESS\033[0m\n" + passed+=("$conf") + else + printf " \033[91mFAILED:\033[0m %s\n" "$conf" + failed+=("$conf") + fi + rm -rf gambit_out + + done + + cd "$starting_dir" || exit 1 + +} + +summary() { + + printf "\n\n\033[96mREGRESSION SUMMARY\033[0m\n" + printf "\033[96m==================\033[0m\n\n" + + printf "\033[92mPassed:\033[0m %s of %s tests\n" ${#passed[@]} $((${#failed[@]} + ${#passed[@]})) + printf "\033[92m-------\033[0m\n" + + for conf in "${passed[@]}"; do + printf "\033[92m[✔]\033[0m %s\n" "$conf" + done + + printf "\n" + + printf "\033[91mFailed:\033[0m %s of %s tests\n" ${#failed[@]} $((${#failed[@]} + ${#passed[@]})) + printf "\033[91m-------\033[0m\n" + + for conf in "${failed[@]}"; do + printf "\033[91m[✘]\033[0m %s\n" "$conf" + done + +} + +print_vars +build_release +run_regressions +summary From 34d598ada445a2cc393721c41f0dd4130483849a Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 28 Jul 2023 17:18:23 -0700 Subject: [PATCH 061/200] Temp Commit Trying to fix bugs introduced with --import_path/--import_map. The current issue is that stuff isn't being passed correctly to solc. This should be easy enough to fix, just need to be principled. --- benchmarks/ImportMaps/contracts/B.sol | 6 ++++++ benchmarks/ImportMaps/contracts/Contract.sol | 11 +++++++++++ .../ImportMaps/node_modules/lib/Lib.sol | 7 +++++++ benchmarks/config-jsons/test_import_map.json | 14 ++++++++++++++ src/main.rs | 19 ++++++------------- 5 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 benchmarks/ImportMaps/contracts/B.sol create mode 100644 benchmarks/ImportMaps/contracts/Contract.sol create mode 100644 benchmarks/ImportMaps/node_modules/lib/Lib.sol create mode 100644 benchmarks/config-jsons/test_import_map.json diff --git a/benchmarks/ImportMaps/contracts/B.sol b/benchmarks/ImportMaps/contracts/B.sol new file mode 100644 index 00000000..6cf0942d --- /dev/null +++ b/benchmarks/ImportMaps/contracts/B.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; + +import "@lib/Lib.sol"; + +contract B {} diff --git a/benchmarks/ImportMaps/contracts/Contract.sol b/benchmarks/ImportMaps/contracts/Contract.sol new file mode 100644 index 00000000..3f123eca --- /dev/null +++ b/benchmarks/ImportMaps/contracts/Contract.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; + +import "@lib/Lib.sol"; +import "contracts/B.sol"; + +contract Contract { + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } +} diff --git a/benchmarks/ImportMaps/node_modules/lib/Lib.sol b/benchmarks/ImportMaps/node_modules/lib/Lib.sol new file mode 100644 index 00000000..9dcb8598 --- /dev/null +++ b/benchmarks/ImportMaps/node_modules/lib/Lib.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; + + +contract Lib { + +} \ No newline at end of file diff --git a/benchmarks/config-jsons/test_import_map.json b/benchmarks/config-jsons/test_import_map.json new file mode 100644 index 00000000..8ac76fb5 --- /dev/null +++ b/benchmarks/config-jsons/test_import_map.json @@ -0,0 +1,14 @@ +[ + { + "filename": "../ImportMaps/contracts/Contract.sol", + "import_paths": [ + "../ImportMaps" + ], + "import_maps": [ + "@lib=../ImportMaps/node_modules/lib" + ], + "mutations": [ + "aor" + ] + } +] \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 0ebbb3e8..9e4c0f27 100644 --- a/src/main.rs +++ b/src/main.rs @@ -251,6 +251,7 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box] Resolved params.import_maps: {:?}", import_maps); // Finally, update params with resolved source root and filename. // (We don't update earlier to preserve the state of params // for error reporting: reporting the parsed in value of @@ -329,6 +330,8 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box>(); + log::debug!(" [->] Resolved params.import_paths: {:?}", import_paths); + log::debug!( " [.] Resolving params.solc_base_path: {:?}", params.solc_base_path @@ -372,7 +375,7 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box) -> Result<(), Box] Resolved params.solc_remapping:\n {:#?} to \n {:#?}", - ¶ms.solc_remappings, - &solc_remapping - ); + log::debug!(" [->] Resolved params.import_paths: {:?}", import_paths); // Finally, update params with resolved source root and filename. // (We don't update earlier to preserve the state of params @@ -402,7 +395,7 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box Date: Mon, 31 Jul 2023 13:25:29 -0700 Subject: [PATCH 062/200] Cleaned up some unused args --- src/compile.rs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/compile.rs b/src/compile.rs index 8cc812b1..bd81f34b 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -109,7 +109,7 @@ impl Solc { /// Invoke the full solidity compiler and return the exit code, stdout, and stderr pub fn compile(&self, solidity_file: &Path) -> Result> { log::debug!("Invoking full compilation on {}", solidity_file.display()); - self.invoke_compiler(solidity_file, false) + self.invoke_compiler(solidity_file) } /// Perform the actual compilation by invoking a process. This is a wrapper @@ -123,12 +123,8 @@ impl Solc { /// (e.g., when doing an initial compilation of an original unmutated /// solidity file), and getting detailed information on why such a /// compilation failed is important! - fn invoke_compiler( - &self, - solidity_file: &Path, - stop_after_parse: bool, - ) -> Result> { - let flags = self.make_compilation_flags(solidity_file, stop_after_parse); + fn invoke_compiler(&self, solidity_file: &Path) -> Result> { + let flags = self.make_compilation_flags(solidity_file); let flags: Vec<&str> = flags.iter().map(|s| s as &str).collect(); let pretty_flags = flags .iter() @@ -174,21 +170,16 @@ impl Solc { } /// Create the compilation flags for compiling `solidity_file` in `ast_dir` - fn make_compilation_flags(&self, solidity_file: &Path, stop_after_parse: bool) -> Vec { + fn make_compilation_flags(&self, solidity_file: &Path) -> Vec { if let Some(ref flags) = self.raw_args { flags.clone() } else { let mut flags: Vec = vec![ - "--ast-compact-json".into(), solidity_file.to_str().unwrap().into(), "--output-dir".into(), self.output_directory.to_str().unwrap().into(), "--overwrite".into(), ]; - if stop_after_parse { - flags.push("--stop-after".into()); - flags.push("parsing".into()); - } if let Some(basepath) = &self.basepath { flags.push("--base-path".into()); From 08f3a18e97ade1a97c25f29b68583c3f806f819d Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 31 Jul 2023 14:14:56 -0700 Subject: [PATCH 063/200] Fix bug in remapping, solc building --- benchmarks/config-jsons/test_import_map.json | 2 +- src/compile.rs | 13 ++++++++++++- src/filter.rs | 1 + src/lib.rs | 7 ++++--- src/main.rs | 20 +++++--------------- 5 files changed, 23 insertions(+), 20 deletions(-) diff --git a/benchmarks/config-jsons/test_import_map.json b/benchmarks/config-jsons/test_import_map.json index 8ac76fb5..0434d29a 100644 --- a/benchmarks/config-jsons/test_import_map.json +++ b/benchmarks/config-jsons/test_import_map.json @@ -5,7 +5,7 @@ "../ImportMaps" ], "import_maps": [ - "@lib=../ImportMaps/node_modules/lib" + "@lib=node_modules/lib" ], "mutations": [ "aor" diff --git a/src/compile.rs b/src/compile.rs index bd81f34b..1e337ae8 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -1,4 +1,4 @@ -use crate::invoke_command; +use crate::{invoke_command, MutateParams}; use std::{ error, path::{Path, PathBuf}, @@ -49,6 +49,17 @@ impl Solc { } } + pub fn with_vfs_roots_from_params(&mut self, params: &MutateParams) -> &Self { + if !params.import_paths.is_empty() { + self.with_basepath(params.import_paths.get(0).unwrap().clone()); + for path in params.import_paths[1..].iter() { + self.with_include_path(path.clone()); + } + } + self.with_remappings(params.import_maps.clone()); + self + } + pub fn output_directory(&self) -> &Path { &self.output_directory } diff --git a/src/filter.rs b/src/filter.rs index ceb40eb3..fff2bee5 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -89,6 +89,7 @@ impl MutantFilter for RandomDownSampleFilter { } } +#[derive(Debug)] /// Responsible for mutant validation logic pub struct Validator { pub solc: Solc, diff --git a/src/lib.rs b/src/lib.rs index 24bb8121..45033eee 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -135,9 +135,10 @@ pub fn run_mutate( // TODO: Separate out Filtering from Validation // Check if we are filtering - let mut validator = Validator { - solc: Solc::new(params.solc.clone(), outdir_path.clone()), - }; + let mut solc = Solc::new(params.solc.clone(), outdir_path.clone()); + solc.with_vfs_roots_from_params(¶ms); + let mut validator = Validator { solc }; + log::debug!("Validator: {:?}", validator); let (sampled, invalid) = if let Some(num_mutants) = params.num_mutants { log::info!("Filtering down to {} mutants", num_mutants); log::debug!(" seed: {:?}", params.seed); diff --git a/src/main.rs b/src/main.rs index 9e4c0f27..3c25f37c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ use std::path::{Path, PathBuf}; use clap::Parser; use gambit::{ default_gambit_output_directory, normalize_path, print_deprecation_warning, print_version, - repair_remapping, run_mutate, run_summary, Command, MutateParams, + run_mutate, run_summary, Command, MutateParams, }; fn main() -> Result<(), Box> { @@ -232,21 +232,13 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box) -> Result<(), Box Date: Mon, 31 Jul 2023 14:16:06 -0700 Subject: [PATCH 064/200] Regenerated regressions with fix --- .../test_import_map.json/gambit_results.json | 30 +++++++++++++++++++ .../test_import_map.json/mutants.log | 4 +++ .../mutants/1/contracts/Contract.sol | 12 ++++++++ .../mutants/2/contracts/Contract.sol | 12 ++++++++ .../mutants/3/contracts/Contract.sol | 12 ++++++++ .../mutants/4/contracts/Contract.sol | 12 ++++++++ 6 files changed, 82 insertions(+) create mode 100644 resources/regressions/test_import_map.json/gambit_results.json create mode 100644 resources/regressions/test_import_map.json/mutants.log create mode 100644 resources/regressions/test_import_map.json/mutants/1/contracts/Contract.sol create mode 100644 resources/regressions/test_import_map.json/mutants/2/contracts/Contract.sol create mode 100644 resources/regressions/test_import_map.json/mutants/3/contracts/Contract.sol create mode 100644 resources/regressions/test_import_map.json/mutants/4/contracts/Contract.sol diff --git a/resources/regressions/test_import_map.json/gambit_results.json b/resources/regressions/test_import_map.json/gambit_results.json new file mode 100644 index 00000000..546d62c8 --- /dev/null +++ b/resources/regressions/test_import_map.json/gambit_results.json @@ -0,0 +1,30 @@ +[ + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n }\n", + "id": "1", + "name": "mutants/1/contracts/Contract.sol", + "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n }\n", + "id": "2", + "name": "mutants/2/contracts/Contract.sol", + "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n }\n", + "id": "3", + "name": "mutants/3/contracts/Contract.sol", + "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n }\n", + "id": "4", + "name": "mutants/4/contracts/Contract.sol", + "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/test_import_map.json/mutants.log b/resources/regressions/test_import_map.json/mutants.log new file mode 100644 index 00000000..fe0a116b --- /dev/null +++ b/resources/regressions/test_import_map.json/mutants.log @@ -0,0 +1,4 @@ +1,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,8:9,+,- +2,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,8:9,+,* +3,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,8:9,+,/ +4,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,8:9,+,% diff --git a/resources/regressions/test_import_map.json/mutants/1/contracts/Contract.sol b/resources/regressions/test_import_map.json/mutants/1/contracts/Contract.sol new file mode 100644 index 00000000..69592dce --- /dev/null +++ b/resources/regressions/test_import_map.json/mutants/1/contracts/Contract.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; + +import "@lib/Lib.sol"; +import "contracts/B.sol"; + +contract Contract { + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } +} diff --git a/resources/regressions/test_import_map.json/mutants/2/contracts/Contract.sol b/resources/regressions/test_import_map.json/mutants/2/contracts/Contract.sol new file mode 100644 index 00000000..d83192db --- /dev/null +++ b/resources/regressions/test_import_map.json/mutants/2/contracts/Contract.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; + +import "@lib/Lib.sol"; +import "contracts/B.sol"; + +contract Contract { + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a * b; + } +} diff --git a/resources/regressions/test_import_map.json/mutants/3/contracts/Contract.sol b/resources/regressions/test_import_map.json/mutants/3/contracts/Contract.sol new file mode 100644 index 00000000..4d045a65 --- /dev/null +++ b/resources/regressions/test_import_map.json/mutants/3/contracts/Contract.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; + +import "@lib/Lib.sol"; +import "contracts/B.sol"; + +contract Contract { + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a / b; + } +} diff --git a/resources/regressions/test_import_map.json/mutants/4/contracts/Contract.sol b/resources/regressions/test_import_map.json/mutants/4/contracts/Contract.sol new file mode 100644 index 00000000..15c2f340 --- /dev/null +++ b/resources/regressions/test_import_map.json/mutants/4/contracts/Contract.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; + +import "@lib/Lib.sol"; +import "contracts/B.sol"; + +contract Contract { + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a % b; + } +} From 7205d453b09e1bdf9cf611b8a9fd91df15834e50 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 31 Jul 2023 16:49:07 -0700 Subject: [PATCH 065/200] Created new tests, added to regressions --- benchmarks/config-jsons/test_num_mutants.json | 9 +++ benchmarks/config-jsons/test_seed.json | 18 +++++ .../test_num_mutants.json/gambit_results.json | 37 ++++++++++ .../test_num_mutants.json/mutants.log | 5 ++ .../mutants/1/AOR/AOR.sol | 61 ++++++++++++++++ .../mutants/2/AOR/AOR.sol | 61 ++++++++++++++++ .../mutants/3/AOR/AOR.sol | 61 ++++++++++++++++ .../mutants/4/AOR/AOR.sol | 61 ++++++++++++++++ .../mutants/5/AOR/AOR.sol | 61 ++++++++++++++++ .../test_seed.json/gambit_results.json | 72 +++++++++++++++++++ .../regressions/test_seed.json/mutants.log | 10 +++ .../test_seed.json/mutants/1/AOR/AOR.sol | 61 ++++++++++++++++ .../test_seed.json/mutants/10/AOR/AOR.sol | 61 ++++++++++++++++ .../test_seed.json/mutants/2/AOR/AOR.sol | 61 ++++++++++++++++ .../test_seed.json/mutants/3/AOR/AOR.sol | 61 ++++++++++++++++ .../test_seed.json/mutants/4/AOR/AOR.sol | 61 ++++++++++++++++ .../test_seed.json/mutants/5/AOR/AOR.sol | 61 ++++++++++++++++ .../test_seed.json/mutants/6/AOR/AOR.sol | 61 ++++++++++++++++ .../test_seed.json/mutants/7/AOR/AOR.sol | 61 ++++++++++++++++ .../test_seed.json/mutants/8/AOR/AOR.sol | 61 ++++++++++++++++ .../test_seed.json/mutants/9/AOR/AOR.sol | 61 ++++++++++++++++ 21 files changed, 1066 insertions(+) create mode 100644 benchmarks/config-jsons/test_num_mutants.json create mode 100644 benchmarks/config-jsons/test_seed.json create mode 100644 resources/regressions/test_num_mutants.json/gambit_results.json create mode 100644 resources/regressions/test_num_mutants.json/mutants.log create mode 100644 resources/regressions/test_num_mutants.json/mutants/1/AOR/AOR.sol create mode 100644 resources/regressions/test_num_mutants.json/mutants/2/AOR/AOR.sol create mode 100644 resources/regressions/test_num_mutants.json/mutants/3/AOR/AOR.sol create mode 100644 resources/regressions/test_num_mutants.json/mutants/4/AOR/AOR.sol create mode 100644 resources/regressions/test_num_mutants.json/mutants/5/AOR/AOR.sol create mode 100644 resources/regressions/test_seed.json/gambit_results.json create mode 100644 resources/regressions/test_seed.json/mutants.log create mode 100644 resources/regressions/test_seed.json/mutants/1/AOR/AOR.sol create mode 100644 resources/regressions/test_seed.json/mutants/10/AOR/AOR.sol create mode 100644 resources/regressions/test_seed.json/mutants/2/AOR/AOR.sol create mode 100644 resources/regressions/test_seed.json/mutants/3/AOR/AOR.sol create mode 100644 resources/regressions/test_seed.json/mutants/4/AOR/AOR.sol create mode 100644 resources/regressions/test_seed.json/mutants/5/AOR/AOR.sol create mode 100644 resources/regressions/test_seed.json/mutants/6/AOR/AOR.sol create mode 100644 resources/regressions/test_seed.json/mutants/7/AOR/AOR.sol create mode 100644 resources/regressions/test_seed.json/mutants/8/AOR/AOR.sol create mode 100644 resources/regressions/test_seed.json/mutants/9/AOR/AOR.sol diff --git a/benchmarks/config-jsons/test_num_mutants.json b/benchmarks/config-jsons/test_num_mutants.json new file mode 100644 index 00000000..969abd4b --- /dev/null +++ b/benchmarks/config-jsons/test_num_mutants.json @@ -0,0 +1,9 @@ +[ + { + "filename": "../Ops/AOR/AOR.sol", + "import_paths": [ + "../Ops" + ], + "num_mutants": 5 + } +] \ No newline at end of file diff --git a/benchmarks/config-jsons/test_seed.json b/benchmarks/config-jsons/test_seed.json new file mode 100644 index 00000000..717a4cf9 --- /dev/null +++ b/benchmarks/config-jsons/test_seed.json @@ -0,0 +1,18 @@ +[ + { + "filename": "../Ops/AOR/AOR.sol", + "import_paths": [ + "../Ops" + ], + "num_mutants": 5, + "seed": 1 + }, + { + "filename": "../Ops/AOR/AOR.sol", + "import_paths": [ + "../Ops" + ], + "num_mutants": 5, + "seed": 255 + } +] \ No newline at end of file diff --git a/resources/regressions/test_num_mutants.json/gambit_results.json b/resources/regressions/test_num_mutants.json/gambit_results.json new file mode 100644 index 00000000..103be666 --- /dev/null +++ b/resources/regressions/test_num_mutants.json/gambit_results.json @@ -0,0 +1,37 @@ +[ + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", + "id": "1", + "name": "mutants/1/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "id": "2", + "name": "mutants/2/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "id": "3", + "name": "mutants/3/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", + "id": "4", + "name": "mutants/4/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", + "id": "5", + "name": "mutants/5/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/test_num_mutants.json/mutants.log b/resources/regressions/test_num_mutants.json/mutants.log new file mode 100644 index 00000000..1be4cba1 --- /dev/null +++ b/resources/regressions/test_num_mutants.json/mutants.log @@ -0,0 +1,5 @@ +1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,- +2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,- +3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,/ +4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,** +5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,* diff --git a/resources/regressions/test_num_mutants.json/mutants/1/AOR/AOR.sol b/resources/regressions/test_num_mutants.json/mutants/1/AOR/AOR.sol new file mode 100644 index 00000000..0bf48eb3 --- /dev/null +++ b/resources/regressions/test_num_mutants.json/mutants/1/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_num_mutants.json/mutants/2/AOR/AOR.sol b/resources/regressions/test_num_mutants.json/mutants/2/AOR/AOR.sol new file mode 100644 index 00000000..2af6a527 --- /dev/null +++ b/resources/regressions/test_num_mutants.json/mutants/2/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) - b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_num_mutants.json/mutants/3/AOR/AOR.sol b/resources/regressions/test_num_mutants.json/mutants/3/AOR/AOR.sol new file mode 100644 index 00000000..19b65f09 --- /dev/null +++ b/resources/regressions/test_num_mutants.json/mutants/3/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) / b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_num_mutants.json/mutants/4/AOR/AOR.sol b/resources/regressions/test_num_mutants.json/mutants/4/AOR/AOR.sol new file mode 100644 index 00000000..4b20e4c5 --- /dev/null +++ b/resources/regressions/test_num_mutants.json/mutants/4/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) ** b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_num_mutants.json/mutants/5/AOR/AOR.sol b/resources/regressions/test_num_mutants.json/mutants/5/AOR/AOR.sol new file mode 100644 index 00000000..b5cb7df8 --- /dev/null +++ b/resources/regressions/test_num_mutants.json/mutants/5/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a * b; + } +} diff --git a/resources/regressions/test_seed.json/gambit_results.json b/resources/regressions/test_seed.json/gambit_results.json new file mode 100644 index 00000000..1484eefa --- /dev/null +++ b/resources/regressions/test_seed.json/gambit_results.json @@ -0,0 +1,72 @@ +[ + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "id": "1", + "name": "mutants/1/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", + "id": "2", + "name": "mutants/2/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "id": "3", + "name": "mutants/3/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "id": "4", + "name": "mutants/4/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "id": "5", + "name": "mutants/5/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "id": "6", + "name": "mutants/6/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", + "id": "7", + "name": "mutants/7/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "id": "8", + "name": "mutants/8/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "id": "9", + "name": "mutants/9/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", + "id": "10", + "name": "mutants/10/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/test_seed.json/mutants.log b/resources/regressions/test_seed.json/mutants.log new file mode 100644 index 00000000..5d0ca5d6 --- /dev/null +++ b/resources/regressions/test_seed.json/mutants.log @@ -0,0 +1,10 @@ +1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,* +2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,+ +3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,- +4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,+ +5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,% +6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,% +7,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:0,return a - b,assert(true) +8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,% +9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,- +10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,+ diff --git a/resources/regressions/test_seed.json/mutants/1/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/1/AOR/AOR.sol new file mode 100644 index 00000000..6e93b2bb --- /dev/null +++ b/resources/regressions/test_seed.json/mutants/1/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a * b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_seed.json/mutants/10/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/10/AOR/AOR.sol new file mode 100644 index 00000000..0ab879c1 --- /dev/null +++ b/resources/regressions/test_seed.json/mutants/10/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } +} diff --git a/resources/regressions/test_seed.json/mutants/2/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/2/AOR/AOR.sol new file mode 100644 index 00000000..aadef707 --- /dev/null +++ b/resources/regressions/test_seed.json/mutants/2/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_seed.json/mutants/3/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/3/AOR/AOR.sol new file mode 100644 index 00000000..2af6a527 --- /dev/null +++ b/resources/regressions/test_seed.json/mutants/3/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) - b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_seed.json/mutants/4/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/4/AOR/AOR.sol new file mode 100644 index 00000000..c5bae4da --- /dev/null +++ b/resources/regressions/test_seed.json/mutants/4/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) + b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_seed.json/mutants/5/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/5/AOR/AOR.sol new file mode 100644 index 00000000..44cb1b9b --- /dev/null +++ b/resources/regressions/test_seed.json/mutants/5/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) % b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_seed.json/mutants/6/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/6/AOR/AOR.sol new file mode 100644 index 00000000..b6ab1ee7 --- /dev/null +++ b/resources/regressions/test_seed.json/mutants/6/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a % b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_seed.json/mutants/7/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/7/AOR/AOR.sol new file mode 100644 index 00000000..3540a7a1 --- /dev/null +++ b/resources/regressions/test_seed.json/mutants/7/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + assert(true); + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_seed.json/mutants/8/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/8/AOR/AOR.sol new file mode 100644 index 00000000..7f3fb060 --- /dev/null +++ b/resources/regressions/test_seed.json/mutants/8/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) % b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_seed.json/mutants/9/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/9/AOR/AOR.sol new file mode 100644 index 00000000..c694d72e --- /dev/null +++ b/resources/regressions/test_seed.json/mutants/9/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) - b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} From c1c1eceeecba0a7f7baca4cee39132ea1d8a4261 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 1 Aug 2023 11:33:13 -0700 Subject: [PATCH 066/200] Added regression test for no exports --- benchmarks/config-jsons/test_no_export.json | 17 ++ .../test_no_export.json/gambit_results.json | 198 ++++++++++++++++++ .../test_no_export.json/mutants.log | 28 +++ 3 files changed, 243 insertions(+) create mode 100644 benchmarks/config-jsons/test_no_export.json create mode 100644 resources/regressions/test_no_export.json/gambit_results.json create mode 100644 resources/regressions/test_no_export.json/mutants.log diff --git a/benchmarks/config-jsons/test_no_export.json b/benchmarks/config-jsons/test_no_export.json new file mode 100644 index 00000000..8ae85a49 --- /dev/null +++ b/benchmarks/config-jsons/test_no_export.json @@ -0,0 +1,17 @@ +[ + { + "filename": "../Ops/AOR/AOR.sol", + "import_paths": [ + "../Ops" + ], + "no_export": true + }, + { + "filename": "../Ops/BOR/BOR.sol", + "import_paths": [ + "../Ops" + ], + "num_mutants": 1, + "no_export": true + } +] \ No newline at end of file diff --git a/resources/regressions/test_no_export.json/gambit_results.json b/resources/regressions/test_no_export.json/gambit_results.json new file mode 100644 index 00000000..92d8255d --- /dev/null +++ b/resources/regressions/test_no_export.json/gambit_results.json @@ -0,0 +1,198 @@ +[ + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", + "id": "1", + "name": "mutants/1/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", + "id": "2", + "name": "mutants/2/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "id": "3", + "name": "mutants/3/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "id": "4", + "name": "mutants/4/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "id": "5", + "name": "mutants/5/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", + "id": "6", + "name": "mutants/6/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", + "id": "7", + "name": "mutants/7/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "id": "8", + "name": "mutants/8/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "id": "9", + "name": "mutants/9/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "id": "10", + "name": "mutants/10/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", + "id": "11", + "name": "mutants/11/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "id": "12", + "name": "mutants/12/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "id": "13", + "name": "mutants/13/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "id": "14", + "name": "mutants/14/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "id": "15", + "name": "mutants/15/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", + "id": "16", + "name": "mutants/16/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "id": "17", + "name": "mutants/17/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "id": "18", + "name": "mutants/18/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "id": "19", + "name": "mutants/19/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", + "id": "20", + "name": "mutants/20/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "id": "21", + "name": "mutants/21/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ assert(true);\n }\n }\n", + "id": "22", + "name": "mutants/22/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", + "id": "23", + "name": "mutants/23/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", + "id": "24", + "name": "mutants/24/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", + "id": "25", + "name": "mutants/25/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", + "id": "26", + "name": "mutants/26/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", + "id": "27", + "name": "mutants/27/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ArithmeticOperatorReplacement(`|` |==> `+`) of: `function bw_or(int256 a, int256 b) public pure returns (int256) {`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a + b;\n }\n \n // Expect 1 mutants:\n", + "id": "28", + "name": "mutants/28/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/test_no_export.json/mutants.log b/resources/regressions/test_no_export.json/mutants.log new file mode 100644 index 00000000..e9cee9bd --- /dev/null +++ b/resources/regressions/test_no_export.json/mutants.log @@ -0,0 +1,28 @@ +1,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:0,return a + b,assert(true) +2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,- +3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,* +4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,/ +5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,% +6,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:0,return a - b,assert(true) +7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,+ +8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,* +9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,/ +10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,% +11,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:0,return ((a)) * b,assert(true) +12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,+ +13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,- +14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,/ +15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,% +16,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:0,return ((a)) * b,assert(true) +17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,+ +18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,- +19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,/ +20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,** +21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,% +22,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:0,return a ** b,assert(true) +23,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,+ +24,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,- +25,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,* +26,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,/ +27,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,% +28,AOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,9:9,|,+ From 0572feee9f4a4fae9cd98bb11eab70d72cf0101c Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 1 Aug 2023 13:40:50 -0700 Subject: [PATCH 067/200] pass-through arguments --- benchmarks/config-jsons/test_log_invalid.json | 72 ++++++++++++++++++ src/cli.rs | 32 ++++---- src/lib.rs | 10 +-- src/main.rs | 73 ++++++++++++------- 4 files changed, 137 insertions(+), 50 deletions(-) create mode 100644 benchmarks/config-jsons/test_log_invalid.json diff --git a/benchmarks/config-jsons/test_log_invalid.json b/benchmarks/config-jsons/test_log_invalid.json new file mode 100644 index 00000000..ef201138 --- /dev/null +++ b/benchmarks/config-jsons/test_log_invalid.json @@ -0,0 +1,72 @@ +[ + { + "filename": "../Ops/AOR/AOR.sol", + "import_paths": [ + "../Ops" + ], + "mutations": [ + "AOR" + ], + "log_invalid": true + }, + { + "filename": "../Ops/BOR/BOR.sol", + "import_paths": [ + "../Ops" + ], + "mutations": [ + "BOR" + ], + "log_invalid": true + }, + { + "filename": "../Ops/EDC/EDC.sol", + "import_paths": [ + "../Ops" + ], + "mutations": [ + "EDC" + ], + "log_invalid": true + }, + { + "filename": "../Ops/LOR/LOR.sol", + "import_paths": [ + "../Ops" + ], + "mutations": [ + "LOR" + ], + "log_invalid": true + }, + { + "filename": "../Ops/LVR/LVR.sol", + "import_paths": [ + "../Ops" + ], + "mutations": [ + "LVR" + ], + "log_invalid": true + }, + { + "filename": "../Ops/ROR/ROR.sol", + "import_paths": [ + "../Ops" + ], + "mutations": [ + "ROR" + ], + "log_invalid": true + }, + { + "filename": "../Ops/UOR/UOR.sol", + "import_paths": [ + "../Ops" + ], + "mutations": [ + "UOR" + ], + "log_invalid": true + } +] \ No newline at end of file diff --git a/src/cli.rs b/src/cli.rs index 32776ab7..d2f24f7e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -101,20 +101,20 @@ pub struct MutateParams { pub filename: Option, /// If specified, randomly downsamples the number of mutants - #[arg(long, short, default_value = None)] + #[arg(long, short, default_value = None, conflicts_with = "json")] #[serde(default = "default_num_mutants")] pub num_mutants: Option, /// Use a random seed instead of the specified seed. This will override any /// value passed in with the `--seed` flag - #[arg(long, default_value = "false")] + #[arg(long, default_value = "false", conflicts_with = "json")] #[serde(default = "default_random_seed")] pub random_seed: bool, /// Specify a seed for randomized down sampling. By default seed=0 is used /// and is deterministic, but nondeterminism can be enabled with the /// `--random-seed` flag - #[arg(long, short, default_value = "0")] + #[arg(long, short, default_value = "0", conflicts_with = "json")] #[serde(default = "default_seed")] pub seed: u64, @@ -126,12 +126,12 @@ pub struct MutateParams { /// it is the current working directory. All filenames (either specified by /// the --filename flag or as a "filename" field in a JSON configuration /// file) must exist inside the sourceroot directory. - #[arg(long, default_value = None)] + #[arg(long, default_value = None, conflicts_with = "json")] #[serde(default = "default_source_root")] pub sourceroot: Option, /// Specify the mutation operators - #[arg(long, num_args(1..))] + #[arg(long, num_args(1..), conflicts_with = "json")] pub mutations: Option>, /// Skip mutant export @@ -145,48 +145,48 @@ pub struct MutateParams { pub no_overwrite: bool, /// Solidity binary name, e.g., --solc solc8.10, --solc 7.5, etc. - #[arg(long, default_value = "solc")] + #[arg(long, default_value = "solc", conflicts_with = "json")] #[serde(default = "default_solc")] pub solc: String, /// Run solc with the `--optimize` flag - #[arg(long, default_value = "false")] + #[arg(long, default_value = "false", conflicts_with = "json")] #[serde(default = "default_solc_optimize")] pub solc_optimize: bool, /// Specify function names to mutate - #[arg(long, num_args(1..))] + #[arg(long, num_args(1..), conflicts_with = "json")] pub functions: Option>, /// Specify a contract to mutate - #[arg(long)] + #[arg(long, conflicts_with = "json")] pub contract: Option, /// Specify a directory to search for solidity files during import - #[arg(long = "import-path", short = 'I')] + #[arg(long = "import-path", short = 'I', conflicts_with = "json")] #[serde(default = "default_import_paths")] pub import_paths: Vec, /// Map directory to search for solidity files [format: map=path] - #[arg(long = "import-map", short = 'm')] + #[arg(long = "import-map", short = 'm', conflicts_with = "json")] #[serde(default = "default_import_paths")] pub import_maps: Vec, /// Deprecated: Basepath argument to solc (`--base-path`) - #[arg(long, hide = true)] + #[arg(long, hide = true, conflicts_with = "json")] pub solc_base_path: Option, /// Deprecated: Include paths argument to solc (`--include-paths`) - #[arg(long = "solc-include-path", hide = true)] + #[arg(long = "solc-include-path", hide = true, conflicts_with = "json")] #[serde(default = "default_include_paths")] pub solc_include_paths: Vec, /// Allowpath argument to solc used during validation - #[arg(long)] + #[arg(long, conflicts_with = "json")] pub solc_allow_paths: Option>, /// Solidity remappings - #[arg(long, num_args(1..))] + #[arg(long, num_args(1..), conflicts_with = "json")] pub solc_remappings: Option>, /// Do not validate mutants by invoking solc @@ -203,7 +203,7 @@ pub struct MutateParams { /// passed to solc (e.g., --solc_include_paths). This is meant as a backup /// method in case the normal Gambit CLI does not provide the needed /// flexibility - #[arg(long, default_value=None)] + #[arg(long, default_value=None, conflicts_with = "json")] pub solc_raw_args: Option>, } diff --git a/src/lib.rs b/src/lib.rs index 45033eee..2b04b7e3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,7 +20,6 @@ mod mutator; pub use mutator::*; mod summary; -use solang_parser::pt::Loc; pub use summary::*; mod test_util; @@ -175,20 +174,13 @@ pub fn run_mutate( let invalid_log = &outdir_path.join("invalid.log"); let mut w = Writer::from_path(invalid_log)?; for (i, mutant) in invalid.iter().enumerate() { - let mutant_loc = &mutant.mutant_loc; - let file_no = match mutant_loc.loc { - Loc::File(file_no, _, _) => file_no, - _ => panic!(), - }; - let ns = &mutator.namespace.clone().unwrap(); - let file = ns.files.get(file_no).unwrap(); let (line_no, col_no) = mutant.get_line_column(); let mid = i + 1; let line_col = format!("{}:{}", line_no, col_no); w.write_record([ mid.to_string().as_str(), mutant.op.short_name().as_str(), - file.path.to_str().unwrap(), + mutant.path().to_str().unwrap(), line_col.as_str(), mutant.orig.as_str(), mutant.repl.as_str(), diff --git a/src/main.rs b/src/main.rs index 3c25f37c..61026547 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ use std::path::{Path, PathBuf}; use clap::Parser; use gambit::{ default_gambit_output_directory, normalize_path, print_deprecation_warning, print_version, - run_mutate, run_summary, Command, MutateParams, + resolve_against_parent, run_mutate, run_summary, Command, MutateParams, }; fn main() -> Result<(), Box> { @@ -102,16 +102,39 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box) -> Result<(), Box { let outdir_path = PathBuf::from(outdir); if outdir_path.is_absolute() { @@ -146,13 +169,13 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box] Resolved path `{:?}` to `{}`", - ¶ms.outdir.clone(), + &p.outdir.clone(), &outdir, ); // PARAM: solc_allowpaths log::debug!(" [.] Resolving params.solc_allow_paths"); - let allow_paths = if let Some(allow_paths) = ¶ms.solc_allow_paths { + let allow_paths = if let Some(allow_paths) = &p.solc_allow_paths { Some(resolve_config_file_paths( allow_paths, &json_parent_directory, @@ -163,10 +186,10 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box) -> Result<(), Box) -> Result<(), Box) -> Result<(), Box] Resolved params.import_paths: {:?}", import_paths); let mut import_maps = vec![]; - for import_map in params.import_maps.iter() { + for import_map in p.import_maps.iter() { import_maps.push(import_map.clone()); } log::debug!(" [.] Resolving params.solc_remapping"); - if let Some(ref remappings) = params.solc_remappings { + if let Some(ref remappings) = p.solc_remappings { print_deprecation_warning("solc_remapping", "1.0.0", "Use import_map instead"); for remapping in remappings.iter() { import_maps.push(remapping.clone()); } - params.solc_remappings = None; + p.solc_remappings = None; } log::debug!(" [->] Resolved params.import_maps: {:?}", import_maps); @@ -249,11 +272,11 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box Date: Tue, 1 Aug 2023 13:41:52 -0700 Subject: [PATCH 068/200] removed unused import --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 61026547..db62a133 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ use std::path::{Path, PathBuf}; use clap::Parser; use gambit::{ default_gambit_output_directory, normalize_path, print_deprecation_warning, print_version, - resolve_against_parent, run_mutate, run_summary, Command, MutateParams, + run_mutate, run_summary, Command, MutateParams, }; fn main() -> Result<(), Box> { From f61212df5acba803b9d6110364038904e45698d4 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 1 Aug 2023 13:42:00 -0700 Subject: [PATCH 069/200] regression test --- .../test_log_invalid.json/gambit_results.json | 534 ++++++++++++++++++ .../test_log_invalid.json/invalid.log | 1 + .../test_log_invalid.json/mutants.log | 76 +++ .../mutants/1/AOR/AOR.sol | 61 ++ .../mutants/10/AOR/AOR.sol | 61 ++ .../mutants/11/AOR/AOR.sol | 61 ++ .../mutants/12/AOR/AOR.sol | 61 ++ .../mutants/13/AOR/AOR.sol | 61 ++ .../mutants/14/AOR/AOR.sol | 61 ++ .../mutants/15/AOR/AOR.sol | 61 ++ .../mutants/16/AOR/AOR.sol | 61 ++ .../mutants/17/AOR/AOR.sol | 61 ++ .../mutants/18/AOR/AOR.sol | 61 ++ .../mutants/19/AOR/AOR.sol | 61 ++ .../mutants/2/AOR/AOR.sol | 61 ++ .../mutants/20/AOR/AOR.sol | 61 ++ .../mutants/21/AOR/AOR.sol | 61 ++ .../mutants/22/AOR/AOR.sol | 61 ++ .../mutants/23/BOR/BOR.sol | 25 + .../mutants/24/BOR/BOR.sol | 25 + .../mutants/25/BOR/BOR.sol | 25 + .../mutants/26/EDC/EDC.sol | 22 + .../mutants/27/LOR/LOR.sol | 22 + .../mutants/28/LOR/LOR.sol | 22 + .../mutants/29/LOR/LOR.sol | 22 + .../mutants/3/AOR/AOR.sol | 61 ++ .../mutants/30/LOR/LOR.sol | 22 + .../mutants/31/LOR/LOR.sol | 22 + .../mutants/32/LOR/LOR.sol | 22 + .../mutants/33/LOR/LOR.sol | 22 + .../mutants/34/LOR/LOR.sol | 22 + .../mutants/35/LOR/LOR.sol | 22 + .../mutants/36/LVR/LVR.sol | 43 ++ .../mutants/37/LVR/LVR.sol | 43 ++ .../mutants/38/LVR/LVR.sol | 43 ++ .../mutants/39/LVR/LVR.sol | 43 ++ .../mutants/4/AOR/AOR.sol | 61 ++ .../mutants/40/LVR/LVR.sol | 43 ++ .../mutants/41/LVR/LVR.sol | 43 ++ .../mutants/42/LVR/LVR.sol | 43 ++ .../mutants/43/LVR/LVR.sol | 43 ++ .../mutants/44/LVR/LVR.sol | 43 ++ .../mutants/45/LVR/LVR.sol | 43 ++ .../mutants/46/LVR/LVR.sol | 43 ++ .../mutants/47/ROR/ROR.sol | 65 +++ .../mutants/48/ROR/ROR.sol | 65 +++ .../mutants/49/ROR/ROR.sol | 65 +++ .../mutants/5/AOR/AOR.sol | 61 ++ .../mutants/50/ROR/ROR.sol | 65 +++ .../mutants/51/ROR/ROR.sol | 65 +++ .../mutants/52/ROR/ROR.sol | 65 +++ .../mutants/53/ROR/ROR.sol | 65 +++ .../mutants/54/ROR/ROR.sol | 65 +++ .../mutants/55/ROR/ROR.sol | 65 +++ .../mutants/56/ROR/ROR.sol | 65 +++ .../mutants/57/ROR/ROR.sol | 65 +++ .../mutants/58/ROR/ROR.sol | 65 +++ .../mutants/59/ROR/ROR.sol | 65 +++ .../mutants/6/AOR/AOR.sol | 61 ++ .../mutants/60/ROR/ROR.sol | 65 +++ .../mutants/61/ROR/ROR.sol | 65 +++ .../mutants/62/ROR/ROR.sol | 65 +++ .../mutants/63/ROR/ROR.sol | 65 +++ .../mutants/64/ROR/ROR.sol | 65 +++ .../mutants/65/ROR/ROR.sol | 65 +++ .../mutants/66/ROR/ROR.sol | 65 +++ .../mutants/67/ROR/ROR.sol | 65 +++ .../mutants/68/ROR/ROR.sol | 65 +++ .../mutants/69/ROR/ROR.sol | 65 +++ .../mutants/7/AOR/AOR.sol | 61 ++ .../mutants/70/ROR/ROR.sol | 65 +++ .../mutants/71/ROR/ROR.sol | 65 +++ .../mutants/72/ROR/ROR.sol | 65 +++ .../mutants/73/ROR/ROR.sol | 65 +++ .../mutants/74/ROR/ROR.sol | 65 +++ .../mutants/75/UOR/UOR.sol | 22 + .../mutants/76/UOR/UOR.sol | 22 + .../mutants/8/AOR/AOR.sol | 61 ++ .../mutants/9/AOR/AOR.sol | 61 ++ 79 files changed, 4585 insertions(+) create mode 100644 resources/regressions/test_log_invalid.json/gambit_results.json create mode 100644 resources/regressions/test_log_invalid.json/invalid.log create mode 100644 resources/regressions/test_log_invalid.json/mutants.log create mode 100644 resources/regressions/test_log_invalid.json/mutants/1/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/10/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/11/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/12/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/13/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/14/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/15/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/16/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/17/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/18/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/19/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/2/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/20/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/21/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/22/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/23/BOR/BOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/24/BOR/BOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/25/BOR/BOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/3/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/4/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/5/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/6/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/7/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/8/AOR/AOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/9/AOR/AOR.sol diff --git a/resources/regressions/test_log_invalid.json/gambit_results.json b/resources/regressions/test_log_invalid.json/gambit_results.json new file mode 100644 index 00000000..d2da62fd --- /dev/null +++ b/resources/regressions/test_log_invalid.json/gambit_results.json @@ -0,0 +1,534 @@ +[ + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", + "id": "1", + "name": "mutants/1/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "id": "2", + "name": "mutants/2/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "id": "3", + "name": "mutants/3/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "id": "4", + "name": "mutants/4/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", + "id": "5", + "name": "mutants/5/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "id": "6", + "name": "mutants/6/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "id": "7", + "name": "mutants/7/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "id": "8", + "name": "mutants/8/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "id": "9", + "name": "mutants/9/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "id": "10", + "name": "mutants/10/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "id": "11", + "name": "mutants/11/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "id": "12", + "name": "mutants/12/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "id": "13", + "name": "mutants/13/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "id": "14", + "name": "mutants/14/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "id": "15", + "name": "mutants/15/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", + "id": "16", + "name": "mutants/16/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "id": "17", + "name": "mutants/17/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", + "id": "18", + "name": "mutants/18/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", + "id": "19", + "name": "mutants/19/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", + "id": "20", + "name": "mutants/20/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", + "id": "21", + "name": "mutants/21/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", + "id": "22", + "name": "mutants/22/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + }, + { + "description": "ConditionalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `function bw_or(int256 a, int256 b) public pure returns (int256) {`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", + "id": "23", + "name": "mutants/23/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + }, + { + "description": "ConditionalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `function bw_and(int256 a, int256 b) public pure returns (int256) {`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", + "id": "24", + "name": "mutants/24/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + }, + { + "description": "ConditionalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `function bw_xor(int256 a, int256 b) public pure returns (int256) {`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", + "id": "25", + "name": "mutants/25/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + }, + { + "description": "ElimDelegateCall", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `function setVars(address _contract) public payable {`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", + "id": "26", + "name": "mutants/26/EDC/EDC.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", + "id": "27", + "name": "mutants/27/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", + "id": "28", + "name": "mutants/28/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", + "id": "29", + "name": "mutants/29/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "id": "30", + "name": "mutants/30/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "id": "31", + "name": "mutants/31/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "id": "32", + "name": "mutants/32/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", + "id": "33", + "name": "mutants/33/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", + "id": "34", + "name": "mutants/34/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", + "id": "35", + "name": "mutants/35/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `function unsigned_zero() public pure returns (uint256) {`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", + "id": "36", + "name": "mutants/36/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function unsigned_one() public pure returns (uint256) {`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", + "id": "37", + "name": "mutants/37/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function unsigned_one() public pure returns (uint256) {`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", + "id": "38", + "name": "mutants/38/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "id": "39", + "name": "mutants/39/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", + "id": "40", + "name": "mutants/40/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "id": "41", + "name": "mutants/41/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", + "id": "42", + "name": "mutants/42/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", + "id": "43", + "name": "mutants/43/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", + "id": "44", + "name": "mutants/44/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `function signed_zero() public pure returns (int256) {`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", + "id": "45", + "name": "mutants/45/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `function signed_zero() public pure returns (int256) {`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", + "id": "46", + "name": "mutants/46/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "id": "47", + "name": "mutants/47/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "id": "48", + "name": "mutants/48/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "id": "49", + "name": "mutants/49/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "id": "50", + "name": "mutants/50/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "id": "51", + "name": "mutants/51/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "id": "52", + "name": "mutants/52/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "id": "53", + "name": "mutants/53/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "id": "54", + "name": "mutants/54/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "id": "55", + "name": "mutants/55/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "id": "56", + "name": "mutants/56/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "id": "57", + "name": "mutants/57/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "id": "58", + "name": "mutants/58/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "59", + "name": "mutants/59/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "60", + "name": "mutants/60/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "61", + "name": "mutants/61/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "id": "62", + "name": "mutants/62/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "id": "63", + "name": "mutants/63/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "64", + "name": "mutants/64/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "65", + "name": "mutants/65/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", + "id": "66", + "name": "mutants/66/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "id": "67", + "name": "mutants/67/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "id": "68", + "name": "mutants/68/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "id": "69", + "name": "mutants/69/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "id": "70", + "name": "mutants/70/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "id": "71", + "name": "mutants/71/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", + "id": "72", + "name": "mutants/72/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", + "id": "73", + "name": "mutants/73/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", + "id": "74", + "name": "mutants/74/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + }, + { + "description": "UnaryOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `function signed_bw_not(int256 x) public pure returns (int256) {`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", + "id": "75", + "name": "mutants/75/UOR/UOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + }, + { + "description": "UnaryOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `function signed_neg(int256 x) public pure returns (int256) {`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", + "id": "76", + "name": "mutants/76/UOR/UOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + } +] \ No newline at end of file diff --git a/resources/regressions/test_log_invalid.json/invalid.log b/resources/regressions/test_log_invalid.json/invalid.log new file mode 100644 index 00000000..c49ff370 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/invalid.log @@ -0,0 +1 @@ +1,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,8:7,~, - diff --git a/resources/regressions/test_log_invalid.json/mutants.log b/resources/regressions/test_log_invalid.json/mutants.log new file mode 100644 index 00000000..c0eb94f0 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants.log @@ -0,0 +1,76 @@ +1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,- +2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,* +3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,/ +4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,% +5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,+ +6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,* +7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,/ +8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,% +9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,+ +10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,- +11,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,/ +12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,% +13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,+ +14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,- +15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,/ +16,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,** +17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,% +18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,+ +19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,- +20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,* +21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,/ +22,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,% +23,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,9:9,|,& +24,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,15:9,&,| +25,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,21:9,^,& +26,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,15:29,delegatecall,call +27,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,a +28,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,b +29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,false +30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,a +31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,b +32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,true +33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),x < y +34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),a != (x >= y) +35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),true +36,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,14:15,0,1 +37,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,0 +38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 +39,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 +40,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 +41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 +42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 +43,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 +44,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 +45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,-1 +46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,1 +47,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,<= +48,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,!= +49,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:7,x < y,false +50,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,< +51,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,== +52,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:7,x <= y,true +53,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,>= +54,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,!= +55,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:7,x > y,false +56,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,> +57,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,== +58,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:7,x >= y,true +59,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,<= +60,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,>= +61,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:7,x == y,false +62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,true +63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false +64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< +65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> +66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true +67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true +68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,false +69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> +70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== +71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true +72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< +73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> +74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true +75,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,13:7,~, - +76,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,18:7,~, ~ diff --git a/resources/regressions/test_log_invalid.json/mutants/1/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/1/AOR/AOR.sol new file mode 100644 index 00000000..0bf48eb3 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/1/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/10/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/10/AOR/AOR.sol new file mode 100644 index 00000000..2af6a527 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/10/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) - b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/11/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/11/AOR/AOR.sol new file mode 100644 index 00000000..7023f526 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/11/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) / b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/12/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/12/AOR/AOR.sol new file mode 100644 index 00000000..7f3fb060 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/12/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) % b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/13/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/13/AOR/AOR.sol new file mode 100644 index 00000000..c5bae4da --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/13/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) + b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/14/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/14/AOR/AOR.sol new file mode 100644 index 00000000..c694d72e --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/14/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) - b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/15/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/15/AOR/AOR.sol new file mode 100644 index 00000000..19b65f09 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/15/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) / b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/16/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/16/AOR/AOR.sol new file mode 100644 index 00000000..4b20e4c5 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/16/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) ** b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/17/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/17/AOR/AOR.sol new file mode 100644 index 00000000..44cb1b9b --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/17/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {` + ) public pure returns (uint256) { + return ((a)) % b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/18/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/18/AOR/AOR.sol new file mode 100644 index 00000000..0ab879c1 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/18/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/19/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/19/AOR/AOR.sol new file mode 100644 index 00000000..81aa5028 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/19/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a - b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/2/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/2/AOR/AOR.sol new file mode 100644 index 00000000..6e93b2bb --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/2/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a * b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/20/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/20/AOR/AOR.sol new file mode 100644 index 00000000..b5cb7df8 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/20/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a * b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/21/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/21/AOR/AOR.sol new file mode 100644 index 00000000..ab78d9a3 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/21/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a / b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/22/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/22/AOR/AOR.sol new file mode 100644 index 00000000..b07036aa --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/22/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a % b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/23/BOR/BOR.sol b/resources/regressions/test_log_invalid.json/mutants/23/BOR/BOR.sol new file mode 100644 index 00000000..ecbde264 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/23/BOR/BOR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Bitwise Operator Replacement (BOR) +contract BOR { + // Expect 1 mutants: + // a & b; + /// ConditionalOperatorReplacement(`|` |==> `&`) of: `function bw_or(int256 a, int256 b) public pure returns (int256) {` + function bw_or(int256 a, int256 b) public pure returns (int256) { + return a & b; + } + + // Expect 1 mutants: + // a | b; + function bw_and(int256 a, int256 b) public pure returns (int256) { + return a & b; + } + + // Expect 1 mutants: + // a | b; + function bw_xor(int256 a, int256 b) public pure returns (int256) { + return a ^ b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/24/BOR/BOR.sol b/resources/regressions/test_log_invalid.json/mutants/24/BOR/BOR.sol new file mode 100644 index 00000000..0b930c8b --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/24/BOR/BOR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Bitwise Operator Replacement (BOR) +contract BOR { + // Expect 1 mutants: + // a & b; + function bw_or(int256 a, int256 b) public pure returns (int256) { + return a | b; + } + + // Expect 1 mutants: + // a | b; + /// ConditionalOperatorReplacement(`&` |==> `|`) of: `function bw_and(int256 a, int256 b) public pure returns (int256) {` + function bw_and(int256 a, int256 b) public pure returns (int256) { + return a | b; + } + + // Expect 1 mutants: + // a | b; + function bw_xor(int256 a, int256 b) public pure returns (int256) { + return a ^ b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/25/BOR/BOR.sol b/resources/regressions/test_log_invalid.json/mutants/25/BOR/BOR.sol new file mode 100644 index 00000000..38c31bb9 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/25/BOR/BOR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Bitwise Operator Replacement (BOR) +contract BOR { + // Expect 1 mutants: + // a & b; + function bw_or(int256 a, int256 b) public pure returns (int256) { + return a | b; + } + + // Expect 1 mutants: + // a | b; + function bw_and(int256 a, int256 b) public pure returns (int256) { + return a & b; + } + + // Expect 1 mutants: + // a | b; + /// ConditionalOperatorReplacement(`^` |==> `&`) of: `function bw_xor(int256 a, int256 b) public pure returns (int256) {` + function bw_xor(int256 a, int256 b) public pure returns (int256) { + return a & b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol b/resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol new file mode 100644 index 00000000..116f6d30 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.13; + +contract Helper { + function setVars(uint _num) public payable {} +} + +contract EDC { + uint public num; + address public sender; + uint public value; + bool public delegateSuccessful; + bytes public myData; + + /// ElimDelegateCall(`delegatecall` |==> `call`) of: `function setVars(address _contract) public payable {` + function setVars(address _contract) public payable { + (bool success, ) = _contract.call( + abi.encodeWithSignature("setVars(uint256)", 1) + ); + require(success, "Delegatecall failed"); + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol new file mode 100644 index 00000000..c53deb85 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `function and(bool a, bool b) public pure returns (bool) {` + function and(bool a, bool b) public pure returns (bool) { + return a; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol new file mode 100644 index 00000000..aca2816e --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `function and(bool a, bool b) public pure returns (bool) {` + function and(bool a, bool b) public pure returns (bool) { + return b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol new file mode 100644 index 00000000..22f2231c --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `function and(bool a, bool b) public pure returns (bool) {` + function and(bool a, bool b) public pure returns (bool) { + return false; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/3/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/3/AOR/AOR.sol new file mode 100644 index 00000000..f5716560 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/3/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a / b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol new file mode 100644 index 00000000..fe893a77 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `function or(bool a, bool b) public pure returns (bool) {` + function or(bool a, bool b) public pure returns (bool) { + return a; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol new file mode 100644 index 00000000..5f462cfb --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `function or(bool a, bool b) public pure returns (bool) {` + function or(bool a, bool b) public pure returns (bool) { + return b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol new file mode 100644 index 00000000..908f3789 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `function or(bool a, bool b) public pure returns (bool) {` + function or(bool a, bool b) public pure returns (bool) { + return true; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol new file mode 100644 index 00000000..abd8b54a --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + function more_or(bool a, int x, int y) public pure returns (bool) { + return x < y; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol new file mode 100644 index 00000000..c8114f8a --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + function more_or(bool a, int x, int y) public pure returns (bool) { + return a != (x >= y); + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol new file mode 100644 index 00000000..7345fcb8 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + function more_or(bool a, int x, int y) public pure returns (bool) { + return true; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol new file mode 100644 index 00000000..98b6efde --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `function unsigned_zero() public pure returns (uint256) {` + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 1; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol new file mode 100644 index 00000000..c2a1c544 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `0`) of: `function unsigned_one() public pure returns (uint256) {` + function unsigned_one() public pure returns (uint256) { + uint256 one = 0; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol new file mode 100644 index 00000000..5ab66ba2 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `2`) of: `function unsigned_one() public pure returns (uint256) {` + function unsigned_one() public pure returns (uint256) { + uint256 one = 2; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol new file mode 100644 index 00000000..36f8cc18 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {` + function signed_neg_one() public pure returns (int256) { + int256 neg_one = 0; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/4/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/4/AOR/AOR.sol new file mode 100644 index 00000000..b6ab1ee7 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/4/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + function plus(int256 a, int256 b) public pure returns (int256) { + return a % b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol new file mode 100644 index 00000000..133b1662 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `1`) of: `function signed_neg_one() public pure returns (int256) {` + function signed_neg_one() public pure returns (int256) { + int256 neg_one = 1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol new file mode 100644 index 00000000..36f8cc18 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {` + function signed_neg_one() public pure returns (int256) { + int256 neg_one = 0; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol new file mode 100644 index 00000000..0d9d0db1 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `0`) of: `function signed_pos_one() public pure returns (int256) {` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 0; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol new file mode 100644 index 00000000..a4306e44 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `-1`) of: `function signed_pos_one() public pure returns (int256) {` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = -1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol new file mode 100644 index 00000000..e45a7d13 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `2`) of: `function signed_pos_one() public pure returns (int256) {` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 2; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol new file mode 100644 index 00000000..5dc16fda --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `-1`) of: `function signed_zero() public pure returns (int256) {` + function signed_zero() public pure returns (int256) { + int256 zero = -1; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol new file mode 100644 index 00000000..189644ec --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `function signed_zero() public pure returns (int256) {` + function signed_zero() public pure returns (int256) { + int256 zero = 1; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol new file mode 100644 index 00000000..702970ed --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + function less(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol new file mode 100644 index 00000000..9f373363 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + function less(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol new file mode 100644 index 00000000..b1e4be58 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + function less(uint256 x, uint256 y) public pure returns (bool) { + return false; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/5/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/5/AOR/AOR.sol new file mode 100644 index 00000000..aadef707 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/5/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol new file mode 100644 index 00000000..798cab21 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol new file mode 100644 index 00000000..2f618548 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol new file mode 100644 index 00000000..2fab50f3 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol new file mode 100644 index 00000000..870659c2 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + function more(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol new file mode 100644 index 00000000..09cfeee6 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + function more(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol new file mode 100644 index 00000000..25e6a76b --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + function more(uint256 x, uint256 y) public pure returns (bool) { + return false; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol new file mode 100644 index 00000000..6f949f30 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol new file mode 100644 index 00000000..bbd7a0dd --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol new file mode 100644 index 00000000..1e265ce4 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol new file mode 100644 index 00000000..54f533c7 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`==` |==> `<=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/6/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/6/AOR/AOR.sol new file mode 100644 index 00000000..7e16e706 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/6/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a * b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol new file mode 100644 index 00000000..178c6ef3 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`==` |==> `>=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol new file mode 100644 index 00000000..cef8eda4 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return false; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol new file mode 100644 index 00000000..9ccc07ad --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {` + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol new file mode 100644 index 00000000..c8455bbd --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {` + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return false; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol new file mode 100644 index 00000000..b4611f6a --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol new file mode 100644 index 00000000..b64ac68a --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol new file mode 100644 index 00000000..01df1502 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return true; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol new file mode 100644 index 00000000..24c9bd52 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {` + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol new file mode 100644 index 00000000..02e292bf --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {` + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return false; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol new file mode 100644 index 00000000..ca40eb15 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return (x + y) > z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/7/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/7/AOR/AOR.sol new file mode 100644 index 00000000..3b94bb20 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/7/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a / b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol new file mode 100644 index 00000000..e5431891 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return (x + y) == z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol new file mode 100644 index 00000000..52200b58 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol new file mode 100644 index 00000000..b7ada02e --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return (x + y) < z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol new file mode 100644 index 00000000..4a913691 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return (x + y) > z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol new file mode 100644 index 00000000..5e60497b --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `) public pure returns (bool) {` + ) public pure returns (bool) { + return true; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol new file mode 100644 index 00000000..4066c6e6 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// Unary Operator Replacement +contract UOR { + // Expect no mutants: cannot negate an unsigned integer + function unsigned_bw_not(uint256 x) public pure returns (uint256) { + return ~x; + } + + // Expect a single mutant: -x + /// UnaryOperatorReplacement(`` |==> ` - `) of: `function signed_bw_not(int256 x) public pure returns (int256) {` + function signed_bw_not(int256 x) public pure returns (int256) { + return - ~x; + } + + // Expect a single mutant: ~x + function signed_neg(int256 x) public pure returns (int256) { + return -x; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol new file mode 100644 index 00000000..f2828633 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// Unary Operator Replacement +contract UOR { + // Expect no mutants: cannot negate an unsigned integer + function unsigned_bw_not(uint256 x) public pure returns (uint256) { + return ~x; + } + + // Expect a single mutant: -x + function signed_bw_not(int256 x) public pure returns (int256) { + return ~x; + } + + // Expect a single mutant: ~x + /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `function signed_neg(int256 x) public pure returns (int256) {` + function signed_neg(int256 x) public pure returns (int256) { + return ~ -x; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/8/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/8/AOR/AOR.sol new file mode 100644 index 00000000..8f8abb63 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/8/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + function minus(int256 a, int256 b) public pure returns (int256) { + return a % b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + ) public pure returns (int256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/9/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/9/AOR/AOR.sol new file mode 100644 index 00000000..618e784d --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/9/AOR/AOR.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + + // Expect 4 mutants: + // a + b + // a * b + // a / b + // a % b + function minus(int256 a, int256 b) public pure returns (int256) { + return a - b; + } + + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function times_with_parens( + int256 a, + int256 b + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {` + ) public pure returns (int256) { + return ((a)) + b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a ** b + // a % b + function unsigned_times_with_parens( + uint256 a, + uint256 b + ) public pure returns (uint256) { + return ((a)) * b; + } + + // Expect 5 mutants: + // a + b + // a - b + // a / b + // a * b + // a % b + + function power(uint256 a, uint256 b) public pure returns (uint256) { + return a ** b; + } +} From 83d4c38764888632b934b3c0afac7a9a2bedb502 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 1 Aug 2023 14:20:15 -0700 Subject: [PATCH 070/200] Depracated sourceroot --- src/cli.rs | 21 ++------------------- src/main.rs | 29 +++++++++++++++++++++++------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index d2f24f7e..986c3176 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -79,24 +79,7 @@ pub struct MutateParams { #[arg(long, short, conflicts_with = "filename")] pub json: Option, - /// The name of the file to mutate. Note that this filename must be a - /// descendent of the source root (`.` by default, or specified by the - /// `--sourceroot` flag). - /// - /// # Example - /// - /// Running: - /// - /// `gambit mutate --filename /path/to/file.sol --sourceroot /some/other/path` - /// - /// will cause an error. This is because `/path/to/file.sol` is not - /// (recursively) contained in `/some/other/path`. On the other hand, if - /// our working directory is `/path/to`, running: - /// - /// `gambit mutate --filename /path/to/file.sol` - /// - /// will work because `--sourceroot` is by default `.` which, in this case, - /// expands to `/path/to`, which contains `file.sol`. + /// The name of the file to mutate. #[arg(conflicts_with = "json")] pub filename: Option, @@ -126,7 +109,7 @@ pub struct MutateParams { /// it is the current working directory. All filenames (either specified by /// the --filename flag or as a "filename" field in a JSON configuration /// file) must exist inside the sourceroot directory. - #[arg(long, default_value = None, conflicts_with = "json")] + #[arg(long, default_value = None, hide = true, conflicts_with = "json")] #[serde(default = "default_source_root")] pub sourceroot: Option, diff --git a/src/main.rs b/src/main.rs index db62a133..85ba0339 100644 --- a/src/main.rs +++ b/src/main.rs @@ -111,6 +111,14 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box) -> Result<(), Box) -> Result<(), Box] Resolved params.import_maps: {:?}", import_maps); - // Finally, update params with resolved source root and filename. - // (We don't update earlier to preserve the state of params - // for error reporting: reporting the parsed in value of - // `params` will be more helpful to the end user than - // reporting the modified value of params). p.filename = Some(filepath.to_str().unwrap().to_string()); p.outdir = Some(outdir); p.import_paths = import_paths; @@ -296,6 +306,13 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box Date: Wed, 2 Aug 2023 15:35:27 -0700 Subject: [PATCH 071/200] Removed todo!() --- src/mutation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mutation.rs b/src/mutation.rs index ed2bab0d..d06acc1e 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -625,7 +625,7 @@ fn literal_value_replacement( let replacements = match expr { Expression::BoolLiteral { value, .. } => vec![(!value).to_string()], Expression::NumberLiteral { ty, value, .. } => match ty { - solang::sema::ast::Type::Address(_) => todo!(), + solang::sema::ast::Type::Address(_) => vec![], solang::sema::ast::Type::Int(_) => { if value.is_zero() { vec!["-1".to_string(), "1".to_string()] From e8a89cce8345fee2012077ff03bb36fc8ea9de16 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 2 Aug 2023 15:59:39 -0700 Subject: [PATCH 072/200] Fixed diff bug (line off by 1) --- src/mutation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mutation.rs b/src/mutation.rs index d06acc1e..efa9d760 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -165,7 +165,7 @@ impl Mutant { } let mut_line = lines.next().unwrap(); - let orig_line = contents.lines().nth(line_no - 1).unwrap(); + let orig_line = contents.lines().nth(line_no).unwrap(); let indent = get_indent(mut_line); let comment = format!( From 49cc3ff999e16ec3be8210090a4efb0a48c4842d Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 2 Aug 2023 16:17:33 -0700 Subject: [PATCH 073/200] Updated regressions after bug fix --- .../all_ops.json/gambit_results.json | 152 +++++++++--------- .../all_ops.json/mutants/1/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/10/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/11/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/12/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/13/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/14/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/15/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/16/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/17/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/18/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/19/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/2/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/20/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/21/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/22/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/23/BOR/BOR.sol | 2 +- .../all_ops.json/mutants/24/BOR/BOR.sol | 2 +- .../all_ops.json/mutants/25/BOR/BOR.sol | 2 +- .../all_ops.json/mutants/26/EDC/EDC.sol | 2 +- .../all_ops.json/mutants/27/LOR/LOR.sol | 2 +- .../all_ops.json/mutants/28/LOR/LOR.sol | 2 +- .../all_ops.json/mutants/29/LOR/LOR.sol | 2 +- .../all_ops.json/mutants/3/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/30/LOR/LOR.sol | 2 +- .../all_ops.json/mutants/31/LOR/LOR.sol | 2 +- .../all_ops.json/mutants/32/LOR/LOR.sol | 2 +- .../all_ops.json/mutants/33/LOR/LOR.sol | 2 +- .../all_ops.json/mutants/34/LOR/LOR.sol | 2 +- .../all_ops.json/mutants/35/LOR/LOR.sol | 2 +- .../all_ops.json/mutants/36/LVR/LVR.sol | 2 +- .../all_ops.json/mutants/37/LVR/LVR.sol | 2 +- .../all_ops.json/mutants/38/LVR/LVR.sol | 2 +- .../all_ops.json/mutants/39/LVR/LVR.sol | 2 +- .../all_ops.json/mutants/4/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/40/LVR/LVR.sol | 2 +- .../all_ops.json/mutants/41/LVR/LVR.sol | 2 +- .../all_ops.json/mutants/42/LVR/LVR.sol | 2 +- .../all_ops.json/mutants/43/LVR/LVR.sol | 2 +- .../all_ops.json/mutants/44/LVR/LVR.sol | 2 +- .../all_ops.json/mutants/45/LVR/LVR.sol | 2 +- .../all_ops.json/mutants/46/LVR/LVR.sol | 2 +- .../all_ops.json/mutants/47/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/48/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/49/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/5/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/50/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/51/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/52/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/53/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/54/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/55/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/56/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/57/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/58/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/59/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/6/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/60/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/61/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/62/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/63/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/64/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/65/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/66/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/67/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/68/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/69/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/7/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/70/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/71/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/72/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/73/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/74/ROR/ROR.sol | 2 +- .../all_ops.json/mutants/75/UOR/UOR.sol | 2 +- .../all_ops.json/mutants/76/UOR/UOR.sol | 2 +- .../all_ops.json/mutants/8/AOR/AOR.sol | 2 +- .../all_ops.json/mutants/9/AOR/AOR.sol | 2 +- .../regressions/aor.json/gambit_results.json | 44 ++--- .../aor.json/mutants/1/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/10/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/11/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/12/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/13/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/14/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/15/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/16/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/17/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/18/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/19/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/2/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/20/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/21/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/22/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/3/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/4/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/5/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/6/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/7/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/8/Ops/AOR/AOR.sol | 2 +- .../aor.json/mutants/9/Ops/AOR/AOR.sol | 2 +- .../regressions/bor.json/gambit_results.json | 6 +- .../bor.json/mutants/1/Ops/BOR/BOR.sol | 2 +- .../bor.json/mutants/2/Ops/BOR/BOR.sol | 2 +- .../bor.json/mutants/3/Ops/BOR/BOR.sol | 2 +- .../regressions/edc.json/gambit_results.json | 2 +- .../edc.json/mutants/1/Ops/EDC/EDC.sol | 2 +- .../regressions/lor.json/gambit_results.json | 18 +-- .../lor.json/mutants/1/Ops/LOR/LOR.sol | 2 +- .../lor.json/mutants/2/Ops/LOR/LOR.sol | 2 +- .../lor.json/mutants/3/Ops/LOR/LOR.sol | 2 +- .../lor.json/mutants/4/Ops/LOR/LOR.sol | 2 +- .../lor.json/mutants/5/Ops/LOR/LOR.sol | 2 +- .../lor.json/mutants/6/Ops/LOR/LOR.sol | 2 +- .../lor.json/mutants/7/Ops/LOR/LOR.sol | 2 +- .../lor.json/mutants/8/Ops/LOR/LOR.sol | 2 +- .../lor.json/mutants/9/Ops/LOR/LOR.sol | 2 +- .../regressions/lvr.json/gambit_results.json | 22 +-- .../lvr.json/mutants/1/Ops/LVR/LVR.sol | 2 +- .../lvr.json/mutants/10/Ops/LVR/LVR.sol | 2 +- .../lvr.json/mutants/11/Ops/LVR/LVR.sol | 2 +- .../lvr.json/mutants/2/Ops/LVR/LVR.sol | 2 +- .../lvr.json/mutants/3/Ops/LVR/LVR.sol | 2 +- .../lvr.json/mutants/4/Ops/LVR/LVR.sol | 2 +- .../lvr.json/mutants/5/Ops/LVR/LVR.sol | 2 +- .../lvr.json/mutants/6/Ops/LVR/LVR.sol | 2 +- .../lvr.json/mutants/7/Ops/LVR/LVR.sol | 2 +- .../lvr.json/mutants/8/Ops/LVR/LVR.sol | 2 +- .../lvr.json/mutants/9/Ops/LVR/LVR.sol | 2 +- .../regressions/ror.json/gambit_results.json | 56 +++---- .../ror.json/mutants/1/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/10/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/11/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/12/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/13/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/14/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/15/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/16/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/17/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/18/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/19/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/2/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/20/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/21/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/22/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/23/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/24/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/25/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/26/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/27/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/28/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/3/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/4/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/5/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/6/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/7/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/8/Ops/ROR/ROR.sol | 2 +- .../ror.json/mutants/9/Ops/ROR/ROR.sol | 2 +- .../test_import_map.json/gambit_results.json | 8 +- .../mutants/1/contracts/Contract.sol | 2 +- .../mutants/2/contracts/Contract.sol | 2 +- .../mutants/3/contracts/Contract.sol | 2 +- .../mutants/4/contracts/Contract.sol | 2 +- .../test_log_invalid.json/gambit_results.json | 152 +++++++++--------- .../mutants/1/AOR/AOR.sol | 2 +- .../mutants/10/AOR/AOR.sol | 2 +- .../mutants/11/AOR/AOR.sol | 2 +- .../mutants/12/AOR/AOR.sol | 2 +- .../mutants/13/AOR/AOR.sol | 2 +- .../mutants/14/AOR/AOR.sol | 2 +- .../mutants/15/AOR/AOR.sol | 2 +- .../mutants/16/AOR/AOR.sol | 2 +- .../mutants/17/AOR/AOR.sol | 2 +- .../mutants/18/AOR/AOR.sol | 2 +- .../mutants/19/AOR/AOR.sol | 2 +- .../mutants/2/AOR/AOR.sol | 2 +- .../mutants/20/AOR/AOR.sol | 2 +- .../mutants/21/AOR/AOR.sol | 2 +- .../mutants/22/AOR/AOR.sol | 2 +- .../mutants/23/BOR/BOR.sol | 2 +- .../mutants/24/BOR/BOR.sol | 2 +- .../mutants/25/BOR/BOR.sol | 2 +- .../mutants/26/EDC/EDC.sol | 2 +- .../mutants/27/LOR/LOR.sol | 2 +- .../mutants/28/LOR/LOR.sol | 2 +- .../mutants/29/LOR/LOR.sol | 2 +- .../mutants/3/AOR/AOR.sol | 2 +- .../mutants/30/LOR/LOR.sol | 2 +- .../mutants/31/LOR/LOR.sol | 2 +- .../mutants/32/LOR/LOR.sol | 2 +- .../mutants/33/LOR/LOR.sol | 2 +- .../mutants/34/LOR/LOR.sol | 2 +- .../mutants/35/LOR/LOR.sol | 2 +- .../mutants/36/LVR/LVR.sol | 2 +- .../mutants/37/LVR/LVR.sol | 2 +- .../mutants/38/LVR/LVR.sol | 2 +- .../mutants/39/LVR/LVR.sol | 2 +- .../mutants/4/AOR/AOR.sol | 2 +- .../mutants/40/LVR/LVR.sol | 2 +- .../mutants/41/LVR/LVR.sol | 2 +- .../mutants/42/LVR/LVR.sol | 2 +- .../mutants/43/LVR/LVR.sol | 2 +- .../mutants/44/LVR/LVR.sol | 2 +- .../mutants/45/LVR/LVR.sol | 2 +- .../mutants/46/LVR/LVR.sol | 2 +- .../mutants/47/ROR/ROR.sol | 2 +- .../mutants/48/ROR/ROR.sol | 2 +- .../mutants/49/ROR/ROR.sol | 2 +- .../mutants/5/AOR/AOR.sol | 2 +- .../mutants/50/ROR/ROR.sol | 2 +- .../mutants/51/ROR/ROR.sol | 2 +- .../mutants/52/ROR/ROR.sol | 2 +- .../mutants/53/ROR/ROR.sol | 2 +- .../mutants/54/ROR/ROR.sol | 2 +- .../mutants/55/ROR/ROR.sol | 2 +- .../mutants/56/ROR/ROR.sol | 2 +- .../mutants/57/ROR/ROR.sol | 2 +- .../mutants/58/ROR/ROR.sol | 2 +- .../mutants/59/ROR/ROR.sol | 2 +- .../mutants/6/AOR/AOR.sol | 2 +- .../mutants/60/ROR/ROR.sol | 2 +- .../mutants/61/ROR/ROR.sol | 2 +- .../mutants/62/ROR/ROR.sol | 2 +- .../mutants/63/ROR/ROR.sol | 2 +- .../mutants/64/ROR/ROR.sol | 2 +- .../mutants/65/ROR/ROR.sol | 2 +- .../mutants/66/ROR/ROR.sol | 2 +- .../mutants/67/ROR/ROR.sol | 2 +- .../mutants/68/ROR/ROR.sol | 2 +- .../mutants/69/ROR/ROR.sol | 2 +- .../mutants/7/AOR/AOR.sol | 2 +- .../mutants/70/ROR/ROR.sol | 2 +- .../mutants/71/ROR/ROR.sol | 2 +- .../mutants/72/ROR/ROR.sol | 2 +- .../mutants/73/ROR/ROR.sol | 2 +- .../mutants/74/ROR/ROR.sol | 2 +- .../mutants/75/UOR/UOR.sol | 2 +- .../mutants/76/UOR/UOR.sol | 2 +- .../mutants/8/AOR/AOR.sol | 2 +- .../mutants/9/AOR/AOR.sol | 2 +- .../gambit_results.json | 100 ++++++------ .../mutants/1/MultipleContracts/C.sol | 2 +- .../mutants/10/MultipleContracts/C.sol | 2 +- .../mutants/11/MultipleContracts/C.sol | 2 +- .../mutants/12/MultipleContracts/C.sol | 2 +- .../mutants/13/MultipleContracts/C.sol | 2 +- .../mutants/14/MultipleContracts/C.sol | 2 +- .../mutants/15/MultipleContracts/C.sol | 2 +- .../mutants/16/MultipleContracts/C.sol | 2 +- .../mutants/17/MultipleContracts/C.sol | 2 +- .../mutants/18/MultipleContracts/C.sol | 2 +- .../mutants/19/MultipleContracts/C.sol | 2 +- .../mutants/2/MultipleContracts/C.sol | 2 +- .../mutants/20/MultipleContracts/C.sol | 2 +- .../mutants/21/MultipleContracts/C.sol | 2 +- .../mutants/22/MultipleContracts/C.sol | 2 +- .../mutants/23/MultipleContracts/C.sol | 2 +- .../mutants/24/MultipleContracts/C.sol | 2 +- .../mutants/25/MultipleContracts/C.sol | 2 +- .../mutants/26/MultipleContracts/C.sol | 2 +- .../mutants/27/MultipleContracts/C.sol | 2 +- .../mutants/28/MultipleContracts/C.sol | 2 +- .../mutants/29/MultipleContracts/C.sol | 2 +- .../mutants/3/MultipleContracts/C.sol | 2 +- .../mutants/30/MultipleContracts/C.sol | 2 +- .../mutants/31/MultipleContracts/C.sol | 2 +- .../mutants/32/MultipleContracts/C.sol | 2 +- .../mutants/33/MultipleContracts/C.sol | 2 +- .../mutants/34/MultipleContracts/C.sol | 2 +- .../mutants/35/MultipleContracts/C.sol | 2 +- .../mutants/36/MultipleContracts/C.sol | 2 +- .../mutants/37/MultipleContracts/C.sol | 2 +- .../mutants/38/MultipleContracts/C.sol | 2 +- .../mutants/39/MultipleContracts/C.sol | 2 +- .../mutants/4/MultipleContracts/C.sol | 2 +- .../mutants/40/MultipleContracts/C.sol | 2 +- .../mutants/41/MultipleContracts/C.sol | 2 +- .../mutants/42/MultipleContracts/C.sol | 2 +- .../mutants/43/MultipleContracts/C.sol | 2 +- .../mutants/44/MultipleContracts/C.sol | 2 +- .../mutants/45/MultipleContracts/C.sol | 2 +- .../mutants/46/MultipleContracts/C.sol | 2 +- .../mutants/47/MultipleContracts/C.sol | 2 +- .../mutants/48/MultipleContracts/C.sol | 2 +- .../mutants/49/MultipleContracts/C.sol | 2 +- .../mutants/5/MultipleContracts/C.sol | 2 +- .../mutants/50/MultipleContracts/C.sol | 2 +- .../mutants/6/MultipleContracts/C.sol | 2 +- .../mutants/7/MultipleContracts/C.sol | 2 +- .../mutants/8/MultipleContracts/C.sol | 2 +- .../mutants/9/MultipleContracts/C.sol | 2 +- .../gambit_results.json | 100 ++++++------ .../mutants/1/MultipleContracts/C.sol | 2 +- .../mutants/10/MultipleContracts/C.sol | 2 +- .../mutants/11/MultipleContracts/C.sol | 2 +- .../mutants/12/MultipleContracts/C.sol | 2 +- .../mutants/13/MultipleContracts/C.sol | 2 +- .../mutants/14/MultipleContracts/C.sol | 2 +- .../mutants/15/MultipleContracts/C.sol | 2 +- .../mutants/16/MultipleContracts/C.sol | 2 +- .../mutants/17/MultipleContracts/C.sol | 2 +- .../mutants/18/MultipleContracts/C.sol | 2 +- .../mutants/19/MultipleContracts/C.sol | 2 +- .../mutants/2/MultipleContracts/C.sol | 2 +- .../mutants/20/MultipleContracts/C.sol | 2 +- .../mutants/21/MultipleContracts/C.sol | 2 +- .../mutants/22/MultipleContracts/C.sol | 2 +- .../mutants/23/MultipleContracts/C.sol | 2 +- .../mutants/24/MultipleContracts/C.sol | 2 +- .../mutants/25/MultipleContracts/C.sol | 2 +- .../mutants/26/MultipleContracts/C.sol | 2 +- .../mutants/27/MultipleContracts/C.sol | 2 +- .../mutants/28/MultipleContracts/C.sol | 2 +- .../mutants/29/MultipleContracts/C.sol | 2 +- .../mutants/3/MultipleContracts/C.sol | 2 +- .../mutants/30/MultipleContracts/C.sol | 2 +- .../mutants/31/MultipleContracts/C.sol | 2 +- .../mutants/32/MultipleContracts/C.sol | 2 +- .../mutants/33/MultipleContracts/C.sol | 2 +- .../mutants/34/MultipleContracts/C.sol | 2 +- .../mutants/35/MultipleContracts/C.sol | 2 +- .../mutants/36/MultipleContracts/C.sol | 2 +- .../mutants/37/MultipleContracts/C.sol | 2 +- .../mutants/38/MultipleContracts/C.sol | 2 +- .../mutants/39/MultipleContracts/C.sol | 2 +- .../mutants/4/MultipleContracts/C.sol | 2 +- .../mutants/40/MultipleContracts/C.sol | 2 +- .../mutants/41/MultipleContracts/C.sol | 2 +- .../mutants/42/MultipleContracts/C.sol | 2 +- .../mutants/43/MultipleContracts/C.sol | 2 +- .../mutants/44/MultipleContracts/C.sol | 2 +- .../mutants/45/MultipleContracts/C.sol | 2 +- .../mutants/46/MultipleContracts/C.sol | 2 +- .../mutants/47/MultipleContracts/C.sol | 2 +- .../mutants/48/MultipleContracts/C.sol | 2 +- .../mutants/49/MultipleContracts/C.sol | 2 +- .../mutants/5/MultipleContracts/C.sol | 2 +- .../mutants/50/MultipleContracts/C.sol | 2 +- .../mutants/6/MultipleContracts/C.sol | 2 +- .../mutants/7/MultipleContracts/C.sol | 2 +- .../mutants/8/MultipleContracts/C.sol | 2 +- .../mutants/9/MultipleContracts/C.sol | 2 +- .../gambit_results.json | 100 ++++++------ .../mutants/1/MultipleContracts/C.sol | 2 +- .../mutants/10/MultipleContracts/C.sol | 2 +- .../mutants/11/MultipleContracts/C.sol | 2 +- .../mutants/12/MultipleContracts/C.sol | 2 +- .../mutants/13/MultipleContracts/C.sol | 2 +- .../mutants/14/MultipleContracts/C.sol | 2 +- .../mutants/15/MultipleContracts/C.sol | 2 +- .../mutants/16/MultipleContracts/C.sol | 2 +- .../mutants/17/MultipleContracts/C.sol | 2 +- .../mutants/18/MultipleContracts/C.sol | 2 +- .../mutants/19/MultipleContracts/C.sol | 2 +- .../mutants/2/MultipleContracts/C.sol | 2 +- .../mutants/20/MultipleContracts/C.sol | 2 +- .../mutants/21/MultipleContracts/C.sol | 2 +- .../mutants/22/MultipleContracts/C.sol | 2 +- .../mutants/23/MultipleContracts/C.sol | 2 +- .../mutants/24/MultipleContracts/C.sol | 2 +- .../mutants/25/MultipleContracts/C.sol | 2 +- .../mutants/26/MultipleContracts/C.sol | 2 +- .../mutants/27/MultipleContracts/C.sol | 2 +- .../mutants/28/MultipleContracts/C.sol | 2 +- .../mutants/29/MultipleContracts/C.sol | 2 +- .../mutants/3/MultipleContracts/C.sol | 2 +- .../mutants/30/MultipleContracts/C.sol | 2 +- .../mutants/31/MultipleContracts/C.sol | 2 +- .../mutants/32/MultipleContracts/C.sol | 2 +- .../mutants/33/MultipleContracts/C.sol | 2 +- .../mutants/34/MultipleContracts/C.sol | 2 +- .../mutants/35/MultipleContracts/C.sol | 2 +- .../mutants/36/MultipleContracts/C.sol | 2 +- .../mutants/37/MultipleContracts/C.sol | 2 +- .../mutants/38/MultipleContracts/C.sol | 2 +- .../mutants/39/MultipleContracts/C.sol | 2 +- .../mutants/4/MultipleContracts/C.sol | 2 +- .../mutants/40/MultipleContracts/C.sol | 2 +- .../mutants/41/MultipleContracts/C.sol | 2 +- .../mutants/42/MultipleContracts/C.sol | 2 +- .../mutants/43/MultipleContracts/C.sol | 2 +- .../mutants/44/MultipleContracts/C.sol | 2 +- .../mutants/45/MultipleContracts/C.sol | 2 +- .../mutants/46/MultipleContracts/C.sol | 2 +- .../mutants/47/MultipleContracts/C.sol | 2 +- .../mutants/48/MultipleContracts/C.sol | 2 +- .../mutants/49/MultipleContracts/C.sol | 2 +- .../mutants/5/MultipleContracts/C.sol | 2 +- .../mutants/50/MultipleContracts/C.sol | 2 +- .../mutants/6/MultipleContracts/C.sol | 2 +- .../mutants/7/MultipleContracts/C.sol | 2 +- .../mutants/8/MultipleContracts/C.sol | 2 +- .../mutants/9/MultipleContracts/C.sol | 2 +- .../gambit_results.json | 52 +++--- .../mutants/1/MultipleContracts/C.sol | 2 +- .../mutants/10/MultipleContracts/C.sol | 2 +- .../mutants/11/MultipleContracts/C.sol | 2 +- .../mutants/12/MultipleContracts/C.sol | 2 +- .../mutants/13/MultipleContracts/C.sol | 2 +- .../mutants/14/MultipleContracts/C.sol | 2 +- .../mutants/15/MultipleContracts/C.sol | 2 +- .../mutants/16/MultipleContracts/C.sol | 2 +- .../mutants/17/MultipleContracts/C.sol | 2 +- .../mutants/18/MultipleContracts/C.sol | 2 +- .../mutants/19/MultipleContracts/C.sol | 2 +- .../mutants/2/MultipleContracts/C.sol | 2 +- .../mutants/20/MultipleContracts/C.sol | 2 +- .../mutants/21/MultipleContracts/C.sol | 2 +- .../mutants/22/MultipleContracts/C.sol | 2 +- .../mutants/23/MultipleContracts/C.sol | 2 +- .../mutants/24/MultipleContracts/C.sol | 2 +- .../mutants/25/MultipleContracts/C.sol | 2 +- .../mutants/26/MultipleContracts/C.sol | 2 +- .../mutants/3/MultipleContracts/C.sol | 2 +- .../mutants/4/MultipleContracts/C.sol | 2 +- .../mutants/5/MultipleContracts/C.sol | 2 +- .../mutants/6/MultipleContracts/C.sol | 2 +- .../mutants/7/MultipleContracts/C.sol | 2 +- .../mutants/8/MultipleContracts/C.sol | 2 +- .../mutants/9/MultipleContracts/C.sol | 2 +- .../gambit_results.json | 104 ++++++------ .../mutants/1/Ops/AOR/AOR.sol | 2 +- .../mutants/10/Ops/AOR/AOR.sol | 2 +- .../mutants/11/Ops/AOR/AOR.sol | 2 +- .../mutants/12/Ops/AOR/AOR.sol | 2 +- .../mutants/13/Ops/AOR/AOR.sol | 2 +- .../mutants/14/Ops/AOR/AOR.sol | 2 +- .../mutants/15/Ops/AOR/AOR.sol | 2 +- .../mutants/16/Ops/AOR/AOR.sol | 2 +- .../mutants/17/Ops/AOR/AOR.sol | 2 +- .../mutants/18/Ops/AOR/AOR.sol | 2 +- .../mutants/19/Ops/AOR/AOR.sol | 2 +- .../mutants/2/Ops/AOR/AOR.sol | 2 +- .../mutants/20/Ops/AOR/AOR.sol | 2 +- .../mutants/21/Ops/AOR/AOR.sol | 2 +- .../mutants/22/Ops/AOR/AOR.sol | 2 +- .../mutants/23/Ops/AOR/AOR.sol | 2 +- .../mutants/24/Ops/AOR/AOR.sol | 2 +- .../mutants/25/Ops/AOR/AOR.sol | 2 +- .../mutants/26/Ops/AOR/AOR.sol | 2 +- .../mutants/27/Ops/AOR/AOR.sol | 2 +- .../mutants/28/MultipleContracts/C.sol | 2 +- .../mutants/29/MultipleContracts/C.sol | 2 +- .../mutants/3/Ops/AOR/AOR.sol | 2 +- .../mutants/30/MultipleContracts/C.sol | 2 +- .../mutants/31/MultipleContracts/C.sol | 2 +- .../mutants/32/MultipleContracts/C.sol | 2 +- .../mutants/33/MultipleContracts/C.sol | 2 +- .../mutants/34/MultipleContracts/C.sol | 2 +- .../mutants/35/MultipleContracts/C.sol | 2 +- .../mutants/36/MultipleContracts/C.sol | 2 +- .../mutants/37/MultipleContracts/C.sol | 2 +- .../mutants/38/MultipleContracts/C.sol | 2 +- .../mutants/39/MultipleContracts/C.sol | 2 +- .../mutants/4/Ops/AOR/AOR.sol | 2 +- .../mutants/40/MultipleContracts/C.sol | 2 +- .../mutants/41/MultipleContracts/C.sol | 2 +- .../mutants/42/MultipleContracts/C.sol | 2 +- .../mutants/43/MultipleContracts/C.sol | 2 +- .../mutants/44/MultipleContracts/C.sol | 2 +- .../mutants/45/MultipleContracts/C.sol | 2 +- .../mutants/46/MultipleContracts/C.sol | 2 +- .../mutants/47/MultipleContracts/C.sol | 2 +- .../mutants/48/MultipleContracts/C.sol | 2 +- .../mutants/49/MultipleContracts/C.sol | 2 +- .../mutants/5/Ops/AOR/AOR.sol | 2 +- .../mutants/50/MultipleContracts/C.sol | 2 +- .../mutants/51/MultipleContracts/C.sol | 2 +- .../mutants/52/MultipleContracts/C.sol | 2 +- .../mutants/6/Ops/AOR/AOR.sol | 2 +- .../mutants/7/Ops/AOR/AOR.sol | 2 +- .../mutants/8/Ops/AOR/AOR.sol | 2 +- .../mutants/9/Ops/AOR/AOR.sol | 2 +- .../test_no_export.json/gambit_results.json | 56 +++---- .../test_num_mutants.json/gambit_results.json | 10 +- .../mutants/1/AOR/AOR.sol | 2 +- .../mutants/2/AOR/AOR.sol | 2 +- .../mutants/3/AOR/AOR.sol | 2 +- .../mutants/4/AOR/AOR.sol | 2 +- .../mutants/5/AOR/AOR.sol | 2 +- .../test_seed.json/gambit_results.json | 20 +-- .../test_seed.json/mutants/1/AOR/AOR.sol | 2 +- .../test_seed.json/mutants/10/AOR/AOR.sol | 2 +- .../test_seed.json/mutants/2/AOR/AOR.sol | 2 +- .../test_seed.json/mutants/3/AOR/AOR.sol | 2 +- .../test_seed.json/mutants/4/AOR/AOR.sol | 2 +- .../test_seed.json/mutants/5/AOR/AOR.sol | 2 +- .../test_seed.json/mutants/6/AOR/AOR.sol | 2 +- .../test_seed.json/mutants/7/AOR/AOR.sol | 2 +- .../test_seed.json/mutants/8/AOR/AOR.sol | 2 +- .../test_seed.json/mutants/9/AOR/AOR.sol | 2 +- .../regressions/uor.json/gambit_results.json | 4 +- .../uor.json/mutants/1/Ops/UOR/UOR.sol | 2 +- .../uor.json/mutants/2/Ops/UOR/UOR.sol | 2 +- 493 files changed, 978 insertions(+), 978 deletions(-) diff --git a/resources/regressions/all_ops.json/gambit_results.json b/resources/regressions/all_ops.json/gambit_results.json index d2da62fd..178d4fd0 100644 --- a/resources/regressions/all_ops.json/gambit_results.json +++ b/resources/regressions/all_ops.json/gambit_results.json @@ -1,532 +1,532 @@ [ { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "9", "name": "mutants/9/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "10", "name": "mutants/10/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "18", "name": "mutants/18/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "19", "name": "mutants/19/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "20", "name": "mutants/20/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "21", "name": "mutants/21/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "22", "name": "mutants/22/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ConditionalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `function bw_or(int256 a, int256 b) public pure returns (int256) {`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", "id": "23", "name": "mutants/23/BOR/BOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", }, { "description": "ConditionalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `function bw_and(int256 a, int256 b) public pure returns (int256) {`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", "id": "24", "name": "mutants/24/BOR/BOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", }, { "description": "ConditionalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `function bw_xor(int256 a, int256 b) public pure returns (int256) {`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", "id": "25", "name": "mutants/25/BOR/BOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", }, { "description": "ElimDelegateCall", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `function setVars(address _contract) public payable {`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", "id": "26", "name": "mutants/26/EDC/EDC.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", "id": "27", "name": "mutants/27/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", "id": "28", "name": "mutants/28/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", "id": "29", "name": "mutants/29/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "30", "name": "mutants/30/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "31", "name": "mutants/31/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "32", "name": "mutants/32/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", "id": "33", "name": "mutants/33/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", "id": "34", "name": "mutants/34/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", "id": "35", "name": "mutants/35/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `function unsigned_zero() public pure returns (uint256) {`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", "id": "36", "name": "mutants/36/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function unsigned_one() public pure returns (uint256) {`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", "id": "37", "name": "mutants/37/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function unsigned_one() public pure returns (uint256) {`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", "id": "38", "name": "mutants/38/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "39", "name": "mutants/39/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", "id": "40", "name": "mutants/40/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "41", "name": "mutants/41/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", "id": "42", "name": "mutants/42/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", "id": "43", "name": "mutants/43/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", "id": "44", "name": "mutants/44/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `function signed_zero() public pure returns (int256) {`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", "id": "45", "name": "mutants/45/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `function signed_zero() public pure returns (int256) {`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", "id": "46", "name": "mutants/46/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "47", "name": "mutants/47/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "48", "name": "mutants/48/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "49", "name": "mutants/49/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "50", "name": "mutants/50/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "51", "name": "mutants/51/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "52", "name": "mutants/52/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "53", "name": "mutants/53/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "54", "name": "mutants/54/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "55", "name": "mutants/55/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "56", "name": "mutants/56/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "57", "name": "mutants/57/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "58", "name": "mutants/58/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "59", "name": "mutants/59/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "60", "name": "mutants/60/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", "id": "61", "name": "mutants/61/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "62", "name": "mutants/62/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "63", "name": "mutants/63/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "64", "name": "mutants/64/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "65", "name": "mutants/65/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", "id": "66", "name": "mutants/66/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "67", "name": "mutants/67/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "68", "name": "mutants/68/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "69", "name": "mutants/69/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "70", "name": "mutants/70/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "71", "name": "mutants/71/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", "id": "72", "name": "mutants/72/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", "id": "73", "name": "mutants/73/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", "id": "74", "name": "mutants/74/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "UnaryOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `function signed_bw_not(int256 x) public pure returns (int256) {`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", "id": "75", "name": "mutants/75/UOR/UOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", }, { "description": "UnaryOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `function signed_neg(int256 x) public pure returns (int256) {`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", "id": "76", "name": "mutants/76/UOR/UOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", diff --git a/resources/regressions/all_ops.json/mutants/1/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/1/AOR/AOR.sol index 0bf48eb3..9b516ff5 100644 --- a/resources/regressions/all_ops.json/mutants/1/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/1/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a - b; } diff --git a/resources/regressions/all_ops.json/mutants/10/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/10/AOR/AOR.sol index 2af6a527..c31b43fc 100644 --- a/resources/regressions/all_ops.json/mutants/10/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/10/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) - b; } diff --git a/resources/regressions/all_ops.json/mutants/11/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/11/AOR/AOR.sol index 7023f526..823139e5 100644 --- a/resources/regressions/all_ops.json/mutants/11/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/11/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) / b; } diff --git a/resources/regressions/all_ops.json/mutants/12/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/12/AOR/AOR.sol index 7f3fb060..aa4ecd06 100644 --- a/resources/regressions/all_ops.json/mutants/12/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/12/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) % b; } diff --git a/resources/regressions/all_ops.json/mutants/13/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/13/AOR/AOR.sol index c5bae4da..8666cef6 100644 --- a/resources/regressions/all_ops.json/mutants/13/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/13/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) + b; } diff --git a/resources/regressions/all_ops.json/mutants/14/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/14/AOR/AOR.sol index c694d72e..4d3c74db 100644 --- a/resources/regressions/all_ops.json/mutants/14/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/14/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) - b; } diff --git a/resources/regressions/all_ops.json/mutants/15/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/15/AOR/AOR.sol index 19b65f09..f9a4969d 100644 --- a/resources/regressions/all_ops.json/mutants/15/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/15/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) / b; } diff --git a/resources/regressions/all_ops.json/mutants/16/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/16/AOR/AOR.sol index 4b20e4c5..3706f5c1 100644 --- a/resources/regressions/all_ops.json/mutants/16/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/16/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) ** b; } diff --git a/resources/regressions/all_ops.json/mutants/17/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/17/AOR/AOR.sol index 44cb1b9b..67aa6b37 100644 --- a/resources/regressions/all_ops.json/mutants/17/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/17/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) % b; } diff --git a/resources/regressions/all_ops.json/mutants/18/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/18/AOR/AOR.sol index 0ab879c1..b5770226 100644 --- a/resources/regressions/all_ops.json/mutants/18/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/18/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a + b; } diff --git a/resources/regressions/all_ops.json/mutants/19/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/19/AOR/AOR.sol index 81aa5028..fbde14d5 100644 --- a/resources/regressions/all_ops.json/mutants/19/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/19/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a - b; } diff --git a/resources/regressions/all_ops.json/mutants/2/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/2/AOR/AOR.sol index 6e93b2bb..2e38a567 100644 --- a/resources/regressions/all_ops.json/mutants/2/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/2/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a * b; } diff --git a/resources/regressions/all_ops.json/mutants/20/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/20/AOR/AOR.sol index b5cb7df8..92cbf4d1 100644 --- a/resources/regressions/all_ops.json/mutants/20/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/20/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a * b; } diff --git a/resources/regressions/all_ops.json/mutants/21/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/21/AOR/AOR.sol index ab78d9a3..e3c60678 100644 --- a/resources/regressions/all_ops.json/mutants/21/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/21/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a / b; } diff --git a/resources/regressions/all_ops.json/mutants/22/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/22/AOR/AOR.sol index b07036aa..c63f66b8 100644 --- a/resources/regressions/all_ops.json/mutants/22/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/22/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a % b; } diff --git a/resources/regressions/all_ops.json/mutants/23/BOR/BOR.sol b/resources/regressions/all_ops.json/mutants/23/BOR/BOR.sol index ecbde264..34a280f5 100644 --- a/resources/regressions/all_ops.json/mutants/23/BOR/BOR.sol +++ b/resources/regressions/all_ops.json/mutants/23/BOR/BOR.sol @@ -6,7 +6,7 @@ pragma experimental ABIEncoderV2; contract BOR { // Expect 1 mutants: // a & b; - /// ConditionalOperatorReplacement(`|` |==> `&`) of: `function bw_or(int256 a, int256 b) public pure returns (int256) {` + /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;` function bw_or(int256 a, int256 b) public pure returns (int256) { return a & b; } diff --git a/resources/regressions/all_ops.json/mutants/24/BOR/BOR.sol b/resources/regressions/all_ops.json/mutants/24/BOR/BOR.sol index 0b930c8b..4bfbc16d 100644 --- a/resources/regressions/all_ops.json/mutants/24/BOR/BOR.sol +++ b/resources/regressions/all_ops.json/mutants/24/BOR/BOR.sol @@ -12,7 +12,7 @@ contract BOR { // Expect 1 mutants: // a | b; - /// ConditionalOperatorReplacement(`&` |==> `|`) of: `function bw_and(int256 a, int256 b) public pure returns (int256) {` + /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;` function bw_and(int256 a, int256 b) public pure returns (int256) { return a | b; } diff --git a/resources/regressions/all_ops.json/mutants/25/BOR/BOR.sol b/resources/regressions/all_ops.json/mutants/25/BOR/BOR.sol index 38c31bb9..d4ee4343 100644 --- a/resources/regressions/all_ops.json/mutants/25/BOR/BOR.sol +++ b/resources/regressions/all_ops.json/mutants/25/BOR/BOR.sol @@ -18,7 +18,7 @@ contract BOR { // Expect 1 mutants: // a | b; - /// ConditionalOperatorReplacement(`^` |==> `&`) of: `function bw_xor(int256 a, int256 b) public pure returns (int256) {` + /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;` function bw_xor(int256 a, int256 b) public pure returns (int256) { return a & b; } diff --git a/resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol b/resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol index 116f6d30..19754976 100644 --- a/resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol +++ b/resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol @@ -12,7 +12,7 @@ contract EDC { bool public delegateSuccessful; bytes public myData; - /// ElimDelegateCall(`delegatecall` |==> `call`) of: `function setVars(address _contract) public payable {` + /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(` function setVars(address _contract) public payable { (bool success, ) = _contract.call( abi.encodeWithSignature("setVars(uint256)", 1) diff --git a/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol index c53deb85..67f4f5df 100644 --- a/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `function and(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { return a; } diff --git a/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol index aca2816e..d63286bb 100644 --- a/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `function and(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { return b; } diff --git a/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol index 22f2231c..0e5805db 100644 --- a/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `function and(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { return false; } diff --git a/resources/regressions/all_ops.json/mutants/3/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/3/AOR/AOR.sol index f5716560..60a969dc 100644 --- a/resources/regressions/all_ops.json/mutants/3/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/3/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a / b; } diff --git a/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol index fe893a77..06fbf70c 100644 --- a/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol @@ -10,7 +10,7 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `function or(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { return a; } diff --git a/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol index 5f462cfb..620f1630 100644 --- a/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol @@ -10,7 +10,7 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `function or(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { return b; } diff --git a/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol index 908f3789..29afb982 100644 --- a/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol @@ -10,7 +10,7 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `function or(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { return true; } diff --git a/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol index abd8b54a..eb339ae7 100644 --- a/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol @@ -15,7 +15,7 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { return x < y; } diff --git a/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol index c8114f8a..fb49fdaf 100644 --- a/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol @@ -15,7 +15,7 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { return a != (x >= y); } diff --git a/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol index 7345fcb8..0d9c28b2 100644 --- a/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol @@ -15,7 +15,7 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { return true; } diff --git a/resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol index 98b6efde..e06271e2 100644 --- a/resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol @@ -11,7 +11,7 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `function unsigned_zero() public pure returns (uint256) {` + /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { uint256 zero = 1; return zero; diff --git a/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol index c2a1c544..f2cb8295 100644 --- a/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol @@ -17,7 +17,7 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `function unsigned_one() public pure returns (uint256) {` + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { uint256 one = 0; return one; diff --git a/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol index 5ab66ba2..d18c6c48 100644 --- a/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol @@ -17,7 +17,7 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `function unsigned_one() public pure returns (uint256) {` + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { uint256 one = 2; return one; diff --git a/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol index 36f8cc18..173dc540 100644 --- a/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol @@ -23,7 +23,7 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {` + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { int256 neg_one = 0; return neg_one; diff --git a/resources/regressions/all_ops.json/mutants/4/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/4/AOR/AOR.sol index b6ab1ee7..61a88541 100644 --- a/resources/regressions/all_ops.json/mutants/4/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/4/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a % b; } diff --git a/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol index 133b1662..72ffaedf 100644 --- a/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol @@ -23,7 +23,7 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `function signed_neg_one() public pure returns (int256) {` + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { int256 neg_one = 1; return neg_one; diff --git a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol index 36f8cc18..173dc540 100644 --- a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol @@ -23,7 +23,7 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {` + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { int256 neg_one = 0; return neg_one; diff --git a/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol index 0d9d0db1..e088a4e3 100644 --- a/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol @@ -29,7 +29,7 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `function signed_pos_one() public pure returns (int256) {` + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { int256 pos_one = 0; return pos_one; diff --git a/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol index a4306e44..2407079e 100644 --- a/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol @@ -29,7 +29,7 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `function signed_pos_one() public pure returns (int256) {` + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { int256 pos_one = -1; return pos_one; diff --git a/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol index e45a7d13..a5082f3b 100644 --- a/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol @@ -29,7 +29,7 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `function signed_pos_one() public pure returns (int256) {` + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { int256 pos_one = 2; return pos_one; diff --git a/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol index 5dc16fda..22af4185 100644 --- a/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol @@ -35,7 +35,7 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `function signed_zero() public pure returns (int256) {` + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { int256 zero = -1; return zero; diff --git a/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol index 189644ec..e241973d 100644 --- a/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol @@ -35,7 +35,7 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `function signed_zero() public pure returns (int256) {` + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { int256 zero = 1; return zero; diff --git a/resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol index 702970ed..dec84f24 100644 --- a/resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `<=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { return x <= y; } diff --git a/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol index 9f373363..0c05265c 100644 --- a/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `!=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { return x != y; } diff --git a/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol index b1e4be58..6141947b 100644 --- a/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { return false; } diff --git a/resources/regressions/all_ops.json/mutants/5/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/5/AOR/AOR.sol index aadef707..60846bdb 100644 --- a/resources/regressions/all_ops.json/mutants/5/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/5/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a + b; } diff --git a/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol index 798cab21..9f8ccd04 100644 --- a/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol @@ -10,7 +10,7 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `<`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { return x < y; } diff --git a/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol index 2f618548..18e38f34 100644 --- a/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol @@ -10,7 +10,7 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `==`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { return x == y; } diff --git a/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol index 2fab50f3..55dd7c79 100644 --- a/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol @@ -10,7 +10,7 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { return true; } diff --git a/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol index 870659c2..52949d03 100644 --- a/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol @@ -15,7 +15,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `>=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { return x >= y; } diff --git a/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol index 09cfeee6..a3e16320 100644 --- a/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol @@ -15,7 +15,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `!=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { return x != y; } diff --git a/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol index 25e6a76b..a9024427 100644 --- a/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol @@ -15,7 +15,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { return false; } diff --git a/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol index 6f949f30..337c9a92 100644 --- a/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol @@ -20,7 +20,7 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { return x > y; } diff --git a/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol index bbd7a0dd..7c02b73b 100644 --- a/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol @@ -20,7 +20,7 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { return x == y; } diff --git a/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol index 1e265ce4..3d299dfb 100644 --- a/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol @@ -20,7 +20,7 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { return true; } diff --git a/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol index 54f533c7..c865469b 100644 --- a/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol @@ -25,7 +25,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `<=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { return x <= y; } diff --git a/resources/regressions/all_ops.json/mutants/6/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/6/AOR/AOR.sol index 7e16e706..2ca17b19 100644 --- a/resources/regressions/all_ops.json/mutants/6/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/6/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a * b; } diff --git a/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol index 178c6ef3..8cdc1c10 100644 --- a/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol @@ -25,7 +25,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `>=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { return x >= y; } diff --git a/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol index cef8eda4..de6a4360 100644 --- a/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol @@ -25,7 +25,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { return false; } diff --git a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol index 9ccc07ad..e2798373 100644 --- a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol @@ -30,7 +30,7 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { return true; } diff --git a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol index c8455bbd..ab40e6c9 100644 --- a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol @@ -30,7 +30,7 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { return false; } diff --git a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol index b4611f6a..f42e7b7e 100644 --- a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol @@ -35,7 +35,7 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { return x < y; } diff --git a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol index b64ac68a..e5f50322 100644 --- a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol @@ -35,7 +35,7 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { return x > y; } diff --git a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol index 01df1502..83684484 100644 --- a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol @@ -35,7 +35,7 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { return true; } diff --git a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol index 24c9bd52..3ae92133 100644 --- a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol @@ -40,7 +40,7 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { return true; } diff --git a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol index 02e292bf..b137a5bd 100644 --- a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol @@ -40,7 +40,7 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { return false; } diff --git a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol index ca40eb15..bdeac3af 100644 --- a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol @@ -49,7 +49,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { return (x + y) > z; } diff --git a/resources/regressions/all_ops.json/mutants/7/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/7/AOR/AOR.sol index 3b94bb20..c07a6aeb 100644 --- a/resources/regressions/all_ops.json/mutants/7/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/7/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a / b; } diff --git a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol index e5431891..430379f6 100644 --- a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol @@ -49,7 +49,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { return (x + y) == z; } diff --git a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol index 52200b58..3d67c155 100644 --- a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol @@ -49,7 +49,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { return true; } diff --git a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol index b7ada02e..13612614 100644 --- a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol @@ -58,7 +58,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { return (x + y) < z; } diff --git a/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol index 4a913691..dd0c83ca 100644 --- a/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol @@ -58,7 +58,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { return (x + y) > z; } diff --git a/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol index 5e60497b..84889114 100644 --- a/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol @@ -58,7 +58,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { return true; } diff --git a/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol index 4066c6e6..5697ce92 100644 --- a/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol +++ b/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol @@ -10,7 +10,7 @@ contract UOR { } // Expect a single mutant: -x - /// UnaryOperatorReplacement(`` |==> ` - `) of: `function signed_bw_not(int256 x) public pure returns (int256) {` + /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;` function signed_bw_not(int256 x) public pure returns (int256) { return - ~x; } diff --git a/resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol index f2828633..8a21a9d0 100644 --- a/resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol +++ b/resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol @@ -15,7 +15,7 @@ contract UOR { } // Expect a single mutant: ~x - /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `function signed_neg(int256 x) public pure returns (int256) {` + /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;` function signed_neg(int256 x) public pure returns (int256) { return ~ -x; } diff --git a/resources/regressions/all_ops.json/mutants/8/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/8/AOR/AOR.sol index 8f8abb63..bd874f10 100644 --- a/resources/regressions/all_ops.json/mutants/8/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/8/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a % b; } diff --git a/resources/regressions/all_ops.json/mutants/9/AOR/AOR.sol b/resources/regressions/all_ops.json/mutants/9/AOR/AOR.sol index 618e784d..5d9ca896 100644 --- a/resources/regressions/all_ops.json/mutants/9/AOR/AOR.sol +++ b/resources/regressions/all_ops.json/mutants/9/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) + b; } diff --git a/resources/regressions/aor.json/gambit_results.json b/resources/regressions/aor.json/gambit_results.json index 4edbedf9..8eff0bf7 100644 --- a/resources/regressions/aor.json/gambit_results.json +++ b/resources/regressions/aor.json/gambit_results.json @@ -1,154 +1,154 @@ [ { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "9", "name": "mutants/9/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "10", "name": "mutants/10/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "18", "name": "mutants/18/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "19", "name": "mutants/19/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "20", "name": "mutants/20/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "21", "name": "mutants/21/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "22", "name": "mutants/22/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", diff --git a/resources/regressions/aor.json/mutants/1/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/1/Ops/AOR/AOR.sol index 0bf48eb3..9b516ff5 100644 --- a/resources/regressions/aor.json/mutants/1/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/1/Ops/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a - b; } diff --git a/resources/regressions/aor.json/mutants/10/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/10/Ops/AOR/AOR.sol index 2af6a527..c31b43fc 100644 --- a/resources/regressions/aor.json/mutants/10/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/10/Ops/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) - b; } diff --git a/resources/regressions/aor.json/mutants/11/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/11/Ops/AOR/AOR.sol index 7023f526..823139e5 100644 --- a/resources/regressions/aor.json/mutants/11/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/11/Ops/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) / b; } diff --git a/resources/regressions/aor.json/mutants/12/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/12/Ops/AOR/AOR.sol index 7f3fb060..aa4ecd06 100644 --- a/resources/regressions/aor.json/mutants/12/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/12/Ops/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) % b; } diff --git a/resources/regressions/aor.json/mutants/13/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/13/Ops/AOR/AOR.sol index c5bae4da..8666cef6 100644 --- a/resources/regressions/aor.json/mutants/13/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/13/Ops/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) + b; } diff --git a/resources/regressions/aor.json/mutants/14/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/14/Ops/AOR/AOR.sol index c694d72e..4d3c74db 100644 --- a/resources/regressions/aor.json/mutants/14/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/14/Ops/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) - b; } diff --git a/resources/regressions/aor.json/mutants/15/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/15/Ops/AOR/AOR.sol index 19b65f09..f9a4969d 100644 --- a/resources/regressions/aor.json/mutants/15/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/15/Ops/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) / b; } diff --git a/resources/regressions/aor.json/mutants/16/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/16/Ops/AOR/AOR.sol index 4b20e4c5..3706f5c1 100644 --- a/resources/regressions/aor.json/mutants/16/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/16/Ops/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) ** b; } diff --git a/resources/regressions/aor.json/mutants/17/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/17/Ops/AOR/AOR.sol index 44cb1b9b..67aa6b37 100644 --- a/resources/regressions/aor.json/mutants/17/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/17/Ops/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) % b; } diff --git a/resources/regressions/aor.json/mutants/18/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/18/Ops/AOR/AOR.sol index 0ab879c1..b5770226 100644 --- a/resources/regressions/aor.json/mutants/18/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/18/Ops/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a + b; } diff --git a/resources/regressions/aor.json/mutants/19/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/19/Ops/AOR/AOR.sol index 81aa5028..fbde14d5 100644 --- a/resources/regressions/aor.json/mutants/19/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/19/Ops/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a - b; } diff --git a/resources/regressions/aor.json/mutants/2/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/2/Ops/AOR/AOR.sol index 6e93b2bb..2e38a567 100644 --- a/resources/regressions/aor.json/mutants/2/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/2/Ops/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a * b; } diff --git a/resources/regressions/aor.json/mutants/20/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/20/Ops/AOR/AOR.sol index b5cb7df8..92cbf4d1 100644 --- a/resources/regressions/aor.json/mutants/20/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/20/Ops/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a * b; } diff --git a/resources/regressions/aor.json/mutants/21/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/21/Ops/AOR/AOR.sol index ab78d9a3..e3c60678 100644 --- a/resources/regressions/aor.json/mutants/21/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/21/Ops/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a / b; } diff --git a/resources/regressions/aor.json/mutants/22/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/22/Ops/AOR/AOR.sol index b07036aa..c63f66b8 100644 --- a/resources/regressions/aor.json/mutants/22/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/22/Ops/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a % b; } diff --git a/resources/regressions/aor.json/mutants/3/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/3/Ops/AOR/AOR.sol index f5716560..60a969dc 100644 --- a/resources/regressions/aor.json/mutants/3/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/3/Ops/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a / b; } diff --git a/resources/regressions/aor.json/mutants/4/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/4/Ops/AOR/AOR.sol index b6ab1ee7..61a88541 100644 --- a/resources/regressions/aor.json/mutants/4/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/4/Ops/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a % b; } diff --git a/resources/regressions/aor.json/mutants/5/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/5/Ops/AOR/AOR.sol index aadef707..60846bdb 100644 --- a/resources/regressions/aor.json/mutants/5/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/5/Ops/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a + b; } diff --git a/resources/regressions/aor.json/mutants/6/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/6/Ops/AOR/AOR.sol index 7e16e706..2ca17b19 100644 --- a/resources/regressions/aor.json/mutants/6/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/6/Ops/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a * b; } diff --git a/resources/regressions/aor.json/mutants/7/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/7/Ops/AOR/AOR.sol index 3b94bb20..c07a6aeb 100644 --- a/resources/regressions/aor.json/mutants/7/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/7/Ops/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a / b; } diff --git a/resources/regressions/aor.json/mutants/8/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/8/Ops/AOR/AOR.sol index 8f8abb63..bd874f10 100644 --- a/resources/regressions/aor.json/mutants/8/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/8/Ops/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a % b; } diff --git a/resources/regressions/aor.json/mutants/9/Ops/AOR/AOR.sol b/resources/regressions/aor.json/mutants/9/Ops/AOR/AOR.sol index 618e784d..5d9ca896 100644 --- a/resources/regressions/aor.json/mutants/9/Ops/AOR/AOR.sol +++ b/resources/regressions/aor.json/mutants/9/Ops/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) + b; } diff --git a/resources/regressions/bor.json/gambit_results.json b/resources/regressions/bor.json/gambit_results.json index b57ede07..2c776ecf 100644 --- a/resources/regressions/bor.json/gambit_results.json +++ b/resources/regressions/bor.json/gambit_results.json @@ -1,21 +1,21 @@ [ { "description": "ConditionalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `function bw_or(int256 a, int256 b) public pure returns (int256) {`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", "id": "1", "name": "mutants/1/Ops/BOR/BOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", }, { "description": "ConditionalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `function bw_and(int256 a, int256 b) public pure returns (int256) {`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", "id": "2", "name": "mutants/2/Ops/BOR/BOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", }, { "description": "ConditionalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `function bw_xor(int256 a, int256 b) public pure returns (int256) {`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", "id": "3", "name": "mutants/3/Ops/BOR/BOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", diff --git a/resources/regressions/bor.json/mutants/1/Ops/BOR/BOR.sol b/resources/regressions/bor.json/mutants/1/Ops/BOR/BOR.sol index ecbde264..34a280f5 100644 --- a/resources/regressions/bor.json/mutants/1/Ops/BOR/BOR.sol +++ b/resources/regressions/bor.json/mutants/1/Ops/BOR/BOR.sol @@ -6,7 +6,7 @@ pragma experimental ABIEncoderV2; contract BOR { // Expect 1 mutants: // a & b; - /// ConditionalOperatorReplacement(`|` |==> `&`) of: `function bw_or(int256 a, int256 b) public pure returns (int256) {` + /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;` function bw_or(int256 a, int256 b) public pure returns (int256) { return a & b; } diff --git a/resources/regressions/bor.json/mutants/2/Ops/BOR/BOR.sol b/resources/regressions/bor.json/mutants/2/Ops/BOR/BOR.sol index 0b930c8b..4bfbc16d 100644 --- a/resources/regressions/bor.json/mutants/2/Ops/BOR/BOR.sol +++ b/resources/regressions/bor.json/mutants/2/Ops/BOR/BOR.sol @@ -12,7 +12,7 @@ contract BOR { // Expect 1 mutants: // a | b; - /// ConditionalOperatorReplacement(`&` |==> `|`) of: `function bw_and(int256 a, int256 b) public pure returns (int256) {` + /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;` function bw_and(int256 a, int256 b) public pure returns (int256) { return a | b; } diff --git a/resources/regressions/bor.json/mutants/3/Ops/BOR/BOR.sol b/resources/regressions/bor.json/mutants/3/Ops/BOR/BOR.sol index 38c31bb9..d4ee4343 100644 --- a/resources/regressions/bor.json/mutants/3/Ops/BOR/BOR.sol +++ b/resources/regressions/bor.json/mutants/3/Ops/BOR/BOR.sol @@ -18,7 +18,7 @@ contract BOR { // Expect 1 mutants: // a | b; - /// ConditionalOperatorReplacement(`^` |==> `&`) of: `function bw_xor(int256 a, int256 b) public pure returns (int256) {` + /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;` function bw_xor(int256 a, int256 b) public pure returns (int256) { return a & b; } diff --git a/resources/regressions/edc.json/gambit_results.json b/resources/regressions/edc.json/gambit_results.json index 6db307fc..31ca58ca 100644 --- a/resources/regressions/edc.json/gambit_results.json +++ b/resources/regressions/edc.json/gambit_results.json @@ -1,7 +1,7 @@ [ { "description": "ElimDelegateCall", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `function setVars(address _contract) public payable {`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", "id": "1", "name": "mutants/1/Ops/EDC/EDC.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", diff --git a/resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol b/resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol index 116f6d30..19754976 100644 --- a/resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol +++ b/resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol @@ -12,7 +12,7 @@ contract EDC { bool public delegateSuccessful; bytes public myData; - /// ElimDelegateCall(`delegatecall` |==> `call`) of: `function setVars(address _contract) public payable {` + /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(` function setVars(address _contract) public payable { (bool success, ) = _contract.call( abi.encodeWithSignature("setVars(uint256)", 1) diff --git a/resources/regressions/lor.json/gambit_results.json b/resources/regressions/lor.json/gambit_results.json index 3c192042..4ffa3690 100644 --- a/resources/regressions/lor.json/gambit_results.json +++ b/resources/regressions/lor.json/gambit_results.json @@ -1,63 +1,63 @@ [ { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", "id": "1", "name": "mutants/1/Ops/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", "id": "2", "name": "mutants/2/Ops/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", "id": "3", "name": "mutants/3/Ops/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "4", "name": "mutants/4/Ops/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "5", "name": "mutants/5/Ops/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "6", "name": "mutants/6/Ops/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", "id": "7", "name": "mutants/7/Ops/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", "id": "8", "name": "mutants/8/Ops/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", "id": "9", "name": "mutants/9/Ops/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", diff --git a/resources/regressions/lor.json/mutants/1/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/1/Ops/LOR/LOR.sol index c53deb85..67f4f5df 100644 --- a/resources/regressions/lor.json/mutants/1/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/1/Ops/LOR/LOR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `function and(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { return a; } diff --git a/resources/regressions/lor.json/mutants/2/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/2/Ops/LOR/LOR.sol index aca2816e..d63286bb 100644 --- a/resources/regressions/lor.json/mutants/2/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/2/Ops/LOR/LOR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `function and(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { return b; } diff --git a/resources/regressions/lor.json/mutants/3/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/3/Ops/LOR/LOR.sol index 22f2231c..0e5805db 100644 --- a/resources/regressions/lor.json/mutants/3/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/3/Ops/LOR/LOR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `function and(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { return false; } diff --git a/resources/regressions/lor.json/mutants/4/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/4/Ops/LOR/LOR.sol index fe893a77..06fbf70c 100644 --- a/resources/regressions/lor.json/mutants/4/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/4/Ops/LOR/LOR.sol @@ -10,7 +10,7 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `function or(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { return a; } diff --git a/resources/regressions/lor.json/mutants/5/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/5/Ops/LOR/LOR.sol index 5f462cfb..620f1630 100644 --- a/resources/regressions/lor.json/mutants/5/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/5/Ops/LOR/LOR.sol @@ -10,7 +10,7 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `function or(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { return b; } diff --git a/resources/regressions/lor.json/mutants/6/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/6/Ops/LOR/LOR.sol index 908f3789..29afb982 100644 --- a/resources/regressions/lor.json/mutants/6/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/6/Ops/LOR/LOR.sol @@ -10,7 +10,7 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `function or(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { return true; } diff --git a/resources/regressions/lor.json/mutants/7/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/7/Ops/LOR/LOR.sol index abd8b54a..eb339ae7 100644 --- a/resources/regressions/lor.json/mutants/7/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/7/Ops/LOR/LOR.sol @@ -15,7 +15,7 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { return x < y; } diff --git a/resources/regressions/lor.json/mutants/8/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/8/Ops/LOR/LOR.sol index c8114f8a..fb49fdaf 100644 --- a/resources/regressions/lor.json/mutants/8/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/8/Ops/LOR/LOR.sol @@ -15,7 +15,7 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { return a != (x >= y); } diff --git a/resources/regressions/lor.json/mutants/9/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/9/Ops/LOR/LOR.sol index 7345fcb8..0d9c28b2 100644 --- a/resources/regressions/lor.json/mutants/9/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/9/Ops/LOR/LOR.sol @@ -15,7 +15,7 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { return true; } diff --git a/resources/regressions/lvr.json/gambit_results.json b/resources/regressions/lvr.json/gambit_results.json index 4602371c..0795b0a8 100644 --- a/resources/regressions/lvr.json/gambit_results.json +++ b/resources/regressions/lvr.json/gambit_results.json @@ -1,77 +1,77 @@ [ { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `function unsigned_zero() public pure returns (uint256) {`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", "id": "1", "name": "mutants/1/Ops/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function unsigned_one() public pure returns (uint256) {`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", "id": "2", "name": "mutants/2/Ops/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function unsigned_one() public pure returns (uint256) {`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", "id": "3", "name": "mutants/3/Ops/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "4", "name": "mutants/4/Ops/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", "id": "5", "name": "mutants/5/Ops/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "6", "name": "mutants/6/Ops/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", "id": "7", "name": "mutants/7/Ops/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", "id": "8", "name": "mutants/8/Ops/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", "id": "9", "name": "mutants/9/Ops/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `function signed_zero() public pure returns (int256) {`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", "id": "10", "name": "mutants/10/Ops/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `function signed_zero() public pure returns (int256) {`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", "id": "11", "name": "mutants/11/Ops/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", diff --git a/resources/regressions/lvr.json/mutants/1/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/1/Ops/LVR/LVR.sol index 98b6efde..e06271e2 100644 --- a/resources/regressions/lvr.json/mutants/1/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/1/Ops/LVR/LVR.sol @@ -11,7 +11,7 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `function unsigned_zero() public pure returns (uint256) {` + /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { uint256 zero = 1; return zero; diff --git a/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol index 5dc16fda..22af4185 100644 --- a/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol @@ -35,7 +35,7 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `function signed_zero() public pure returns (int256) {` + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { int256 zero = -1; return zero; diff --git a/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol index 189644ec..e241973d 100644 --- a/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol @@ -35,7 +35,7 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `function signed_zero() public pure returns (int256) {` + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { int256 zero = 1; return zero; diff --git a/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol index c2a1c544..f2cb8295 100644 --- a/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol @@ -17,7 +17,7 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `function unsigned_one() public pure returns (uint256) {` + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { uint256 one = 0; return one; diff --git a/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol index 5ab66ba2..d18c6c48 100644 --- a/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol @@ -17,7 +17,7 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `function unsigned_one() public pure returns (uint256) {` + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { uint256 one = 2; return one; diff --git a/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol index 36f8cc18..173dc540 100644 --- a/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol @@ -23,7 +23,7 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {` + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { int256 neg_one = 0; return neg_one; diff --git a/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol index 133b1662..72ffaedf 100644 --- a/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol @@ -23,7 +23,7 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `function signed_neg_one() public pure returns (int256) {` + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { int256 neg_one = 1; return neg_one; diff --git a/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol index 36f8cc18..173dc540 100644 --- a/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol @@ -23,7 +23,7 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {` + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { int256 neg_one = 0; return neg_one; diff --git a/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol index 0d9d0db1..e088a4e3 100644 --- a/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol @@ -29,7 +29,7 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `function signed_pos_one() public pure returns (int256) {` + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { int256 pos_one = 0; return pos_one; diff --git a/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol index a4306e44..2407079e 100644 --- a/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol @@ -29,7 +29,7 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `function signed_pos_one() public pure returns (int256) {` + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { int256 pos_one = -1; return pos_one; diff --git a/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol index e45a7d13..a5082f3b 100644 --- a/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol @@ -29,7 +29,7 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `function signed_pos_one() public pure returns (int256) {` + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { int256 pos_one = 2; return pos_one; diff --git a/resources/regressions/ror.json/gambit_results.json b/resources/regressions/ror.json/gambit_results.json index 51d32fd5..8cfc58e6 100644 --- a/resources/regressions/ror.json/gambit_results.json +++ b/resources/regressions/ror.json/gambit_results.json @@ -1,196 +1,196 @@ [ { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "1", "name": "mutants/1/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "2", "name": "mutants/2/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "3", "name": "mutants/3/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "4", "name": "mutants/4/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "5", "name": "mutants/5/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "6", "name": "mutants/6/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "7", "name": "mutants/7/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "8", "name": "mutants/8/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "9", "name": "mutants/9/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "10", "name": "mutants/10/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "11", "name": "mutants/11/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "12", "name": "mutants/12/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "13", "name": "mutants/13/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "14", "name": "mutants/14/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", "id": "15", "name": "mutants/15/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "16", "name": "mutants/16/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "17", "name": "mutants/17/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "18", "name": "mutants/18/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "19", "name": "mutants/19/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", "id": "20", "name": "mutants/20/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "21", "name": "mutants/21/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "22", "name": "mutants/22/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "23", "name": "mutants/23/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "24", "name": "mutants/24/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "25", "name": "mutants/25/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", "id": "26", "name": "mutants/26/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", "id": "27", "name": "mutants/27/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", "id": "28", "name": "mutants/28/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", diff --git a/resources/regressions/ror.json/mutants/1/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/1/Ops/ROR/ROR.sol index 702970ed..dec84f24 100644 --- a/resources/regressions/ror.json/mutants/1/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/1/Ops/ROR/ROR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `<=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { return x <= y; } diff --git a/resources/regressions/ror.json/mutants/10/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/10/Ops/ROR/ROR.sol index 6f949f30..337c9a92 100644 --- a/resources/regressions/ror.json/mutants/10/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/10/Ops/ROR/ROR.sol @@ -20,7 +20,7 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { return x > y; } diff --git a/resources/regressions/ror.json/mutants/11/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/11/Ops/ROR/ROR.sol index bbd7a0dd..7c02b73b 100644 --- a/resources/regressions/ror.json/mutants/11/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/11/Ops/ROR/ROR.sol @@ -20,7 +20,7 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { return x == y; } diff --git a/resources/regressions/ror.json/mutants/12/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/12/Ops/ROR/ROR.sol index 1e265ce4..3d299dfb 100644 --- a/resources/regressions/ror.json/mutants/12/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/12/Ops/ROR/ROR.sol @@ -20,7 +20,7 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { return true; } diff --git a/resources/regressions/ror.json/mutants/13/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/13/Ops/ROR/ROR.sol index 54f533c7..c865469b 100644 --- a/resources/regressions/ror.json/mutants/13/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/13/Ops/ROR/ROR.sol @@ -25,7 +25,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `<=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { return x <= y; } diff --git a/resources/regressions/ror.json/mutants/14/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/14/Ops/ROR/ROR.sol index 178c6ef3..8cdc1c10 100644 --- a/resources/regressions/ror.json/mutants/14/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/14/Ops/ROR/ROR.sol @@ -25,7 +25,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `>=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { return x >= y; } diff --git a/resources/regressions/ror.json/mutants/15/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/15/Ops/ROR/ROR.sol index cef8eda4..de6a4360 100644 --- a/resources/regressions/ror.json/mutants/15/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/15/Ops/ROR/ROR.sol @@ -25,7 +25,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { return false; } diff --git a/resources/regressions/ror.json/mutants/16/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/16/Ops/ROR/ROR.sol index 9ccc07ad..e2798373 100644 --- a/resources/regressions/ror.json/mutants/16/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/16/Ops/ROR/ROR.sol @@ -30,7 +30,7 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { return true; } diff --git a/resources/regressions/ror.json/mutants/17/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/17/Ops/ROR/ROR.sol index c8455bbd..ab40e6c9 100644 --- a/resources/regressions/ror.json/mutants/17/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/17/Ops/ROR/ROR.sol @@ -30,7 +30,7 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { return false; } diff --git a/resources/regressions/ror.json/mutants/18/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/18/Ops/ROR/ROR.sol index b4611f6a..f42e7b7e 100644 --- a/resources/regressions/ror.json/mutants/18/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/18/Ops/ROR/ROR.sol @@ -35,7 +35,7 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { return x < y; } diff --git a/resources/regressions/ror.json/mutants/19/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/19/Ops/ROR/ROR.sol index b64ac68a..e5f50322 100644 --- a/resources/regressions/ror.json/mutants/19/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/19/Ops/ROR/ROR.sol @@ -35,7 +35,7 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { return x > y; } diff --git a/resources/regressions/ror.json/mutants/2/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/2/Ops/ROR/ROR.sol index 9f373363..0c05265c 100644 --- a/resources/regressions/ror.json/mutants/2/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/2/Ops/ROR/ROR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `!=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { return x != y; } diff --git a/resources/regressions/ror.json/mutants/20/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/20/Ops/ROR/ROR.sol index 01df1502..83684484 100644 --- a/resources/regressions/ror.json/mutants/20/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/20/Ops/ROR/ROR.sol @@ -35,7 +35,7 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { return true; } diff --git a/resources/regressions/ror.json/mutants/21/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/21/Ops/ROR/ROR.sol index 24c9bd52..3ae92133 100644 --- a/resources/regressions/ror.json/mutants/21/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/21/Ops/ROR/ROR.sol @@ -40,7 +40,7 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { return true; } diff --git a/resources/regressions/ror.json/mutants/22/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/22/Ops/ROR/ROR.sol index 02e292bf..b137a5bd 100644 --- a/resources/regressions/ror.json/mutants/22/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/22/Ops/ROR/ROR.sol @@ -40,7 +40,7 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { return false; } diff --git a/resources/regressions/ror.json/mutants/23/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/23/Ops/ROR/ROR.sol index ca40eb15..bdeac3af 100644 --- a/resources/regressions/ror.json/mutants/23/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/23/Ops/ROR/ROR.sol @@ -49,7 +49,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { return (x + y) > z; } diff --git a/resources/regressions/ror.json/mutants/24/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/24/Ops/ROR/ROR.sol index e5431891..430379f6 100644 --- a/resources/regressions/ror.json/mutants/24/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/24/Ops/ROR/ROR.sol @@ -49,7 +49,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { return (x + y) == z; } diff --git a/resources/regressions/ror.json/mutants/25/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/25/Ops/ROR/ROR.sol index 52200b58..3d67c155 100644 --- a/resources/regressions/ror.json/mutants/25/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/25/Ops/ROR/ROR.sol @@ -49,7 +49,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { return true; } diff --git a/resources/regressions/ror.json/mutants/26/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/26/Ops/ROR/ROR.sol index b7ada02e..13612614 100644 --- a/resources/regressions/ror.json/mutants/26/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/26/Ops/ROR/ROR.sol @@ -58,7 +58,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { return (x + y) < z; } diff --git a/resources/regressions/ror.json/mutants/27/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/27/Ops/ROR/ROR.sol index 4a913691..dd0c83ca 100644 --- a/resources/regressions/ror.json/mutants/27/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/27/Ops/ROR/ROR.sol @@ -58,7 +58,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { return (x + y) > z; } diff --git a/resources/regressions/ror.json/mutants/28/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/28/Ops/ROR/ROR.sol index 5e60497b..84889114 100644 --- a/resources/regressions/ror.json/mutants/28/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/28/Ops/ROR/ROR.sol @@ -58,7 +58,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { return true; } diff --git a/resources/regressions/ror.json/mutants/3/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/3/Ops/ROR/ROR.sol index b1e4be58..6141947b 100644 --- a/resources/regressions/ror.json/mutants/3/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/3/Ops/ROR/ROR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { return false; } diff --git a/resources/regressions/ror.json/mutants/4/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/4/Ops/ROR/ROR.sol index 798cab21..9f8ccd04 100644 --- a/resources/regressions/ror.json/mutants/4/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/4/Ops/ROR/ROR.sol @@ -10,7 +10,7 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `<`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { return x < y; } diff --git a/resources/regressions/ror.json/mutants/5/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/5/Ops/ROR/ROR.sol index 2f618548..18e38f34 100644 --- a/resources/regressions/ror.json/mutants/5/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/5/Ops/ROR/ROR.sol @@ -10,7 +10,7 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `==`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { return x == y; } diff --git a/resources/regressions/ror.json/mutants/6/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/6/Ops/ROR/ROR.sol index 2fab50f3..55dd7c79 100644 --- a/resources/regressions/ror.json/mutants/6/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/6/Ops/ROR/ROR.sol @@ -10,7 +10,7 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { return true; } diff --git a/resources/regressions/ror.json/mutants/7/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/7/Ops/ROR/ROR.sol index 870659c2..52949d03 100644 --- a/resources/regressions/ror.json/mutants/7/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/7/Ops/ROR/ROR.sol @@ -15,7 +15,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `>=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { return x >= y; } diff --git a/resources/regressions/ror.json/mutants/8/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/8/Ops/ROR/ROR.sol index 09cfeee6..a3e16320 100644 --- a/resources/regressions/ror.json/mutants/8/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/8/Ops/ROR/ROR.sol @@ -15,7 +15,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `!=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { return x != y; } diff --git a/resources/regressions/ror.json/mutants/9/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/9/Ops/ROR/ROR.sol index 25e6a76b..a9024427 100644 --- a/resources/regressions/ror.json/mutants/9/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/9/Ops/ROR/ROR.sol @@ -15,7 +15,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { return false; } diff --git a/resources/regressions/test_import_map.json/gambit_results.json b/resources/regressions/test_import_map.json/gambit_results.json index 546d62c8..40071d4b 100644 --- a/resources/regressions/test_import_map.json/gambit_results.json +++ b/resources/regressions/test_import_map.json/gambit_results.json @@ -1,28 +1,28 @@ [ { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n }\n", "id": "1", "name": "mutants/1/contracts/Contract.sol", "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n }\n", "id": "2", "name": "mutants/2/contracts/Contract.sol", "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n }\n", "id": "3", "name": "mutants/3/contracts/Contract.sol", "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n }\n", "id": "4", "name": "mutants/4/contracts/Contract.sol", "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", diff --git a/resources/regressions/test_import_map.json/mutants/1/contracts/Contract.sol b/resources/regressions/test_import_map.json/mutants/1/contracts/Contract.sol index 69592dce..904c745c 100644 --- a/resources/regressions/test_import_map.json/mutants/1/contracts/Contract.sol +++ b/resources/regressions/test_import_map.json/mutants/1/contracts/Contract.sol @@ -5,7 +5,7 @@ import "@lib/Lib.sol"; import "contracts/B.sol"; contract Contract { - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a - b; } diff --git a/resources/regressions/test_import_map.json/mutants/2/contracts/Contract.sol b/resources/regressions/test_import_map.json/mutants/2/contracts/Contract.sol index d83192db..ba456fad 100644 --- a/resources/regressions/test_import_map.json/mutants/2/contracts/Contract.sol +++ b/resources/regressions/test_import_map.json/mutants/2/contracts/Contract.sol @@ -5,7 +5,7 @@ import "@lib/Lib.sol"; import "contracts/B.sol"; contract Contract { - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a * b; } diff --git a/resources/regressions/test_import_map.json/mutants/3/contracts/Contract.sol b/resources/regressions/test_import_map.json/mutants/3/contracts/Contract.sol index 4d045a65..98d50aae 100644 --- a/resources/regressions/test_import_map.json/mutants/3/contracts/Contract.sol +++ b/resources/regressions/test_import_map.json/mutants/3/contracts/Contract.sol @@ -5,7 +5,7 @@ import "@lib/Lib.sol"; import "contracts/B.sol"; contract Contract { - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a / b; } diff --git a/resources/regressions/test_import_map.json/mutants/4/contracts/Contract.sol b/resources/regressions/test_import_map.json/mutants/4/contracts/Contract.sol index 15c2f340..cebc7f74 100644 --- a/resources/regressions/test_import_map.json/mutants/4/contracts/Contract.sol +++ b/resources/regressions/test_import_map.json/mutants/4/contracts/Contract.sol @@ -5,7 +5,7 @@ import "@lib/Lib.sol"; import "contracts/B.sol"; contract Contract { - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a % b; } diff --git a/resources/regressions/test_log_invalid.json/gambit_results.json b/resources/regressions/test_log_invalid.json/gambit_results.json index d2da62fd..178d4fd0 100644 --- a/resources/regressions/test_log_invalid.json/gambit_results.json +++ b/resources/regressions/test_log_invalid.json/gambit_results.json @@ -1,532 +1,532 @@ [ { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "9", "name": "mutants/9/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "10", "name": "mutants/10/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "18", "name": "mutants/18/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "19", "name": "mutants/19/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "20", "name": "mutants/20/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "21", "name": "mutants/21/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "22", "name": "mutants/22/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ConditionalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `function bw_or(int256 a, int256 b) public pure returns (int256) {`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", "id": "23", "name": "mutants/23/BOR/BOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", }, { "description": "ConditionalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `function bw_and(int256 a, int256 b) public pure returns (int256) {`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", "id": "24", "name": "mutants/24/BOR/BOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", }, { "description": "ConditionalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `function bw_xor(int256 a, int256 b) public pure returns (int256) {`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", "id": "25", "name": "mutants/25/BOR/BOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", }, { "description": "ElimDelegateCall", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `function setVars(address _contract) public payable {`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", "id": "26", "name": "mutants/26/EDC/EDC.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", "id": "27", "name": "mutants/27/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", "id": "28", "name": "mutants/28/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `function and(bool a, bool b) public pure returns (bool) {`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", "id": "29", "name": "mutants/29/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "30", "name": "mutants/30/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "31", "name": "mutants/31/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `function or(bool a, bool b) public pure returns (bool) {`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "32", "name": "mutants/32/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", "id": "33", "name": "mutants/33/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", "id": "34", "name": "mutants/34/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", "id": "35", "name": "mutants/35/LOR/LOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `function unsigned_zero() public pure returns (uint256) {`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", "id": "36", "name": "mutants/36/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function unsigned_one() public pure returns (uint256) {`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", "id": "37", "name": "mutants/37/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function unsigned_one() public pure returns (uint256) {`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", "id": "38", "name": "mutants/38/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "39", "name": "mutants/39/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", "id": "40", "name": "mutants/40/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "41", "name": "mutants/41/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", "id": "42", "name": "mutants/42/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", "id": "43", "name": "mutants/43/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function signed_pos_one() public pure returns (int256) {`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", "id": "44", "name": "mutants/44/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `function signed_zero() public pure returns (int256) {`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", "id": "45", "name": "mutants/45/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `function signed_zero() public pure returns (int256) {`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", "id": "46", "name": "mutants/46/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "47", "name": "mutants/47/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "48", "name": "mutants/48/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "49", "name": "mutants/49/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "50", "name": "mutants/50/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "51", "name": "mutants/51/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "52", "name": "mutants/52/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "53", "name": "mutants/53/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "54", "name": "mutants/54/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "55", "name": "mutants/55/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "56", "name": "mutants/56/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "57", "name": "mutants/57/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "58", "name": "mutants/58/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "59", "name": "mutants/59/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "60", "name": "mutants/60/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", "id": "61", "name": "mutants/61/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "62", "name": "mutants/62/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "63", "name": "mutants/63/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "64", "name": "mutants/64/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "65", "name": "mutants/65/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", "id": "66", "name": "mutants/66/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "67", "name": "mutants/67/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "68", "name": "mutants/68/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "69", "name": "mutants/69/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "70", "name": "mutants/70/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "71", "name": "mutants/71/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", "id": "72", "name": "mutants/72/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", "id": "73", "name": "mutants/73/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `) public pure returns (bool) {`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", "id": "74", "name": "mutants/74/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", }, { "description": "UnaryOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `function signed_bw_not(int256 x) public pure returns (int256) {`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", "id": "75", "name": "mutants/75/UOR/UOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", }, { "description": "UnaryOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `function signed_neg(int256 x) public pure returns (int256) {`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", "id": "76", "name": "mutants/76/UOR/UOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", diff --git a/resources/regressions/test_log_invalid.json/mutants/1/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/1/AOR/AOR.sol index 0bf48eb3..9b516ff5 100644 --- a/resources/regressions/test_log_invalid.json/mutants/1/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/1/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a - b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/10/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/10/AOR/AOR.sol index 2af6a527..c31b43fc 100644 --- a/resources/regressions/test_log_invalid.json/mutants/10/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/10/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) - b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/11/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/11/AOR/AOR.sol index 7023f526..823139e5 100644 --- a/resources/regressions/test_log_invalid.json/mutants/11/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/11/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) / b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/12/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/12/AOR/AOR.sol index 7f3fb060..aa4ecd06 100644 --- a/resources/regressions/test_log_invalid.json/mutants/12/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/12/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) % b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/13/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/13/AOR/AOR.sol index c5bae4da..8666cef6 100644 --- a/resources/regressions/test_log_invalid.json/mutants/13/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/13/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) + b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/14/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/14/AOR/AOR.sol index c694d72e..4d3c74db 100644 --- a/resources/regressions/test_log_invalid.json/mutants/14/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/14/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) - b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/15/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/15/AOR/AOR.sol index 19b65f09..f9a4969d 100644 --- a/resources/regressions/test_log_invalid.json/mutants/15/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/15/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) / b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/16/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/16/AOR/AOR.sol index 4b20e4c5..3706f5c1 100644 --- a/resources/regressions/test_log_invalid.json/mutants/16/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/16/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) ** b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/17/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/17/AOR/AOR.sol index 44cb1b9b..67aa6b37 100644 --- a/resources/regressions/test_log_invalid.json/mutants/17/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/17/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) % b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/18/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/18/AOR/AOR.sol index 0ab879c1..b5770226 100644 --- a/resources/regressions/test_log_invalid.json/mutants/18/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/18/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a + b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/19/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/19/AOR/AOR.sol index 81aa5028..fbde14d5 100644 --- a/resources/regressions/test_log_invalid.json/mutants/19/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/19/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a - b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/2/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/2/AOR/AOR.sol index 6e93b2bb..2e38a567 100644 --- a/resources/regressions/test_log_invalid.json/mutants/2/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/2/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a * b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/20/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/20/AOR/AOR.sol index b5cb7df8..92cbf4d1 100644 --- a/resources/regressions/test_log_invalid.json/mutants/20/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/20/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a * b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/21/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/21/AOR/AOR.sol index ab78d9a3..e3c60678 100644 --- a/resources/regressions/test_log_invalid.json/mutants/21/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/21/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a / b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/22/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/22/AOR/AOR.sol index b07036aa..c63f66b8 100644 --- a/resources/regressions/test_log_invalid.json/mutants/22/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/22/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a % b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/23/BOR/BOR.sol b/resources/regressions/test_log_invalid.json/mutants/23/BOR/BOR.sol index ecbde264..34a280f5 100644 --- a/resources/regressions/test_log_invalid.json/mutants/23/BOR/BOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/23/BOR/BOR.sol @@ -6,7 +6,7 @@ pragma experimental ABIEncoderV2; contract BOR { // Expect 1 mutants: // a & b; - /// ConditionalOperatorReplacement(`|` |==> `&`) of: `function bw_or(int256 a, int256 b) public pure returns (int256) {` + /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;` function bw_or(int256 a, int256 b) public pure returns (int256) { return a & b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/24/BOR/BOR.sol b/resources/regressions/test_log_invalid.json/mutants/24/BOR/BOR.sol index 0b930c8b..4bfbc16d 100644 --- a/resources/regressions/test_log_invalid.json/mutants/24/BOR/BOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/24/BOR/BOR.sol @@ -12,7 +12,7 @@ contract BOR { // Expect 1 mutants: // a | b; - /// ConditionalOperatorReplacement(`&` |==> `|`) of: `function bw_and(int256 a, int256 b) public pure returns (int256) {` + /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;` function bw_and(int256 a, int256 b) public pure returns (int256) { return a | b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/25/BOR/BOR.sol b/resources/regressions/test_log_invalid.json/mutants/25/BOR/BOR.sol index 38c31bb9..d4ee4343 100644 --- a/resources/regressions/test_log_invalid.json/mutants/25/BOR/BOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/25/BOR/BOR.sol @@ -18,7 +18,7 @@ contract BOR { // Expect 1 mutants: // a | b; - /// ConditionalOperatorReplacement(`^` |==> `&`) of: `function bw_xor(int256 a, int256 b) public pure returns (int256) {` + /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;` function bw_xor(int256 a, int256 b) public pure returns (int256) { return a & b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol b/resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol index 116f6d30..19754976 100644 --- a/resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol +++ b/resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol @@ -12,7 +12,7 @@ contract EDC { bool public delegateSuccessful; bytes public myData; - /// ElimDelegateCall(`delegatecall` |==> `call`) of: `function setVars(address _contract) public payable {` + /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(` function setVars(address _contract) public payable { (bool success, ) = _contract.call( abi.encodeWithSignature("setVars(uint256)", 1) diff --git a/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol index c53deb85..67f4f5df 100644 --- a/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `function and(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { return a; } diff --git a/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol index aca2816e..d63286bb 100644 --- a/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `function and(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { return b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol index 22f2231c..0e5805db 100644 --- a/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `function and(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { return false; } diff --git a/resources/regressions/test_log_invalid.json/mutants/3/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/3/AOR/AOR.sol index f5716560..60a969dc 100644 --- a/resources/regressions/test_log_invalid.json/mutants/3/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/3/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a / b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol index fe893a77..06fbf70c 100644 --- a/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol @@ -10,7 +10,7 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `function or(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { return a; } diff --git a/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol index 5f462cfb..620f1630 100644 --- a/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol @@ -10,7 +10,7 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `function or(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { return b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol index 908f3789..29afb982 100644 --- a/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol @@ -10,7 +10,7 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `function or(bool a, bool b) public pure returns (bool) {` + /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { return true; } diff --git a/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol index abd8b54a..eb339ae7 100644 --- a/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol @@ -15,7 +15,7 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { return x < y; } diff --git a/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol index c8114f8a..fb49fdaf 100644 --- a/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol @@ -15,7 +15,7 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { return a != (x >= y); } diff --git a/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol index 7345fcb8..0d9c28b2 100644 --- a/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol @@ -15,7 +15,7 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `function more_or(bool a, int x, int y) public pure returns (bool) {` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { return true; } diff --git a/resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol index 98b6efde..e06271e2 100644 --- a/resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol @@ -11,7 +11,7 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `function unsigned_zero() public pure returns (uint256) {` + /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { uint256 zero = 1; return zero; diff --git a/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol index c2a1c544..f2cb8295 100644 --- a/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol @@ -17,7 +17,7 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `function unsigned_one() public pure returns (uint256) {` + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { uint256 one = 0; return one; diff --git a/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol index 5ab66ba2..d18c6c48 100644 --- a/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol @@ -17,7 +17,7 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `function unsigned_one() public pure returns (uint256) {` + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { uint256 one = 2; return one; diff --git a/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol index 36f8cc18..173dc540 100644 --- a/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol @@ -23,7 +23,7 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {` + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { int256 neg_one = 0; return neg_one; diff --git a/resources/regressions/test_log_invalid.json/mutants/4/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/4/AOR/AOR.sol index b6ab1ee7..61a88541 100644 --- a/resources/regressions/test_log_invalid.json/mutants/4/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/4/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a % b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol index 133b1662..72ffaedf 100644 --- a/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol @@ -23,7 +23,7 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `function signed_neg_one() public pure returns (int256) {` + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { int256 neg_one = 1; return neg_one; diff --git a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol index 36f8cc18..173dc540 100644 --- a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol @@ -23,7 +23,7 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `function signed_neg_one() public pure returns (int256) {` + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { int256 neg_one = 0; return neg_one; diff --git a/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol index 0d9d0db1..e088a4e3 100644 --- a/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol @@ -29,7 +29,7 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `function signed_pos_one() public pure returns (int256) {` + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { int256 pos_one = 0; return pos_one; diff --git a/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol index a4306e44..2407079e 100644 --- a/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol @@ -29,7 +29,7 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `function signed_pos_one() public pure returns (int256) {` + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { int256 pos_one = -1; return pos_one; diff --git a/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol index e45a7d13..a5082f3b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol @@ -29,7 +29,7 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `function signed_pos_one() public pure returns (int256) {` + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { int256 pos_one = 2; return pos_one; diff --git a/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol index 5dc16fda..22af4185 100644 --- a/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol @@ -35,7 +35,7 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `function signed_zero() public pure returns (int256) {` + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { int256 zero = -1; return zero; diff --git a/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol index 189644ec..e241973d 100644 --- a/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol @@ -35,7 +35,7 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `function signed_zero() public pure returns (int256) {` + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { int256 zero = 1; return zero; diff --git a/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol index 702970ed..dec84f24 100644 --- a/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `<=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { return x <= y; } diff --git a/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol index 9f373363..0c05265c 100644 --- a/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `!=`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { return x != y; } diff --git a/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol index b1e4be58..6141947b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `function less(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { return false; } diff --git a/resources/regressions/test_log_invalid.json/mutants/5/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/5/AOR/AOR.sol index aadef707..60846bdb 100644 --- a/resources/regressions/test_log_invalid.json/mutants/5/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/5/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a + b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol index 798cab21..9f8ccd04 100644 --- a/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol @@ -10,7 +10,7 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `<`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { return x < y; } diff --git a/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol index 2f618548..18e38f34 100644 --- a/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol @@ -10,7 +10,7 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `==`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { return x == y; } diff --git a/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol index 2fab50f3..55dd7c79 100644 --- a/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol @@ -10,7 +10,7 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `function less_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { return true; } diff --git a/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol index 870659c2..52949d03 100644 --- a/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol @@ -15,7 +15,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `>=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { return x >= y; } diff --git a/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol index 09cfeee6..a3e16320 100644 --- a/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol @@ -15,7 +15,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `!=`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { return x != y; } diff --git a/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol index 25e6a76b..a9024427 100644 --- a/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol @@ -15,7 +15,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `function more(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { return false; } diff --git a/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol index 6f949f30..337c9a92 100644 --- a/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol @@ -20,7 +20,7 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { return x > y; } diff --git a/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol index bbd7a0dd..7c02b73b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol @@ -20,7 +20,7 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { return x == y; } diff --git a/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol index 1e265ce4..3d299dfb 100644 --- a/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol @@ -20,7 +20,7 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `function more_equal(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { return true; } diff --git a/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol index 54f533c7..c865469b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol @@ -25,7 +25,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `<=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { return x <= y; } diff --git a/resources/regressions/test_log_invalid.json/mutants/6/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/6/AOR/AOR.sol index 7e16e706..2ca17b19 100644 --- a/resources/regressions/test_log_invalid.json/mutants/6/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/6/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a * b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol index 178c6ef3..8cdc1c10 100644 --- a/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol @@ -25,7 +25,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `>=`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { return x >= y; } diff --git a/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol index cef8eda4..de6a4360 100644 --- a/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol @@ -25,7 +25,7 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { return false; } diff --git a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol index 9ccc07ad..e2798373 100644 --- a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol @@ -30,7 +30,7 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { return true; } diff --git a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol index c8455bbd..ab40e6c9 100644 --- a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol @@ -30,7 +30,7 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `function equal_not_ord(bool x, bool y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { return false; } diff --git a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol index b4611f6a..f42e7b7e 100644 --- a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol @@ -35,7 +35,7 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { return x < y; } diff --git a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol index b64ac68a..e5f50322 100644 --- a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol @@ -35,7 +35,7 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { return x > y; } diff --git a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol index 01df1502..83684484 100644 --- a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol @@ -35,7 +35,7 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { return true; } diff --git a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol index 24c9bd52..3ae92133 100644 --- a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol @@ -40,7 +40,7 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { return true; } diff --git a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol index 02e292bf..b137a5bd 100644 --- a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol @@ -40,7 +40,7 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `function not_equal_not_ord(bool x, bool y) public pure returns (bool) {` + /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { return false; } diff --git a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol index ca40eb15..bdeac3af 100644 --- a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol @@ -49,7 +49,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { return (x + y) > z; } diff --git a/resources/regressions/test_log_invalid.json/mutants/7/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/7/AOR/AOR.sol index 3b94bb20..c07a6aeb 100644 --- a/resources/regressions/test_log_invalid.json/mutants/7/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/7/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a / b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol index e5431891..430379f6 100644 --- a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol @@ -49,7 +49,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { return (x + y) == z; } diff --git a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol index 52200b58..3d67c155 100644 --- a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol @@ -49,7 +49,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { return true; } diff --git a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol index b7ada02e..13612614 100644 --- a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol @@ -58,7 +58,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { return (x + y) < z; } diff --git a/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol index 4a913691..dd0c83ca 100644 --- a/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol @@ -58,7 +58,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { return (x + y) > z; } diff --git a/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol index 5e60497b..84889114 100644 --- a/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol @@ -58,7 +58,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `) public pure returns (bool) {` + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { return true; } diff --git a/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol index 4066c6e6..5697ce92 100644 --- a/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol @@ -10,7 +10,7 @@ contract UOR { } // Expect a single mutant: -x - /// UnaryOperatorReplacement(`` |==> ` - `) of: `function signed_bw_not(int256 x) public pure returns (int256) {` + /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;` function signed_bw_not(int256 x) public pure returns (int256) { return - ~x; } diff --git a/resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol index f2828633..8a21a9d0 100644 --- a/resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol @@ -15,7 +15,7 @@ contract UOR { } // Expect a single mutant: ~x - /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `function signed_neg(int256 x) public pure returns (int256) {` + /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;` function signed_neg(int256 x) public pure returns (int256) { return ~ -x; } diff --git a/resources/regressions/test_log_invalid.json/mutants/8/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/8/AOR/AOR.sol index 8f8abb63..bd874f10 100644 --- a/resources/regressions/test_log_invalid.json/mutants/8/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/8/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a % b; } diff --git a/resources/regressions/test_log_invalid.json/mutants/9/AOR/AOR.sol b/resources/regressions/test_log_invalid.json/mutants/9/AOR/AOR.sol index 618e784d..5d9ca896 100644 --- a/resources/regressions/test_log_invalid.json/mutants/9/AOR/AOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/9/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) + b; } diff --git a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json index f0ee3d5b..3c9d5729 100644 --- a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json @@ -1,350 +1,350 @@ [ { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "1", "name": "mutants/1/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "27", "name": "mutants/27/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol index 2b897019..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol index bd19211d..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol @@ -15,7 +15,7 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;` + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; assert(true); } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol index 78fb8fff..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol @@ -19,7 +19,7 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 0; uint256 res = a ** decimals; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol index 636ec2a5..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol @@ -19,7 +19,7 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 11; uint256 res = a ** decimals; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol index 55c70e64..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a + decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol index d1dd4817..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a - decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol index ab7d6850..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a * decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol index 0f717ac0..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a / decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol index fc066a0b..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a % decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol index 5855f2b1..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol @@ -21,7 +21,7 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;` + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; assert(true); } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol index b0df3143..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol @@ -25,7 +25,7 @@ contract C { return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol index 9b7c4f8f..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol index 6db2ec1f..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol @@ -30,7 +30,7 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();` + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); assert(true); } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol index 1f74417d..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol index f51cc82f..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c - d; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol index 6c5aaae7..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c * d; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol index ae66ae12..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c / d; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol index 363381e5..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c % d; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol index 2b897019..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol index 9b7c4f8f..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol index 7d4cc026..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a - b; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol index c4dbc3b0..86125329 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a * b; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol index 7d4cc026..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a - b; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol index 14f324bf..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a / b; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol index d1846219..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a % b; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol index 11fcfc14..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol @@ -13,7 +13,7 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {` + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { address[] memory a = new address[](0); a[0] = msg.sender; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol index fa48e881..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol @@ -13,7 +13,7 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {` + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { address[] memory a = new address[](2); a[0] = msg.sender; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol index 71c41805..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol @@ -14,7 +14,7 @@ library Utils { contract C { function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);` + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); assert(true); return a; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol index bd19211d..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol @@ -15,7 +15,7 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;` + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; assert(true); } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol index 78fb8fff..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol @@ -19,7 +19,7 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 0; uint256 res = a ** decimals; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol index 636ec2a5..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol @@ -19,7 +19,7 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 11; uint256 res = a ** decimals; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol index 55c70e64..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a + decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol index d1dd4817..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a - decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol index c4dbc3b0..86125329 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a * b; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol index ab7d6850..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a * decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol index 0f717ac0..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a / decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol index fc066a0b..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a % decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol index 5855f2b1..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol @@ -21,7 +21,7 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;` + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; assert(true); } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol index b0df3143..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol @@ -25,7 +25,7 @@ contract C { return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol index 6db2ec1f..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol @@ -30,7 +30,7 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();` + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); assert(true); } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol index 1f74417d..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol index f51cc82f..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c - d; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol index 6c5aaae7..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c * d; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol index ae66ae12..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c / d; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol index 14f324bf..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a / b; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol index 363381e5..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c % d; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol index d1846219..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a % b; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol index 11fcfc14..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol @@ -13,7 +13,7 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {` + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { address[] memory a = new address[](0); a[0] = msg.sender; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol index fa48e881..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol @@ -13,7 +13,7 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {` + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { address[] memory a = new address[](2); a[0] = msg.sender; diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol index 71c41805..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol @@ -14,7 +14,7 @@ library Utils { contract C { function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);` + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); assert(true); return a; diff --git a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json index f0ee3d5b..3c9d5729 100644 --- a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json @@ -1,350 +1,350 @@ [ { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "1", "name": "mutants/1/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "27", "name": "mutants/27/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol index 2b897019..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol index bd19211d..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol @@ -15,7 +15,7 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;` + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; assert(true); } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol index 78fb8fff..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol @@ -19,7 +19,7 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 0; uint256 res = a ** decimals; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol index 636ec2a5..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol @@ -19,7 +19,7 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 11; uint256 res = a ** decimals; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol index 55c70e64..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a + decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol index d1dd4817..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a - decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol index ab7d6850..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a * decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol index 0f717ac0..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a / decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol index fc066a0b..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a % decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol index 5855f2b1..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol @@ -21,7 +21,7 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;` + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; assert(true); } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol index b0df3143..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol @@ -25,7 +25,7 @@ contract C { return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol index 9b7c4f8f..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol index 6db2ec1f..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol @@ -30,7 +30,7 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();` + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); assert(true); } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol index 1f74417d..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol index f51cc82f..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c - d; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol index 6c5aaae7..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c * d; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol index ae66ae12..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c / d; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol index 363381e5..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c % d; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol index 2b897019..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol index 9b7c4f8f..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol index 7d4cc026..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a - b; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol index c4dbc3b0..86125329 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a * b; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol index 7d4cc026..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a - b; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol index 14f324bf..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a / b; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol index d1846219..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a % b; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol index 11fcfc14..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol @@ -13,7 +13,7 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {` + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { address[] memory a = new address[](0); a[0] = msg.sender; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol index fa48e881..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol @@ -13,7 +13,7 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {` + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { address[] memory a = new address[](2); a[0] = msg.sender; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol index 71c41805..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol @@ -14,7 +14,7 @@ library Utils { contract C { function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);` + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); assert(true); return a; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol index bd19211d..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol @@ -15,7 +15,7 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;` + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; assert(true); } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol index 78fb8fff..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol @@ -19,7 +19,7 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 0; uint256 res = a ** decimals; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol index 636ec2a5..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol @@ -19,7 +19,7 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 11; uint256 res = a ** decimals; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol index 55c70e64..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a + decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol index d1dd4817..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a - decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol index c4dbc3b0..86125329 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a * b; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol index ab7d6850..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a * decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol index 0f717ac0..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a / decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol index fc066a0b..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a % decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol index 5855f2b1..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol @@ -21,7 +21,7 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;` + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; assert(true); } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol index b0df3143..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol @@ -25,7 +25,7 @@ contract C { return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol index 6db2ec1f..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol @@ -30,7 +30,7 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();` + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); assert(true); } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol index 1f74417d..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol index f51cc82f..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c - d; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol index 6c5aaae7..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c * d; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol index ae66ae12..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c / d; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol index 14f324bf..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a / b; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol index 363381e5..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c % d; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol index d1846219..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a % b; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol index 11fcfc14..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol @@ -13,7 +13,7 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {` + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { address[] memory a = new address[](0); a[0] = msg.sender; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol index fa48e881..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol @@ -13,7 +13,7 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {` + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { address[] memory a = new address[](2); a[0] = msg.sender; diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol index 71c41805..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol @@ -14,7 +14,7 @@ library Utils { contract C { function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);` + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); assert(true); return a; diff --git a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json index f0ee3d5b..3c9d5729 100644 --- a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json @@ -1,350 +1,350 @@ [ { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "1", "name": "mutants/1/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "27", "name": "mutants/27/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol index 2b897019..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol index bd19211d..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol @@ -15,7 +15,7 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;` + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; assert(true); } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol index 78fb8fff..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol @@ -19,7 +19,7 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 0; uint256 res = a ** decimals; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol index 636ec2a5..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol @@ -19,7 +19,7 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 11; uint256 res = a ** decimals; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol index 55c70e64..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a + decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol index d1dd4817..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a - decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol index ab7d6850..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a * decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol index 0f717ac0..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a / decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol index fc066a0b..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a % decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol index 5855f2b1..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol @@ -21,7 +21,7 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;` + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; assert(true); } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol index b0df3143..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol @@ -25,7 +25,7 @@ contract C { return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol index 9b7c4f8f..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol index 6db2ec1f..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol @@ -30,7 +30,7 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();` + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); assert(true); } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol index 1f74417d..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol index f51cc82f..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c - d; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol index 6c5aaae7..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c * d; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol index ae66ae12..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c / d; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol index 363381e5..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c % d; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol index 2b897019..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol index 9b7c4f8f..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol index 7d4cc026..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a - b; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol index c4dbc3b0..86125329 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a * b; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol index 7d4cc026..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a - b; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol index 14f324bf..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a / b; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol index d1846219..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a % b; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol index 11fcfc14..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol @@ -13,7 +13,7 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {` + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { address[] memory a = new address[](0); a[0] = msg.sender; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol index fa48e881..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol @@ -13,7 +13,7 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {` + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { address[] memory a = new address[](2); a[0] = msg.sender; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol index 71c41805..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol @@ -14,7 +14,7 @@ library Utils { contract C { function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);` + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); assert(true); return a; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol index bd19211d..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol @@ -15,7 +15,7 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;` + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; assert(true); } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol index 78fb8fff..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol @@ -19,7 +19,7 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 0; uint256 res = a ** decimals; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol index 636ec2a5..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol @@ -19,7 +19,7 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 11; uint256 res = a ** decimals; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol index 55c70e64..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a + decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol index d1dd4817..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a - decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol index c4dbc3b0..86125329 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a * b; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol index ab7d6850..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a * decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol index 0f717ac0..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a / decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol index fc066a0b..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a % decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol index 5855f2b1..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol @@ -21,7 +21,7 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;` + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; assert(true); } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol index b0df3143..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol @@ -25,7 +25,7 @@ contract C { return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol index 6db2ec1f..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol @@ -30,7 +30,7 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();` + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); assert(true); } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol index 1f74417d..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { assert(true); } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol index f51cc82f..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c - d; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol index 6c5aaae7..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c * d; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol index ae66ae12..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c / d; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol index 14f324bf..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a / b; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol index 363381e5..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c % d; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol index d1846219..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a % b; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol index 11fcfc14..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol @@ -13,7 +13,7 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {` + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { address[] memory a = new address[](0); a[0] = msg.sender; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol index fa48e881..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol @@ -13,7 +13,7 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {` + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { address[] memory a = new address[](2); a[0] = msg.sender; diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol index 71c41805..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol @@ -14,7 +14,7 @@ library Utils { contract C { function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);` + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); assert(true); return a; diff --git a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json index 7310fa15..f24d2b32 100644 --- a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json @@ -1,182 +1,182 @@ [ { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "1", "name": "mutants/1/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol index 7d4cc026..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a - b; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol index f51cc82f..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c - d; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol index 6c5aaae7..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c * d; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol index ae66ae12..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c / d; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol index 363381e5..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c % d; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol index 7d4cc026..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a - b; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol index c4dbc3b0..86125329 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a * b; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol index 14f324bf..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a / b; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol index d1846219..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a % b; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol index 55c70e64..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a + decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol index d1dd4817..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a - decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol index c4dbc3b0..86125329 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a * b; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol index ab7d6850..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a * decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol index 0f717ac0..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a / decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol index fc066a0b..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a % decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol index f51cc82f..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c - d; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol index 6c5aaae7..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c * d; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol index ae66ae12..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c / d; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol index 363381e5..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c % d; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol index 14f324bf..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a / b; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol index d1846219..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a % b; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol index 55c70e64..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a + decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol index d1dd4817..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a - decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol index ab7d6850..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a * decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol index 0f717ac0..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a / decimals; return res; diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol index fc066a0b..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a % decimals; return res; diff --git a/resources/regressions/test_multiple_files_1.json/gambit_results.json b/resources/regressions/test_multiple_files_1.json/gambit_results.json index 1a74345a..a1b315da 100644 --- a/resources/regressions/test_multiple_files_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_files_1.json/gambit_results.json @@ -1,364 +1,364 @@ [ { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "9", "name": "mutants/9/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "10", "name": "mutants/10/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "18", "name": "mutants/18/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "19", "name": "mutants/19/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "20", "name": "mutants/20/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "21", "name": "mutants/21/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ assert(true);\n }\n }\n", "id": "22", "name": "mutants/22/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "23", "name": "mutants/23/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "24", "name": "mutants/24/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "25", "name": "mutants/25/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "26", "name": "mutants/26/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "27", "name": "mutants/27/Ops/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "51", "name": "mutants/51/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "52", "name": "mutants/52/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", diff --git a/resources/regressions/test_multiple_files_1.json/mutants/1/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/1/Ops/AOR/AOR.sol index 013ca45d..ff121e6b 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/1/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/1/Ops/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { assert(true); } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/10/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/10/Ops/AOR/AOR.sol index 8f8abb63..bd874f10 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/10/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/10/Ops/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a % b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/11/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/11/Ops/AOR/AOR.sol index 1820a4e0..d04b2742 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/11/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/11/Ops/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `) public pure returns (int256) {` + /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;` ) public pure returns (int256) { assert(true); } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/12/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/12/Ops/AOR/AOR.sol index 618e784d..5d9ca896 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/12/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/12/Ops/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) + b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/13/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/13/Ops/AOR/AOR.sol index 2af6a527..c31b43fc 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/13/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/13/Ops/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) - b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/14/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/14/Ops/AOR/AOR.sol index 7023f526..823139e5 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/14/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/14/Ops/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) / b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/15/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/15/Ops/AOR/AOR.sol index 7f3fb060..aa4ecd06 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/15/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/15/Ops/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) % b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/16/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/16/Ops/AOR/AOR.sol index d1a15b52..13eee610 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/16/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/16/Ops/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `) public pure returns (uint256) {` + /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;` ) public pure returns (uint256) { assert(true); } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/17/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/17/Ops/AOR/AOR.sol index c5bae4da..8666cef6 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/17/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/17/Ops/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) + b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/18/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/18/Ops/AOR/AOR.sol index c694d72e..4d3c74db 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/18/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/18/Ops/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) - b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/19/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/19/Ops/AOR/AOR.sol index 19b65f09..f9a4969d 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/19/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/19/Ops/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) / b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/2/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/2/Ops/AOR/AOR.sol index 0bf48eb3..9b516ff5 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/2/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/2/Ops/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a - b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/20/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/20/Ops/AOR/AOR.sol index 4b20e4c5..3706f5c1 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/20/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/20/Ops/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) ** b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/21/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/21/Ops/AOR/AOR.sol index 44cb1b9b..67aa6b37 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/21/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/21/Ops/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) % b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/22/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/22/Ops/AOR/AOR.sol index 5f7a7932..c49b0fc9 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/22/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/22/Ops/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { assert(true); } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/23/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/23/Ops/AOR/AOR.sol index 0ab879c1..b5770226 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/23/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/23/Ops/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a + b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/24/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/24/Ops/AOR/AOR.sol index 81aa5028..fbde14d5 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/24/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/24/Ops/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a - b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/25/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/25/Ops/AOR/AOR.sol index b5cb7df8..92cbf4d1 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/25/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/25/Ops/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a * b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/26/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/26/Ops/AOR/AOR.sol index ab78d9a3..e3c60678 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/26/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/26/Ops/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a / b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/27/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/27/Ops/AOR/AOR.sol index b07036aa..c63f66b8 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/27/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/27/Ops/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a % b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol index 2b897019..5f69007a 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) internal pure {` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { assert(true); } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol index 9b7c4f8f..f7a48737 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { assert(true); } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/3/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/3/Ops/AOR/AOR.sol index 6e93b2bb..2e38a567 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/3/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/3/Ops/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a * b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol index 7d4cc026..9e5f617a 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a - b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol index c4dbc3b0..86125329 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a * b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol index 14f324bf..e85ef12c 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a / b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol index d1846219..b32909ed 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol @@ -7,7 +7,7 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 a, int8 b) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { return a % b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol index 11fcfc14..f9a5de25 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol @@ -13,7 +13,7 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `function foo() external view returns (address[] memory) {` + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { address[] memory a = new address[](0); a[0] = msg.sender; diff --git a/resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol index fa48e881..16f8bc88 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol @@ -13,7 +13,7 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `function foo() external view returns (address[] memory) {` + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { address[] memory a = new address[](2); a[0] = msg.sender; diff --git a/resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol index 71c41805..427647a6 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol @@ -14,7 +14,7 @@ library Utils { contract C { function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `address[] memory a = new address[](1);` + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); assert(true); return a; diff --git a/resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol index bd19211d..a9342ea1 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol @@ -15,7 +15,7 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `a[0] = msg.sender;` + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; assert(true); } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol index 78fb8fff..f2136ed3 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol @@ -19,7 +19,7 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 0; uint256 res = a ** decimals; diff --git a/resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol index 636ec2a5..f69e3360 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol @@ -19,7 +19,7 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {` + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 11; uint256 res = a ** decimals; diff --git a/resources/regressions/test_multiple_files_1.json/mutants/4/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/4/Ops/AOR/AOR.sol index f5716560..60a969dc 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/4/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/4/Ops/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a / b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol index 55c70e64..13319cbe 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a + decimals; return res; diff --git a/resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol index d1dd4817..3279b41e 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a - decimals; return res; diff --git a/resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol index ab7d6850..95cc94e7 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a * decimals; return res; diff --git a/resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol index 0f717ac0..cc3476f1 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a / decimals; return res; diff --git a/resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol index fc066a0b..4979f42e 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol @@ -20,7 +20,7 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 a = 10;` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; uint256 res = a % decimals; return res; diff --git a/resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol index 5855f2b1..5933d066 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol @@ -21,7 +21,7 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `uint256 res = a ** decimals;` + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; assert(true); } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol index b0df3143..a4c6c970 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol @@ -25,7 +25,7 @@ contract C { return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `function getarray(address[] memory c, address e) public pure {` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { assert(true); } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol index 6db2ec1f..a14e05da 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol @@ -30,7 +30,7 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `address[] memory b = this.foo();` + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); assert(true); } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol index 1f74417d..4887a934 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { assert(true); } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol index f51cc82f..7a0c07d0 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c - d; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/5/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/5/Ops/AOR/AOR.sol index b6ab1ee7..61a88541 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/5/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/5/Ops/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a % b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol index 6c5aaae7..d73584b8 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c * d; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol index ae66ae12..c226dcfd 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c / d; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol index 363381e5..c6022ee9 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol @@ -34,7 +34,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function add(int8 c, int8 d) public pure returns (int8) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { return c % d; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/6/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/6/Ops/AOR/AOR.sol index 3540a7a1..c2a74b71 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/6/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/6/Ops/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { assert(true); } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/7/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/7/Ops/AOR/AOR.sol index aadef707..60846bdb 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/7/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/7/Ops/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a + b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/8/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/8/Ops/AOR/AOR.sol index 7e16e706..2ca17b19 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/8/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/8/Ops/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a * b; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/9/Ops/AOR/AOR.sol b/resources/regressions/test_multiple_files_1.json/mutants/9/Ops/AOR/AOR.sol index 3b94bb20..c07a6aeb 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/9/Ops/AOR/AOR.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/9/Ops/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a / b; } diff --git a/resources/regressions/test_no_export.json/gambit_results.json b/resources/regressions/test_no_export.json/gambit_results.json index 92d8255d..ae826ab5 100644 --- a/resources/regressions/test_no_export.json/gambit_results.json +++ b/resources/regressions/test_no_export.json/gambit_results.json @@ -1,196 +1,196 @@ [ { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "9", "name": "mutants/9/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "10", "name": "mutants/10/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "18", "name": "mutants/18/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "19", "name": "mutants/19/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "20", "name": "mutants/20/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "21", "name": "mutants/21/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ assert(true);\n }\n }\n", "id": "22", "name": "mutants/22/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "23", "name": "mutants/23/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "24", "name": "mutants/24/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "25", "name": "mutants/25/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "26", "name": "mutants/26/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "27", "name": "mutants/27/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ArithmeticOperatorReplacement(`|` |==> `+`) of: `function bw_or(int256 a, int256 b) public pure returns (int256) {`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a + b;\n }\n \n // Expect 1 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ArithmeticOperatorReplacement(`|` |==> `+`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a + b;\n }\n \n // Expect 1 mutants:\n", "id": "28", "name": "mutants/28/BOR/BOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", diff --git a/resources/regressions/test_num_mutants.json/gambit_results.json b/resources/regressions/test_num_mutants.json/gambit_results.json index 103be666..69762beb 100644 --- a/resources/regressions/test_num_mutants.json/gambit_results.json +++ b/resources/regressions/test_num_mutants.json/gambit_results.json @@ -1,35 +1,35 @@ [ { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", diff --git a/resources/regressions/test_num_mutants.json/mutants/1/AOR/AOR.sol b/resources/regressions/test_num_mutants.json/mutants/1/AOR/AOR.sol index 0bf48eb3..9b516ff5 100644 --- a/resources/regressions/test_num_mutants.json/mutants/1/AOR/AOR.sol +++ b/resources/regressions/test_num_mutants.json/mutants/1/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a - b; } diff --git a/resources/regressions/test_num_mutants.json/mutants/2/AOR/AOR.sol b/resources/regressions/test_num_mutants.json/mutants/2/AOR/AOR.sol index 2af6a527..c31b43fc 100644 --- a/resources/regressions/test_num_mutants.json/mutants/2/AOR/AOR.sol +++ b/resources/regressions/test_num_mutants.json/mutants/2/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) - b; } diff --git a/resources/regressions/test_num_mutants.json/mutants/3/AOR/AOR.sol b/resources/regressions/test_num_mutants.json/mutants/3/AOR/AOR.sol index 19b65f09..f9a4969d 100644 --- a/resources/regressions/test_num_mutants.json/mutants/3/AOR/AOR.sol +++ b/resources/regressions/test_num_mutants.json/mutants/3/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) / b; } diff --git a/resources/regressions/test_num_mutants.json/mutants/4/AOR/AOR.sol b/resources/regressions/test_num_mutants.json/mutants/4/AOR/AOR.sol index 4b20e4c5..3706f5c1 100644 --- a/resources/regressions/test_num_mutants.json/mutants/4/AOR/AOR.sol +++ b/resources/regressions/test_num_mutants.json/mutants/4/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) ** b; } diff --git a/resources/regressions/test_num_mutants.json/mutants/5/AOR/AOR.sol b/resources/regressions/test_num_mutants.json/mutants/5/AOR/AOR.sol index b5cb7df8..92cbf4d1 100644 --- a/resources/regressions/test_num_mutants.json/mutants/5/AOR/AOR.sol +++ b/resources/regressions/test_num_mutants.json/mutants/5/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a * b; } diff --git a/resources/regressions/test_seed.json/gambit_results.json b/resources/regressions/test_seed.json/gambit_results.json index 1484eefa..c8a479b2 100644 --- a/resources/regressions/test_seed.json/gambit_results.json +++ b/resources/regressions/test_seed.json/gambit_results.json @@ -1,70 +1,70 @@ [ { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `function minus(int256 a, int256 b) public pure returns (int256) {`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "8", "name": "mutants/8/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", + "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "9", "name": "mutants/9/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "10", "name": "mutants/10/AOR/AOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", diff --git a/resources/regressions/test_seed.json/mutants/1/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/1/AOR/AOR.sol index 6e93b2bb..2e38a567 100644 --- a/resources/regressions/test_seed.json/mutants/1/AOR/AOR.sol +++ b/resources/regressions/test_seed.json/mutants/1/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a * b; } diff --git a/resources/regressions/test_seed.json/mutants/10/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/10/AOR/AOR.sol index 0ab879c1..b5770226 100644 --- a/resources/regressions/test_seed.json/mutants/10/AOR/AOR.sol +++ b/resources/regressions/test_seed.json/mutants/10/AOR/AOR.sol @@ -54,7 +54,7 @@ contract AOR { // a * b // a % b - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `function power(uint256 a, uint256 b) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;` function power(uint256 a, uint256 b) public pure returns (uint256) { return a + b; } diff --git a/resources/regressions/test_seed.json/mutants/2/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/2/AOR/AOR.sol index aadef707..60846bdb 100644 --- a/resources/regressions/test_seed.json/mutants/2/AOR/AOR.sol +++ b/resources/regressions/test_seed.json/mutants/2/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { return a + b; } diff --git a/resources/regressions/test_seed.json/mutants/3/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/3/AOR/AOR.sol index 2af6a527..c31b43fc 100644 --- a/resources/regressions/test_seed.json/mutants/3/AOR/AOR.sol +++ b/resources/regressions/test_seed.json/mutants/3/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) - b; } diff --git a/resources/regressions/test_seed.json/mutants/4/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/4/AOR/AOR.sol index c5bae4da..8666cef6 100644 --- a/resources/regressions/test_seed.json/mutants/4/AOR/AOR.sol +++ b/resources/regressions/test_seed.json/mutants/4/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) + b; } diff --git a/resources/regressions/test_seed.json/mutants/5/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/5/AOR/AOR.sol index 44cb1b9b..67aa6b37 100644 --- a/resources/regressions/test_seed.json/mutants/5/AOR/AOR.sol +++ b/resources/regressions/test_seed.json/mutants/5/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) % b; } diff --git a/resources/regressions/test_seed.json/mutants/6/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/6/AOR/AOR.sol index b6ab1ee7..61a88541 100644 --- a/resources/regressions/test_seed.json/mutants/6/AOR/AOR.sol +++ b/resources/regressions/test_seed.json/mutants/6/AOR/AOR.sol @@ -9,7 +9,7 @@ contract AOR { // a * b // a / b // a % b - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `function plus(int256 a, int256 b) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function plus(int256 a, int256 b) public pure returns (int256) { return a % b; } diff --git a/resources/regressions/test_seed.json/mutants/7/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/7/AOR/AOR.sol index 3540a7a1..c2a74b71 100644 --- a/resources/regressions/test_seed.json/mutants/7/AOR/AOR.sol +++ b/resources/regressions/test_seed.json/mutants/7/AOR/AOR.sol @@ -18,7 +18,7 @@ contract AOR { // a * b // a / b // a % b - /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `function minus(int256 a, int256 b) public pure returns (int256) {` + /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `return a - b;` function minus(int256 a, int256 b) public pure returns (int256) { assert(true); } diff --git a/resources/regressions/test_seed.json/mutants/8/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/8/AOR/AOR.sol index 7f3fb060..aa4ecd06 100644 --- a/resources/regressions/test_seed.json/mutants/8/AOR/AOR.sol +++ b/resources/regressions/test_seed.json/mutants/8/AOR/AOR.sol @@ -30,7 +30,7 @@ contract AOR { function times_with_parens( int256 a, int256 b - /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `) public pure returns (int256) {` + /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;` ) public pure returns (int256) { return ((a)) % b; } diff --git a/resources/regressions/test_seed.json/mutants/9/AOR/AOR.sol b/resources/regressions/test_seed.json/mutants/9/AOR/AOR.sol index c694d72e..4d3c74db 100644 --- a/resources/regressions/test_seed.json/mutants/9/AOR/AOR.sol +++ b/resources/regressions/test_seed.json/mutants/9/AOR/AOR.sol @@ -43,7 +43,7 @@ contract AOR { function unsigned_times_with_parens( uint256 a, uint256 b - /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `) public pure returns (uint256) {` + /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;` ) public pure returns (uint256) { return ((a)) - b; } diff --git a/resources/regressions/uor.json/gambit_results.json b/resources/regressions/uor.json/gambit_results.json index 9567b0eb..9efbf676 100644 --- a/resources/regressions/uor.json/gambit_results.json +++ b/resources/regressions/uor.json/gambit_results.json @@ -1,14 +1,14 @@ [ { "description": "UnaryOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `function signed_bw_not(int256 x) public pure returns (int256) {`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", "id": "1", "name": "mutants/1/Ops/UOR/UOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", }, { "description": "UnaryOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `function signed_neg(int256 x) public pure returns (int256) {`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", "id": "2", "name": "mutants/2/Ops/UOR/UOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", diff --git a/resources/regressions/uor.json/mutants/1/Ops/UOR/UOR.sol b/resources/regressions/uor.json/mutants/1/Ops/UOR/UOR.sol index 4066c6e6..5697ce92 100644 --- a/resources/regressions/uor.json/mutants/1/Ops/UOR/UOR.sol +++ b/resources/regressions/uor.json/mutants/1/Ops/UOR/UOR.sol @@ -10,7 +10,7 @@ contract UOR { } // Expect a single mutant: -x - /// UnaryOperatorReplacement(`` |==> ` - `) of: `function signed_bw_not(int256 x) public pure returns (int256) {` + /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;` function signed_bw_not(int256 x) public pure returns (int256) { return - ~x; } diff --git a/resources/regressions/uor.json/mutants/2/Ops/UOR/UOR.sol b/resources/regressions/uor.json/mutants/2/Ops/UOR/UOR.sol index f2828633..8a21a9d0 100644 --- a/resources/regressions/uor.json/mutants/2/Ops/UOR/UOR.sol +++ b/resources/regressions/uor.json/mutants/2/Ops/UOR/UOR.sol @@ -15,7 +15,7 @@ contract UOR { } // Expect a single mutant: ~x - /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `function signed_neg(int256 x) public pure returns (int256) {` + /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;` function signed_neg(int256 x) public pure returns (int256) { return ~ -x; } From eb114e084c9210f39c1abdadce88f651a1ec800d Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 2 Aug 2023 16:19:22 -0700 Subject: [PATCH 074/200] Removed sourceroot from outputs --- .../all_ops.json/gambit_results.json | 152 +++++++++--------- .../regressions/aor.json/gambit_results.json | 44 ++--- .../regressions/bor.json/gambit_results.json | 6 +- .../regressions/edc.json/gambit_results.json | 2 +- .../regressions/lor.json/gambit_results.json | 18 +-- .../regressions/lvr.json/gambit_results.json | 22 +-- .../regressions/ror.json/gambit_results.json | 56 +++---- .../test_import_map.json/gambit_results.json | 8 +- .../test_log_invalid.json/gambit_results.json | 152 +++++++++--------- .../gambit_results.json | 100 ++++++------ .../gambit_results.json | 100 ++++++------ .../gambit_results.json | 100 ++++++------ .../gambit_results.json | 52 +++--- .../gambit_results.json | 104 ++++++------ .../test_no_export.json/gambit_results.json | 56 +++---- .../test_num_mutants.json/gambit_results.json | 10 +- .../test_seed.json/gambit_results.json | 20 +-- .../regressions/uor.json/gambit_results.json | 4 +- src/mutant_writer.rs | 2 - 19 files changed, 503 insertions(+), 505 deletions(-) diff --git a/resources/regressions/all_ops.json/gambit_results.json b/resources/regressions/all_ops.json/gambit_results.json index 178d4fd0..f2d7dc19 100644 --- a/resources/regressions/all_ops.json/gambit_results.json +++ b/resources/regressions/all_ops.json/gambit_results.json @@ -4,531 +4,531 @@ "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "9", "name": "mutants/9/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "10", "name": "mutants/10/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "18", "name": "mutants/18/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "19", "name": "mutants/19/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "20", "name": "mutants/20/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "21", "name": "mutants/21/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "22", "name": "mutants/22/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", "id": "23", "name": "mutants/23/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", "id": "24", "name": "mutants/24/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", "id": "25", "name": "mutants/25/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" }, { "description": "ElimDelegateCall", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", "id": "26", "name": "mutants/26/EDC/EDC.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", "id": "27", "name": "mutants/27/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", "id": "28", "name": "mutants/28/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", "id": "29", "name": "mutants/29/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "30", "name": "mutants/30/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "31", "name": "mutants/31/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "32", "name": "mutants/32/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", "id": "33", "name": "mutants/33/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", "id": "34", "name": "mutants/34/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", "id": "35", "name": "mutants/35/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", "id": "36", "name": "mutants/36/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", "id": "37", "name": "mutants/37/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", "id": "38", "name": "mutants/38/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "39", "name": "mutants/39/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", "id": "40", "name": "mutants/40/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "41", "name": "mutants/41/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", "id": "42", "name": "mutants/42/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", "id": "43", "name": "mutants/43/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", "id": "44", "name": "mutants/44/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", "id": "45", "name": "mutants/45/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", "id": "46", "name": "mutants/46/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "47", "name": "mutants/47/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "48", "name": "mutants/48/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "49", "name": "mutants/49/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "50", "name": "mutants/50/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "51", "name": "mutants/51/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "52", "name": "mutants/52/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "53", "name": "mutants/53/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "54", "name": "mutants/54/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "55", "name": "mutants/55/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "56", "name": "mutants/56/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "57", "name": "mutants/57/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "58", "name": "mutants/58/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "59", "name": "mutants/59/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "60", "name": "mutants/60/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", "id": "61", "name": "mutants/61/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "62", "name": "mutants/62/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "63", "name": "mutants/63/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "64", "name": "mutants/64/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "65", "name": "mutants/65/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", "id": "66", "name": "mutants/66/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "67", "name": "mutants/67/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "68", "name": "mutants/68/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "69", "name": "mutants/69/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "70", "name": "mutants/70/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "71", "name": "mutants/71/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", "id": "72", "name": "mutants/72/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", "id": "73", "name": "mutants/73/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", "id": "74", "name": "mutants/74/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", "id": "75", "name": "mutants/75/UOR/UOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" }, { "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", "id": "76", "name": "mutants/76/UOR/UOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" } ] \ No newline at end of file diff --git a/resources/regressions/aor.json/gambit_results.json b/resources/regressions/aor.json/gambit_results.json index 8eff0bf7..613640ea 100644 --- a/resources/regressions/aor.json/gambit_results.json +++ b/resources/regressions/aor.json/gambit_results.json @@ -4,153 +4,153 @@ "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "9", "name": "mutants/9/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "10", "name": "mutants/10/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "18", "name": "mutants/18/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "19", "name": "mutants/19/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "20", "name": "mutants/20/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "21", "name": "mutants/21/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "22", "name": "mutants/22/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" } ] \ No newline at end of file diff --git a/resources/regressions/bor.json/gambit_results.json b/resources/regressions/bor.json/gambit_results.json index 2c776ecf..681c8943 100644 --- a/resources/regressions/bor.json/gambit_results.json +++ b/resources/regressions/bor.json/gambit_results.json @@ -4,20 +4,20 @@ "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", "id": "1", "name": "mutants/1/Ops/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", "id": "2", "name": "mutants/2/Ops/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", "id": "3", "name": "mutants/3/Ops/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" } ] \ No newline at end of file diff --git a/resources/regressions/edc.json/gambit_results.json b/resources/regressions/edc.json/gambit_results.json index 31ca58ca..25f554f5 100644 --- a/resources/regressions/edc.json/gambit_results.json +++ b/resources/regressions/edc.json/gambit_results.json @@ -4,6 +4,6 @@ "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", "id": "1", "name": "mutants/1/Ops/EDC/EDC.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol" } ] \ No newline at end of file diff --git a/resources/regressions/lor.json/gambit_results.json b/resources/regressions/lor.json/gambit_results.json index 4ffa3690..7defb78a 100644 --- a/resources/regressions/lor.json/gambit_results.json +++ b/resources/regressions/lor.json/gambit_results.json @@ -4,62 +4,62 @@ "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", "id": "1", "name": "mutants/1/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", "id": "2", "name": "mutants/2/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", "id": "3", "name": "mutants/3/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "4", "name": "mutants/4/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "5", "name": "mutants/5/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "6", "name": "mutants/6/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", "id": "7", "name": "mutants/7/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", "id": "8", "name": "mutants/8/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", "id": "9", "name": "mutants/9/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" } ] \ No newline at end of file diff --git a/resources/regressions/lvr.json/gambit_results.json b/resources/regressions/lvr.json/gambit_results.json index 0795b0a8..c37be0cd 100644 --- a/resources/regressions/lvr.json/gambit_results.json +++ b/resources/regressions/lvr.json/gambit_results.json @@ -4,76 +4,76 @@ "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", "id": "1", "name": "mutants/1/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", "id": "2", "name": "mutants/2/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", "id": "3", "name": "mutants/3/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "4", "name": "mutants/4/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", "id": "5", "name": "mutants/5/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "6", "name": "mutants/6/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", "id": "7", "name": "mutants/7/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", "id": "8", "name": "mutants/8/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", "id": "9", "name": "mutants/9/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", "id": "10", "name": "mutants/10/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", "id": "11", "name": "mutants/11/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" } ] \ No newline at end of file diff --git a/resources/regressions/ror.json/gambit_results.json b/resources/regressions/ror.json/gambit_results.json index 8cfc58e6..5173b73d 100644 --- a/resources/regressions/ror.json/gambit_results.json +++ b/resources/regressions/ror.json/gambit_results.json @@ -4,195 +4,195 @@ "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "1", "name": "mutants/1/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "2", "name": "mutants/2/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "3", "name": "mutants/3/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "4", "name": "mutants/4/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "5", "name": "mutants/5/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "6", "name": "mutants/6/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "7", "name": "mutants/7/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "8", "name": "mutants/8/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "9", "name": "mutants/9/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "10", "name": "mutants/10/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "11", "name": "mutants/11/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "12", "name": "mutants/12/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "13", "name": "mutants/13/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "14", "name": "mutants/14/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", "id": "15", "name": "mutants/15/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "16", "name": "mutants/16/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "17", "name": "mutants/17/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "18", "name": "mutants/18/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "19", "name": "mutants/19/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", "id": "20", "name": "mutants/20/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "21", "name": "mutants/21/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "22", "name": "mutants/22/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "23", "name": "mutants/23/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "24", "name": "mutants/24/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "25", "name": "mutants/25/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", "id": "26", "name": "mutants/26/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", "id": "27", "name": "mutants/27/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", "id": "28", "name": "mutants/28/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_import_map.json/gambit_results.json b/resources/regressions/test_import_map.json/gambit_results.json index 40071d4b..8fdce801 100644 --- a/resources/regressions/test_import_map.json/gambit_results.json +++ b/resources/regressions/test_import_map.json/gambit_results.json @@ -4,27 +4,27 @@ "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n }\n", "id": "1", "name": "mutants/1/contracts/Contract.sol", - "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n }\n", "id": "2", "name": "mutants/2/contracts/Contract.sol", - "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n }\n", "id": "3", "name": "mutants/3/contracts/Contract.sol", - "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n }\n", "id": "4", "name": "mutants/4/contracts/Contract.sol", - "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_log_invalid.json/gambit_results.json b/resources/regressions/test_log_invalid.json/gambit_results.json index 178d4fd0..f2d7dc19 100644 --- a/resources/regressions/test_log_invalid.json/gambit_results.json +++ b/resources/regressions/test_log_invalid.json/gambit_results.json @@ -4,531 +4,531 @@ "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "9", "name": "mutants/9/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "10", "name": "mutants/10/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "18", "name": "mutants/18/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "19", "name": "mutants/19/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "20", "name": "mutants/20/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "21", "name": "mutants/21/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "22", "name": "mutants/22/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", "id": "23", "name": "mutants/23/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", "id": "24", "name": "mutants/24/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", "id": "25", "name": "mutants/25/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" }, { "description": "ElimDelegateCall", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", "id": "26", "name": "mutants/26/EDC/EDC.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", "id": "27", "name": "mutants/27/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", "id": "28", "name": "mutants/28/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", "id": "29", "name": "mutants/29/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "30", "name": "mutants/30/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "31", "name": "mutants/31/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "32", "name": "mutants/32/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", "id": "33", "name": "mutants/33/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", "id": "34", "name": "mutants/34/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", "id": "35", "name": "mutants/35/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", "id": "36", "name": "mutants/36/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", "id": "37", "name": "mutants/37/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", "id": "38", "name": "mutants/38/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "39", "name": "mutants/39/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", "id": "40", "name": "mutants/40/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "41", "name": "mutants/41/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", "id": "42", "name": "mutants/42/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", "id": "43", "name": "mutants/43/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", "id": "44", "name": "mutants/44/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", "id": "45", "name": "mutants/45/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", "id": "46", "name": "mutants/46/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "47", "name": "mutants/47/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "48", "name": "mutants/48/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "49", "name": "mutants/49/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "50", "name": "mutants/50/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "51", "name": "mutants/51/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "52", "name": "mutants/52/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "53", "name": "mutants/53/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "54", "name": "mutants/54/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "55", "name": "mutants/55/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "56", "name": "mutants/56/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "57", "name": "mutants/57/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "58", "name": "mutants/58/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "59", "name": "mutants/59/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "60", "name": "mutants/60/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", "id": "61", "name": "mutants/61/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "62", "name": "mutants/62/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "63", "name": "mutants/63/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "64", "name": "mutants/64/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "65", "name": "mutants/65/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", "id": "66", "name": "mutants/66/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "67", "name": "mutants/67/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "68", "name": "mutants/68/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "69", "name": "mutants/69/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "70", "name": "mutants/70/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "71", "name": "mutants/71/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", "id": "72", "name": "mutants/72/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", "id": "73", "name": "mutants/73/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", "id": "74", "name": "mutants/74/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", "id": "75", "name": "mutants/75/UOR/UOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" }, { "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", "id": "76", "name": "mutants/76/UOR/UOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json index 3c9d5729..209e619f 100644 --- a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json @@ -4,349 +4,349 @@ "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "1", "name": "mutants/1/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "27", "name": "mutants/27/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json index 3c9d5729..209e619f 100644 --- a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json @@ -4,349 +4,349 @@ "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "1", "name": "mutants/1/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "27", "name": "mutants/27/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json index 3c9d5729..209e619f 100644 --- a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json @@ -4,349 +4,349 @@ "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "1", "name": "mutants/1/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "27", "name": "mutants/27/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json index f24d2b32..9a623121 100644 --- a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json @@ -4,181 +4,181 @@ "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "1", "name": "mutants/1/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_files_1.json/gambit_results.json b/resources/regressions/test_multiple_files_1.json/gambit_results.json index a1b315da..10adf42f 100644 --- a/resources/regressions/test_multiple_files_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_files_1.json/gambit_results.json @@ -4,363 +4,363 @@ "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "9", "name": "mutants/9/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "10", "name": "mutants/10/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "18", "name": "mutants/18/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "19", "name": "mutants/19/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "20", "name": "mutants/20/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "21", "name": "mutants/21/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ assert(true);\n }\n }\n", "id": "22", "name": "mutants/22/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "23", "name": "mutants/23/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "24", "name": "mutants/24/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "25", "name": "mutants/25/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "26", "name": "mutants/26/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "27", "name": "mutants/27/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "51", "name": "mutants/51/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "52", "name": "mutants/52/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_no_export.json/gambit_results.json b/resources/regressions/test_no_export.json/gambit_results.json index ae826ab5..11da7ff3 100644 --- a/resources/regressions/test_no_export.json/gambit_results.json +++ b/resources/regressions/test_no_export.json/gambit_results.json @@ -4,195 +4,195 @@ "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "9", "name": "mutants/9/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "10", "name": "mutants/10/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "18", "name": "mutants/18/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "19", "name": "mutants/19/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "20", "name": "mutants/20/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "21", "name": "mutants/21/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ assert(true);\n }\n }\n", "id": "22", "name": "mutants/22/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "23", "name": "mutants/23/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "24", "name": "mutants/24/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "25", "name": "mutants/25/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "26", "name": "mutants/26/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "27", "name": "mutants/27/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ArithmeticOperatorReplacement(`|` |==> `+`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a + b;\n }\n \n // Expect 1 mutants:\n", "id": "28", "name": "mutants/28/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_num_mutants.json/gambit_results.json b/resources/regressions/test_num_mutants.json/gambit_results.json index 69762beb..503fc685 100644 --- a/resources/regressions/test_num_mutants.json/gambit_results.json +++ b/resources/regressions/test_num_mutants.json/gambit_results.json @@ -4,34 +4,34 @@ "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_seed.json/gambit_results.json b/resources/regressions/test_seed.json/gambit_results.json index c8a479b2..35715eaf 100644 --- a/resources/regressions/test_seed.json/gambit_results.json +++ b/resources/regressions/test_seed.json/gambit_results.json @@ -4,69 +4,69 @@ "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "8", "name": "mutants/8/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "9", "name": "mutants/9/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "10", "name": "mutants/10/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" } ] \ No newline at end of file diff --git a/resources/regressions/uor.json/gambit_results.json b/resources/regressions/uor.json/gambit_results.json index 9efbf676..735a1b4f 100644 --- a/resources/regressions/uor.json/gambit_results.json +++ b/resources/regressions/uor.json/gambit_results.json @@ -4,13 +4,13 @@ "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", "id": "1", "name": "mutants/1/Ops/UOR/UOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" }, { "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", "id": "2", "name": "mutants/2/Ops/UOR/UOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" } ] \ No newline at end of file diff --git a/src/mutant_writer.rs b/src/mutant_writer.rs index e2ed31fc..96df855e 100644 --- a/src/mutant_writer.rs +++ b/src/mutant_writer.rs @@ -75,13 +75,11 @@ impl MutantWriter { let mut json: Vec = Vec::new(); for (i, ((mutant, _), diff)) in mutants.iter().zip(diffs).enumerate() { let mid = i + 1; - let sourceroot = ""; // mutant.source.sourceroot().to_str().unwrap().to_string(); json.push(serde_json::json!({ "name": Self::get_mutant_filename(&PathBuf::from("mutants"), mid, mutant), "description": mutant.op.to_string(), "id": mid.to_string(), "diff": diff, - "sourceroot": sourceroot, "original": mutant.path(), })); } From 74be1bd9a3ed2199899b04a6c63e2ed668042fdf Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 2 Aug 2023 16:20:19 -0700 Subject: [PATCH 075/200] Updated make_regressions and deleted unused script --- scripts/make_regressions.sh | 30 +++++++++++++++++------------- scripts/remove_sourceroots.sh | 15 --------------- 2 files changed, 17 insertions(+), 28 deletions(-) delete mode 100644 scripts/remove_sourceroots.sh diff --git a/scripts/make_regressions.sh b/scripts/make_regressions.sh index 88d5cb7a..dc7d41b1 100644 --- a/scripts/make_regressions.sh +++ b/scripts/make_regressions.sh @@ -26,6 +26,10 @@ TMP_REGRESSIONS="$GAMBIT"/resources/tmp_regressions NUM_CONFIGS=$(ls "$CONFIGS" | wc -l | xargs) +green_check="$(printf "[\033[32;1m ✔ \033[0m]")" +yellow_elipses="$(printf "[\033[33;1m...\033[0m]")" +red_x="$(printf "[\033[31;1m ✘ \033[0m]")" + print_vars() { echo "scripts: $SCRIPTS" echo "gambit: $GAMBIT" @@ -89,7 +93,7 @@ make_regressions() { conf_idx=$((conf_idx + 1)) echo echo - printf "\033[1mConfiguration %s/%s: %s\033[0m\n" "$conf_idx" "$NUM_CONFIGS" "$conf_path" + printf "\033[1mConfiguration %s/%s:\033[0m %s\n" "$conf_idx" "$NUM_CONFIGS" "$(basename "$conf_path")" conf=$(basename "$conf_path") outdir="$TMP_REGRESSIONS"/"$conf" @@ -100,16 +104,17 @@ make_regressions() { } printf " \033[1mRunning:\033[0m %s\n" "gambit mutate --json $conf_path" stdout="$("$GAMBIT_EXECUTABLE" mutate --json "$conf_path")" + printf " \033[1mGambit Output:\033[0m '\033[3m%s\033[0m'\n" "$stdout" exit_code=$? if [ $exit_code -ne 0 ]; then - printf "\033[31;1m[!] Failed to run config %s\n" "$conf_path" + printf "%s Failed to run config %s\n" "$red_x" "$(basename "$conf_path")" failed=true failed_confs+=("$conf_path") + else + printf " \033[1mMoving Outdir:\033[0m to %s\n" "$outdir" + mv gambit_out "$outdir" + printf "%s Successfully ran %s\n" "$green_check" "$(basename "$conf_path")" fi - printf " \033[1mGambit Output:\033[0m '\033[3m%s\033[0m'\n" "$stdout" - mv gambit_out "$outdir" - printf " \033[1mMoving Outdir:\033[0m to %s\n" "$outdir" - bash "$SCRIPTS"/remove_sourceroots.sh "$outdir/gambit_results.json" cd "$starting_dir" || exit 1 done @@ -121,7 +126,7 @@ summary() { if $failed; then - printf "[✘] \033[31;1m%s/%s configurations failed to run:\033[0m\n" "${#failed_confs[@]}" "$NUM_CONFIGS" + printf "%s \033[31;1m%s/%s configurations failed to run:\033[0m\n" "$red_x" "${#failed_confs[@]}" "$NUM_CONFIGS" idx=0 for conf in "${failed_confs[@]}"; do idx=$((idx + 1)) @@ -133,16 +138,15 @@ summary() { clean_state exit 101 else - printf "[✔] \033[32;1m All %s configurations ran successfully\033[0m\n" "$NUM_CONFIGS" + printf "%s \033[32;1m All %s configurations ran successfully\033[0m\n" "$green_check" "$NUM_CONFIGS" [ -e "$REGRESSIONS" ] && { - echo "Removing old regressions" + printf "%s Removing old regressions\n" "$yellow_elipses" rm -rf "$REGRESSIONS" } - echo - echo "[+] Moving Temporary regessions to regressions location" - echo " $TMP_REGRESSIONS -> $REGRESSIONS" - echo + printf "%s Moving Temporary regessions to regressions location\n" "$yellow_elipses" + printf "%s %s -> %s\n" "$yellow_elipses" "$TMP_REGRESSIONS" "$REGRESSIONS" mv "$TMP_REGRESSIONS" "$REGRESSIONS" + printf "%s Regression tests successfully updated\n" "$green_check" clean_state fi } diff --git a/scripts/remove_sourceroots.sh b/scripts/remove_sourceroots.sh deleted file mode 100644 index 8f5bde5c..00000000 --- a/scripts/remove_sourceroots.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bash - -################################################################################ -# remove_sourceroots.sh -# -# remove sourceroot fields from JSON since these are absolute paths - -if [[ "$(uname)" == "Linux" ]]; then - sed -i '/"sourceroot":/d' "$1" -elif [[ "$(uname)" == "Darwin" ]]; then - sed -i "" '/"sourceroot":/d' "$1" -else - echo "Unknown operating system: using the GNU sed interface" - sed -i '/"sourceroot":/d' "$1" -fi From e1a14aaddcf025ad5c2a7ad411ea2dda24edcb6d Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 2 Aug 2023 17:06:24 -0700 Subject: [PATCH 076/200] Removed some printlns --- src/main.rs | 1 - src/mutation.rs | 4 ---- 2 files changed, 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 85ba0339..d1dc901b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -109,7 +109,6 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box Date: Wed, 2 Aug 2023 17:06:33 -0700 Subject: [PATCH 077/200] Improved regression outputs --- scripts/make_regressions.sh | 26 ++++++++++++-------------- scripts/run_regressions.sh | 19 ++++++++++--------- scripts/util.sh | 7 +++++++ 3 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 scripts/util.sh diff --git a/scripts/make_regressions.sh b/scripts/make_regressions.sh index dc7d41b1..ea0797b4 100644 --- a/scripts/make_regressions.sh +++ b/scripts/make_regressions.sh @@ -18,6 +18,8 @@ # `resources/regressions/XXXXX`) relative to this script's parent directory. SCRIPTS=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) +# shellcheck disable=SC1091 +source "$SCRIPTS/util.sh" GAMBIT="$SCRIPTS/.." GAMBIT_EXECUTABLE="$GAMBIT/target/release/gambit" CONFIGS="$GAMBIT/benchmarks/config-jsons" @@ -26,10 +28,6 @@ TMP_REGRESSIONS="$GAMBIT"/resources/tmp_regressions NUM_CONFIGS=$(ls "$CONFIGS" | wc -l | xargs) -green_check="$(printf "[\033[32;1m ✔ \033[0m]")" -yellow_elipses="$(printf "[\033[33;1m...\033[0m]")" -red_x="$(printf "[\033[31;1m ✘ \033[0m]")" - print_vars() { echo "scripts: $SCRIPTS" echo "gambit: $GAMBIT" @@ -40,7 +38,7 @@ print_vars() { double_check_make_regressions() { printf "\033[33m[!!!] WARNING!\033[0m You are about to remake all regression tests!!\n" - printf " This will overwrite the \033[44;37;1m%s\033[0m directory!\n" "$REGRESSIONS" + printf " \033[41;37;1;3mThis will overwrite \`\033[0;41;37;1mresources/regressions\033[0;41;37;1;3m\`!!\033[0m\n" printf " (\033[1mNote:\033[0m regressions are tracked by Git, so you can recover to a previous state)\n" while true; do printf "Do you wish to proceed? [Y/n] " @@ -102,18 +100,18 @@ make_regressions() { echo "Error: couldn't cd $GAMBIT" exit 1 } - printf " \033[1mRunning:\033[0m %s\n" "gambit mutate --json $conf_path" + printf " %s \033[1mRunning:\033[0m %s\n" "$green_check" "gambit mutate --json $conf_path" stdout="$("$GAMBIT_EXECUTABLE" mutate --json "$conf_path")" - printf " \033[1mGambit Output:\033[0m '\033[3m%s\033[0m'\n" "$stdout" + printf " %s \033[1mGambit Output:\033[0m '\033[3m%s\033[0m'\n" "$green_check" "$stdout" exit_code=$? if [ $exit_code -ne 0 ]; then - printf "%s Failed to run config %s\n" "$red_x" "$(basename "$conf_path")" + printf " %s Failed to run config %s\n" "$red_x" "$(basename "$conf_path")" failed=true failed_confs+=("$conf_path") else - printf " \033[1mMoving Outdir:\033[0m to %s\n" "$outdir" + printf " %s \033[1mMoving Outdir:\033[0m to %s\n" "$green_check" "$outdir" mv gambit_out "$outdir" - printf "%s Successfully ran %s\n" "$green_check" "$(basename "$conf_path")" + printf " %s Successfully created regression test case for %s\n" "$green_check" "$(basename "$conf_path")" fi cd "$starting_dir" || exit 1 @@ -140,13 +138,13 @@ summary() { else printf "%s \033[32;1m All %s configurations ran successfully\033[0m\n" "$green_check" "$NUM_CONFIGS" [ -e "$REGRESSIONS" ] && { - printf "%s Removing old regressions\n" "$yellow_elipses" rm -rf "$REGRESSIONS" + printf "%s Removed old regressions\n" "$green_check" } - printf "%s Moving Temporary regessions to regressions location\n" "$yellow_elipses" - printf "%s %s -> %s\n" "$yellow_elipses" "$TMP_REGRESSIONS" "$REGRESSIONS" mv "$TMP_REGRESSIONS" "$REGRESSIONS" - printf "%s Regression tests successfully updated\n" "$green_check" + printf "%s Moved Temporary regessions to regressions location\n" "$green_check" + printf " %s -> %s\n" "$TMP_REGRESSIONS" "$REGRESSIONS" + printf "%s \033[1;3mRegression tests successfully updated\033[0m\n" "$green_check" clean_state fi } diff --git a/scripts/run_regressions.sh b/scripts/run_regressions.sh index 41cf1a3f..9758069f 100644 --- a/scripts/run_regressions.sh +++ b/scripts/run_regressions.sh @@ -19,6 +19,8 @@ # `resources/regressions/XXXXX`) relative to this script's parent directory. SCRIPTS=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) +# shellcheck disable=SC1091 +source "$SCRIPTS/util.sh" GAMBIT="$SCRIPTS/.." GAMBIT_EXECUTABLE="$GAMBIT/target/release/gambit" CONFIGS="$GAMBIT/benchmarks/config-jsons" @@ -61,21 +63,20 @@ run_regressions() { conf_idx=$((conf_idx + 1)) echo echo - printf "\033[1mConfiguration %s/%s: %s\033[0m\n" "$conf_idx" "$NUM_CONFIGS" "$conf_path" + printf "\033[1mConfiguration %s/%s:\033[0m %s\n" "$conf_idx" "$NUM_CONFIGS" "$(basename "$conf_path")" conf=$(basename "$conf_path") regression_dir="$REGRESSIONS"/"$conf" - printf " \033[1mRunning:\033[0m %s\n" "gambit mutate --json $conf_path" + printf " %s \033[1mRunning:\033[0m %s\n" "$green_check" "gambit mutate --json $conf_path" stdout="$("$GAMBIT_EXECUTABLE" mutate --json "$conf_path")" - printf " \033[1mGambit Output:\033[0m '\033[3m%s\033[0m'\n" "$stdout" - printf " \033[1mDiffing\033[0m gambit_out and %s\n" "$regression_dir" - bash "$SCRIPTS"/remove_sourceroots.sh gambit_out/gambit_results.json + printf " %s \033[1mGambit Output:\033[0m '\033[3m%s\033[0m'\n" "$green_check" "$stdout" + printf " %s \033[1mDiffing\033[0m gambit_out and %s\n" "$green_check" "$regression_dir" if diff -q -r gambit_out "$regression_dir"; then - printf " \033[92mSUCCESS\033[0m\n" + printf " %s No regressions in %s\n" "$green_check" "$conf" passed+=("$conf") else - printf " \033[91mFAILED:\033[0m %s\n" "$conf" + printf " %s Found a regression in %s\n" "$red_x" "$conf" failed+=("$conf") fi rm -rf gambit_out @@ -95,7 +96,7 @@ summary() { printf "\033[92m-------\033[0m\n" for conf in "${passed[@]}"; do - printf "\033[92m[✔]\033[0m %s\n" "$conf" + printf "%s %s\n" "$green_check" "$conf" done printf "\n" @@ -104,7 +105,7 @@ summary() { printf "\033[91m-------\033[0m\n" for conf in "${failed[@]}"; do - printf "\033[91m[✘]\033[0m %s\n" "$conf" + printf "%s %s\n" "$red_x" "$conf" done } diff --git a/scripts/util.sh b/scripts/util.sh new file mode 100644 index 00000000..e74e8891 --- /dev/null +++ b/scripts/util.sh @@ -0,0 +1,7 @@ +#!/usr/bin/bash + +# Utilities for regression testing + +green_check="$(printf "[\033[32;1m ✔ \033[0m]")" +yellow_elipses="$(printf "[\033[33;1m...\033[0m]")" +red_x="$(printf "[\033[31;1m ✘ \033[0m]")" From 721dd4495226127bbb52b8a09a542c6ac52be840 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 3 Aug 2023 14:56:28 -0700 Subject: [PATCH 078/200] Suppress shellcheck warnings --- scripts/make_regressions.sh | 2 ++ scripts/run_regressions.sh | 2 ++ scripts/util.sh | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/scripts/make_regressions.sh b/scripts/make_regressions.sh index ea0797b4..6245f5e3 100644 --- a/scripts/make_regressions.sh +++ b/scripts/make_regressions.sh @@ -18,6 +18,8 @@ # `resources/regressions/XXXXX`) relative to this script's parent directory. SCRIPTS=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) +green_check="" +red_x="" # shellcheck disable=SC1091 source "$SCRIPTS/util.sh" GAMBIT="$SCRIPTS/.." diff --git a/scripts/run_regressions.sh b/scripts/run_regressions.sh index 9758069f..605ee14a 100644 --- a/scripts/run_regressions.sh +++ b/scripts/run_regressions.sh @@ -19,6 +19,8 @@ # `resources/regressions/XXXXX`) relative to this script's parent directory. SCRIPTS=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) +green_check="" +red_x="" # shellcheck disable=SC1091 source "$SCRIPTS/util.sh" GAMBIT="$SCRIPTS/.." diff --git a/scripts/util.sh b/scripts/util.sh index e74e8891..c8d93702 100644 --- a/scripts/util.sh +++ b/scripts/util.sh @@ -5,3 +5,7 @@ green_check="$(printf "[\033[32;1m ✔ \033[0m]")" yellow_elipses="$(printf "[\033[33;1m...\033[0m]")" red_x="$(printf "[\033[31;1m ✘ \033[0m]")" + +export green_check +export yellow_elipses +export red_x From bc3bffc6ac3766605a09c85e551ce31be59a701a Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 3 Aug 2023 15:32:41 -0700 Subject: [PATCH 079/200] Fixed bug in AOR --- .../test_no_export.json/gambit_results.json | 4 ++-- .../regressions/test_no_export.json/mutants.log | 2 +- src/mutation.rs | 14 +++----------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/resources/regressions/test_no_export.json/gambit_results.json b/resources/regressions/test_no_export.json/gambit_results.json index 11da7ff3..3f8d3784 100644 --- a/resources/regressions/test_no_export.json/gambit_results.json +++ b/resources/regressions/test_no_export.json/gambit_results.json @@ -189,8 +189,8 @@ "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ArithmeticOperatorReplacement(`|` |==> `+`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a + b;\n }\n \n // Expect 1 mutants:\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// StatementDeletion(`return a ^ b` |==> `assert(true)`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ assert(true);\n }\n }\n", "id": "28", "name": "mutants/28/BOR/BOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" diff --git a/resources/regressions/test_no_export.json/mutants.log b/resources/regressions/test_no_export.json/mutants.log index e9cee9bd..5d00636d 100644 --- a/resources/regressions/test_no_export.json/mutants.log +++ b/resources/regressions/test_no_export.json/mutants.log @@ -25,4 +25,4 @@ 25,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,* 26,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,/ 27,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,% -28,AOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,9:9,|,+ +28,STD,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,21:0,return a ^ b,assert(true) diff --git a/src/mutation.rs b/src/mutation.rs index 1bbbc5ff..a55d994d 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -501,27 +501,19 @@ fn arith_op_replacement( return vec![]; } match expr { - Expression::BitwiseOr { .. } - | Expression::BitwiseAnd { .. } - | Expression::BitwiseXor { .. } - | Expression::Divide { .. } + Expression::Divide { .. } | Expression::Modulo { .. } | Expression::Multiply { .. } | Expression::Subtract { .. } | Expression::Add { .. } => { - let is_signed_int = if let Type::Int(_) = expr.ty() { - true - } else { - false - }; - if is_signed_int { + if let Type::Int(_) = expr.ty() { // When we're signed, filter out `**`, which is illegal replacements = replacements .iter() .filter(|x| **x != "**") .map(|x| *x) .collect(); - } + }; let op_loc = get_op_loc(expr, contents); replacements From 3b0e57901b9c418b00effe7fd599ac6b55cc31f3 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 3 Aug 2023 16:03:13 -0700 Subject: [PATCH 080/200] Improved run_regressions output --- scripts/run_regressions.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/run_regressions.sh b/scripts/run_regressions.sh index 605ee14a..5dd40172 100644 --- a/scripts/run_regressions.sh +++ b/scripts/run_regressions.sh @@ -73,12 +73,14 @@ run_regressions() { printf " %s \033[1mRunning:\033[0m %s\n" "$green_check" "gambit mutate --json $conf_path" stdout="$("$GAMBIT_EXECUTABLE" mutate --json "$conf_path")" printf " %s \033[1mGambit Output:\033[0m '\033[3m%s\033[0m'\n" "$green_check" "$stdout" - printf " %s \033[1mDiffing\033[0m gambit_out and %s\n" "$green_check" "$regression_dir" - if diff -q -r gambit_out "$regression_dir"; then + if diff -q -r gambit_out "$regression_dir" 1>/dev/null; then + printf " %s \033[1mDiffed:\033[0m gambit_out and %s\n" "$green_check" "$regression_dir" printf " %s No regressions in %s\n" "$green_check" "$conf" passed+=("$conf") else - printf " %s Found a regression in %s\n" "$red_x" "$conf" + printf " %s \033[1mDiffed:\033[0m gambit_out and %s\n" "$red_x" "$regression_dir" + diff -r gambit_out/mutants "$regression_dir"/mutants + printf " %s Found a regression in \033[3m%s\033[0m\n" "$red_x" "$conf" failed+=("$conf") fi rm -rf gambit_out From 5694adb1ca4a38c05570f0aabd4f74190621ef2b Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 3 Aug 2023 16:07:13 -0700 Subject: [PATCH 081/200] Update regressions --- resources/regressions/all_ops.json/gambit_results.json | 2 +- resources/regressions/all_ops.json/mutants.log | 2 +- .../regressions/all_ops.json/mutants/41/LVR/LVR.sol | 4 ++-- resources/regressions/lvr.json/gambit_results.json | 2 +- resources/regressions/lvr.json/mutants.log | 2 +- .../regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol | 4 ++-- .../test_log_invalid.json/gambit_results.json | 2 +- .../regressions/test_log_invalid.json/mutants.log | 2 +- .../test_log_invalid.json/mutants/41/LVR/LVR.sol | 4 ++-- src/mutation.rs | 10 ++++++++-- 10 files changed, 20 insertions(+), 14 deletions(-) diff --git a/resources/regressions/all_ops.json/gambit_results.json b/resources/regressions/all_ops.json/gambit_results.json index f2d7dc19..729abcbf 100644 --- a/resources/regressions/all_ops.json/gambit_results.json +++ b/resources/regressions/all_ops.json/gambit_results.json @@ -281,7 +281,7 @@ }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", "id": "41", "name": "mutants/41/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" diff --git a/resources/regressions/all_ops.json/mutants.log b/resources/regressions/all_ops.json/mutants.log index c0eb94f0..6454a41d 100644 --- a/resources/regressions/all_ops.json/mutants.log +++ b/resources/regressions/all_ops.json/mutants.log @@ -38,7 +38,7 @@ 38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 39,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 40,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 -41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 +41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,-2 42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 43,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 44,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 diff --git a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol index 173dc540..1e24417f 100644 --- a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol @@ -23,9 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = -2; return neg_one; } diff --git a/resources/regressions/lvr.json/gambit_results.json b/resources/regressions/lvr.json/gambit_results.json index c37be0cd..b001d311 100644 --- a/resources/regressions/lvr.json/gambit_results.json +++ b/resources/regressions/lvr.json/gambit_results.json @@ -36,7 +36,7 @@ }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", "id": "6", "name": "mutants/6/Ops/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" diff --git a/resources/regressions/lvr.json/mutants.log b/resources/regressions/lvr.json/mutants.log index 11f120d5..3eb9dd77 100644 --- a/resources/regressions/lvr.json/mutants.log +++ b/resources/regressions/lvr.json/mutants.log @@ -3,7 +3,7 @@ 3,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 4,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 5,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 -6,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 +6,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,-2 7,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 8,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 9,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 diff --git a/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol index 173dc540..1e24417f 100644 --- a/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol @@ -23,9 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = -2; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/gambit_results.json b/resources/regressions/test_log_invalid.json/gambit_results.json index f2d7dc19..729abcbf 100644 --- a/resources/regressions/test_log_invalid.json/gambit_results.json +++ b/resources/regressions/test_log_invalid.json/gambit_results.json @@ -281,7 +281,7 @@ }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", "id": "41", "name": "mutants/41/LVR/LVR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" diff --git a/resources/regressions/test_log_invalid.json/mutants.log b/resources/regressions/test_log_invalid.json/mutants.log index c0eb94f0..6454a41d 100644 --- a/resources/regressions/test_log_invalid.json/mutants.log +++ b/resources/regressions/test_log_invalid.json/mutants.log @@ -38,7 +38,7 @@ 38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 39,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 40,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 -41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 +41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,-2 42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 43,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 44,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 diff --git a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol index 173dc540..1e24417f 100644 --- a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol @@ -23,9 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = -2; return neg_one; } diff --git a/src/mutation.rs b/src/mutation.rs index a55d994d..6e2a1502 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -1,7 +1,7 @@ use crate::{get_import_path, get_indent, Mutator}; use clap::ValueEnum; use num_bigint::BigInt; -use num_traits::{One, Zero}; +use num_traits::{One, Signed, Zero}; use serde::{Deserialize, Serialize}; use solang::{ file_resolver::FileResolver, @@ -621,12 +621,18 @@ fn literal_value_replacement( solang::sema::ast::Type::Int(_) => { if value.is_zero() { vec!["-1".to_string(), "1".to_string()] - } else { + } else if value.is_positive() { vec![ "0".to_string(), (-value).to_string(), (value + BigInt::one()).to_string(), ] + } else { + vec![ + "0".to_string(), + (-value).to_string(), + (value - BigInt::one()).to_string(), + ] } } solang::sema::ast::Type::Uint(_) => { From b6eccbc370700aac83feb22444f26a0b4319b197 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 4 Aug 2023 15:41:05 -0700 Subject: [PATCH 082/200] Added fallback operators and fixed bug --- src/cli.rs | 10 +++++ src/mutation.rs | 35 ++++++++++++---- src/mutator.rs | 109 ++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 134 insertions(+), 20 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 986c3176..4ab0df64 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -117,6 +117,16 @@ pub struct MutateParams { #[arg(long, num_args(1..), conflicts_with = "json")] pub mutations: Option>, + /// Specify _fallback mutation operators_. These operators are not applied + /// to a program point unless all other operators fail. Fallback expression + /// mutations are only applied to certain program points. For instance, + /// in the expression `a + b + c`, a fallback expression mutation such as + /// EVR will only be applied to the full expression, and not to any + /// subexpressions, and only if no mutants were generated for `a + b + c` or + /// its subexpressions + #[arg(long, num_args(1..), conflicts_with = "json")] + pub fallback_mutations: Option>, + /// Skip mutant export #[arg(long, default_value_t = DEFAULT_NO_EXPORT_MUTANTS)] #[serde(default = "default_no_export_mutants")] diff --git a/src/mutation.rs b/src/mutation.rs index 6e2a1502..b0fcfd15 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -224,6 +224,9 @@ pub trait Mutation { fn mutate_statement(&self, mutator: &Mutator, stmt: &Statement) -> Vec; fn mutate_expression(&self, mutator: &Mutator, expr: &Expression) -> Vec; + + /// Is a given mutation operator a fallback mutation? + fn is_fallback_mutation(&self, mutator: &Mutator) -> bool; } /// Kinds of mutations. @@ -284,6 +287,9 @@ impl Mutation for MutationType { } fn mutate_expression(&self, mutator: &Mutator, expr: &Expression) -> Vec { + if self.is_fallback_mutation(mutator) { + return vec![]; + } let file_no = expr.loc().file_no(); let resolver = &mutator.file_resolver; let contents = &resolver.get_contents_of_file_no(file_no).unwrap(); @@ -327,6 +333,10 @@ impl Mutation for MutationType { _ => vec![], } } + + fn is_fallback_mutation(&self, mutator: &Mutator) -> bool { + mutator.conf.fallback_operators.contains(self) + } } impl MutationType { @@ -345,6 +355,10 @@ impl MutationType { ] } + pub fn default_fallback_mutation_operators() -> Vec { + vec![MutationType::ExpressionValueReplacement] + } + pub fn short_name(&self) -> String { match self { MutationType::ArithmeticOperatorReplacement => "AOR", @@ -751,8 +765,8 @@ fn rel_op_replacement( // The following types are not orderable, so we replace with true and false // TODO: Can Addresses be ordered? - solang::sema::ast::Type::Address(_) => vec!["true", "false"], - _ => vec!["true", "false"], + solang::sema::ast::Type::Address(_) => vec!["false"], + _ => vec!["false"], } } Expression::NotEqual { left, .. } => { @@ -765,8 +779,8 @@ fn rel_op_replacement( // The following types are not orderable, so we replace with true and false // TODO: Can Addresses be ordered? - solang::sema::ast::Type::Address(_) => vec!["true", "false"], - _ => vec!["true", "false"], + solang::sema::ast::Type::Address(_) => vec!["true"], + _ => vec!["true"], } } _ => return vec![], @@ -990,6 +1004,7 @@ fn expression_value_replacement( _source: &Arc, ) -> Vec { // TODO: implement + println!("Running EVR on {:?} ", _expr); vec![] } @@ -1425,7 +1440,7 @@ contract A { .prefix(prefix.as_str()) .rand_bytes(5) .tempdir_in(source.parent().unwrap())?; - let mut mutator = make_mutator(ops, source, outdir.into_path()); + let mut mutator = make_mutator(ops, &vec![], source, outdir.into_path()); mutator .file_resolver .add_import_path(&PathBuf::from("/")) @@ -1477,7 +1492,7 @@ contract A { .prefix("gambit-compile-dir") .rand_bytes(5) .tempdir()?; - let mut mutator = make_mutator(ops, source.clone(), outdir.into_path()); + let mut mutator = make_mutator(ops, &vec![], source.clone(), outdir.into_path()); // let source_os_str = source.as_os_str(); // println!("source: {:?}", source_os_str); // let ns = parse_and_resolve( @@ -1505,9 +1520,15 @@ contract A { /// Create a mutator for a single file, creating required components (e.g., /// Solc, creating Sources and rapping them in a Vec>, etc) - fn make_mutator(ops: &Vec, filename: PathBuf, outdir: PathBuf) -> Mutator { + fn make_mutator( + ops: &Vec, + fallback: &Vec, + filename: PathBuf, + outdir: PathBuf, + ) -> Mutator { let conf = MutatorConf { mutation_operators: ops.clone(), + fallback_operators: fallback.clone(), funcs_to_mutate: None, contract: None, }; diff --git a/src/mutator.rs b/src/mutator.rs index 4cafbc87..c355dc87 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -28,6 +28,12 @@ pub struct MutatorConf { /// Mutation operators to apply during mutation pub mutation_operators: Vec, + /// Operators to use when an expression or statement didn't + /// otherwise mutate. These act as a fallback to help ensure + /// a given program point is mutated without creating too many + /// mutants. + pub fallback_operators: Vec, + /// If this is `Some(fnames)` then only mutate functions with names in /// `fnames`. If this is `None` then mutate all function names pub funcs_to_mutate: Option>, @@ -49,8 +55,19 @@ impl From<&MutateParams> for MutatorConf { } else { MutationType::default_mutation_operators() }; + let fallback_operators = if let Some(ops) = &mutate_params.fallback_mutations { + ops.iter() + .map(|op| { + MutationType::from_str(normalize_mutation_operator_name(op).as_str(), true) + .unwrap_or_else(|_| panic!("Unrecognized mutation operator {op}")) + }) + .collect() + } else { + MutationType::default_fallback_mutation_operators() + }; MutatorConf { mutation_operators, + fallback_operators, funcs_to_mutate: mutate_params.functions.clone(), contract: mutate_params.contract.clone(), } @@ -188,6 +205,10 @@ impl Mutator { &self.conf.mutation_operators.as_slice() } + pub fn fallback_mutation_operators(&self) -> &[MutationType] { + &self.conf.fallback_operators.as_slice() + } + /// Run all mutations! This is the main external entry point into mutation. /// This function: /// @@ -299,6 +320,19 @@ impl Mutator { if let Some(_) = expr.loc().try_file_no() { let mut mutants = vec![]; for op in self.mutation_operators() { + if op.is_fallback_mutation(self) { + continue; + } + mutants.append(&mut op.mutate_expression(self, expr)); + } + self.mutants.append(&mut mutants); + } + } + + pub fn apply_fallback_operators_to_expression(&mut self, expr: &Expression) { + if let Some(_) = expr.loc().try_file_no() { + let mut mutants = vec![]; + for op in self.fallback_mutation_operators() { mutants.append(&mut op.mutate_expression(self, expr)); } self.mutants.append(&mut mutants); @@ -318,11 +352,17 @@ impl Mutator { pub fn mutate_statement(statement: &Statement, mutator: &mut Mutator) -> bool { mutator.apply_operators_to_statement(statement); + let num_mutants_before_expr_mutate = mutator.mutants.len(); match statement { Statement::Block { .. } => true, Statement::VariableDecl(_, _, _, expr) => { match expr { - Some(e) => e.recurse(mutator, mutate_expression), + Some(e) => { + e.recurse(mutator, mutate_expression); + if mutator.mutants.len() == num_mutants_before_expr_mutate { + perform_fallback_mutations(e, mutator); + } + } None => (), } @@ -331,36 +371,75 @@ pub fn mutate_statement(statement: &Statement, mutator: &mut Mutator) -> bool { Statement::If(_, _, c, _, _) => { c.recurse(mutator, mutate_expression); + if mutator.mutants.len() == num_mutants_before_expr_mutate { + perform_fallback_mutations(c, mutator); + } true } Statement::While(_, _, c, _) => { c.recurse(mutator, mutate_expression); + if mutator.mutants.len() == num_mutants_before_expr_mutate { + perform_fallback_mutations(c, mutator); + } true } - Statement::For { - loc: _, - reachable: _, - init: _, - cond, - .. - } => { + Statement::For { cond, .. } => { if let Some(cond) = cond { cond.recurse(mutator, mutate_expression); + if mutator.mutants.len() == num_mutants_before_expr_mutate { + perform_fallback_mutations(cond, mutator); + } + } + true + } + Statement::DoWhile(_, _, _, c) => { + c.recurse(mutator, mutate_expression); + if mutator.mutants.len() == num_mutants_before_expr_mutate { + perform_fallback_mutations(c, mutator); } true } - Statement::DoWhile(_, _, _, _) => true, - Statement::Expression(_, _, _) => true, - Statement::Delete(_, _, _) => true, - Statement::Destructure(_, _, e) => { + Statement::Expression(_, _, e) => { e.recurse(mutator, mutate_expression); + if mutator.mutants.len() == num_mutants_before_expr_mutate { + match e { + Expression::PreIncrement { .. } + | Expression::PreDecrement { .. } + | Expression::PostIncrement { .. } + | Expression::PostDecrement { .. } => (), + + Expression::Assign { right, .. } => perform_fallback_mutations(right, mutator), + + Expression::Constructor { args, .. } + | Expression::Builtin { args, .. } + | Expression::InternalFunctionCall { args, .. } + | Expression::ExternalFunctionCall { args, .. } => { + for arg in args { + perform_fallback_mutations(arg, mutator); + } + } + Expression::ExternalFunctionCallRaw { .. } => (), + _ => (), + } + perform_fallback_mutations(e, mutator); + } + true + } + Statement::Delete(_, _, e) | Statement::Destructure(_, _, e) => { + e.recurse(mutator, mutate_expression); + if mutator.mutants.len() == num_mutants_before_expr_mutate { + perform_fallback_mutations(e, mutator); + } true } Statement::Continue(_) => true, Statement::Break(_) => true, Statement::Return(_, rv) => { if let Some(rv) = rv { - rv.recurse(mutator, mutate_expression) + rv.recurse(mutator, mutate_expression); + if mutator.mutants.len() == num_mutants_before_expr_mutate { + perform_fallback_mutations(rv, mutator); + } } true } @@ -376,3 +455,7 @@ pub fn mutate_expression(expr: &Expression, mutator: &mut Mutator) -> bool { mutator.apply_operators_to_expression(expr); true } + +pub fn perform_fallback_mutations(expr: &Expression, mutator: &mut Mutator) { + mutator.apply_fallback_operators_to_expression(expr); +} From de60254bda34cf815b77742d90f893f37fbc8169 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 5 Aug 2023 13:39:03 -0700 Subject: [PATCH 083/200] EVR (first pass, still buggy) --- src/mutation.rs | 180 +++++++++++++++++++++++++++++++++++------------- src/mutator.rs | 10 ++- 2 files changed, 140 insertions(+), 50 deletions(-) diff --git a/src/mutation.rs b/src/mutation.rs index b0fcfd15..a43cfedc 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -224,6 +224,7 @@ pub trait Mutation { fn mutate_statement(&self, mutator: &Mutator, stmt: &Statement) -> Vec; fn mutate_expression(&self, mutator: &Mutator, expr: &Expression) -> Vec; + fn mutate_expression_fallback(&self, mutator: &Mutator, expr: &Expression) -> Vec; /// Is a given mutation operator a fallback mutation? fn is_fallback_mutation(&self, mutator: &Mutator) -> bool; @@ -287,7 +288,61 @@ impl Mutation for MutationType { } fn mutate_expression(&self, mutator: &Mutator, expr: &Expression) -> Vec { - if self.is_fallback_mutation(mutator) { + self._mutate_expression_helper(mutator, expr, false) + } + + fn mutate_expression_fallback(&self, mutator: &Mutator, expr: &Expression) -> Vec { + self._mutate_expression_helper(mutator, expr, true) + } + + fn is_fallback_mutation(&self, mutator: &Mutator) -> bool { + mutator.conf.fallback_operators.contains(self) + } +} + +impl MutationType { + pub fn default_mutation_operators() -> Vec { + vec![ + MutationType::ArithmeticOperatorReplacement, + MutationType::BitwiseOperatorReplacement, + MutationType::ExpressionValueReplacement, + MutationType::ElimDelegateCall, + MutationType::LiteralValueReplacement, + MutationType::LogicalOperatorReplacement, + MutationType::RelationalOperatorReplacement, + MutationType::ShiftOperatorReplacement, + MutationType::StatementDeletion, + MutationType::UnaryOperatorReplacement, + ] + } + + pub fn default_fallback_mutation_operators() -> Vec { + vec![MutationType::ExpressionValueReplacement] + } + + pub fn short_name(&self) -> String { + match self { + MutationType::ArithmeticOperatorReplacement => "AOR", + MutationType::BitwiseOperatorReplacement => "BOR", + MutationType::ElimDelegateCall => "EDC", + MutationType::ExpressionValueReplacement => "EVR", + MutationType::LiteralValueReplacement => "LVR", + MutationType::LogicalOperatorReplacement => "LOR", + MutationType::RelationalOperatorReplacement => "ROR", + MutationType::ShiftOperatorReplacement => "SOR", + MutationType::StatementDeletion => "STD", + MutationType::UnaryOperatorReplacement => "UOR", + } + .to_string() + } + + fn _mutate_expression_helper( + &self, + mutator: &Mutator, + expr: &Expression, + is_fallback: bool, + ) -> Vec { + if self.is_fallback_mutation(mutator) != is_fallback { return vec![]; } let file_no = expr.loc().file_no(); @@ -333,47 +388,6 @@ impl Mutation for MutationType { _ => vec![], } } - - fn is_fallback_mutation(&self, mutator: &Mutator) -> bool { - mutator.conf.fallback_operators.contains(self) - } -} - -impl MutationType { - pub fn default_mutation_operators() -> Vec { - vec![ - MutationType::ArithmeticOperatorReplacement, - MutationType::BitwiseOperatorReplacement, - MutationType::ExpressionValueReplacement, - MutationType::ElimDelegateCall, - MutationType::LiteralValueReplacement, - MutationType::LogicalOperatorReplacement, - MutationType::RelationalOperatorReplacement, - MutationType::ShiftOperatorReplacement, - MutationType::StatementDeletion, - MutationType::UnaryOperatorReplacement, - ] - } - - pub fn default_fallback_mutation_operators() -> Vec { - vec![MutationType::ExpressionValueReplacement] - } - - pub fn short_name(&self) -> String { - match self { - MutationType::ArithmeticOperatorReplacement => "AOR", - MutationType::BitwiseOperatorReplacement => "BOR", - MutationType::ElimDelegateCall => "EDC", - MutationType::ExpressionValueReplacement => "EVR", - MutationType::LiteralValueReplacement => "LVR", - MutationType::LogicalOperatorReplacement => "LOR", - MutationType::RelationalOperatorReplacement => "ROR", - MutationType::ShiftOperatorReplacement => "SOR", - MutationType::StatementDeletion => "STD", - MutationType::UnaryOperatorReplacement => "UOR", - } - .to_string() - } } /// Find the location of an operator. This is not explicitly represented in an @@ -995,17 +1009,85 @@ fn elim_delegate_mutation( } } +fn defaults_by_type(ty: &Type) -> Vec<&str> { + match ty { + Type::Bool => vec!["true", "false"], + Type::Int(_) => vec!["-1", "0", "1"], + Type::Uint(_) => vec!["0", "1"], + _ => vec![], + } +} + #[allow(dead_code)] fn expression_value_replacement( - _op: &MutationType, - _file_resolver: &FileResolver, - _namespace: Rc, - _expr: &Expression, - _source: &Arc, + op: &MutationType, + file_resolver: &FileResolver, + namespace: Rc, + expr: &Expression, + source: &Arc, ) -> Vec { // TODO: implement - println!("Running EVR on {:?} ", _expr); - vec![] + println!("Running EVR on {:?} ", expr); + let replacements = match expr { + Expression::Add { ty, .. } + | Expression::Subtract { ty, .. } + | Expression::Multiply { ty, .. } + | Expression::Divide { ty, .. } + | Expression::Modulo { ty, .. } + | Expression::Power { ty, .. } + | Expression::BitwiseOr { ty, .. } + | Expression::BitwiseAnd { ty, .. } + | Expression::BitwiseXor { ty, .. } + | Expression::ShiftLeft { ty, .. } + | Expression::ShiftRight { ty, .. } + | Expression::ConstantVariable { ty, .. } + | Expression::StorageVariable { ty, .. } + | Expression::Load { ty, .. } + | Expression::GetRef { ty, .. } + | Expression::BitwiseNot { ty, .. } + | Expression::Negate { ty, .. } + | Expression::ConditionalOperator { ty, .. } + | Expression::StorageLoad { ty, .. } => defaults_by_type(ty), + Expression::Variable { ty, .. } => { + println!("Visiting variable {:?}", expr); + defaults_by_type(ty) + } + + Expression::ZeroExt { to, .. } + | Expression::Cast { to, .. } + | Expression::BytesCast { to, .. } + | Expression::CheckingTrunc { to, .. } + | Expression::Trunc { to, .. } + | Expression::SignExt { to, .. } => defaults_by_type(to), + + Expression::More { .. } + | Expression::Less { .. } + | Expression::MoreEqual { .. } + | Expression::LessEqual { .. } + | Expression::Equal { .. } + | Expression::NotEqual { .. } + | Expression::Not { .. } + | Expression::Or { .. } + | Expression::And { .. } => defaults_by_type(&Type::Bool), + _ => vec![], + }; + let mut mutants = vec![]; + let loc = expr.loc(); + let expr_start = loc.start(); + let expr_end = loc.end(); + let expr_string = &source[expr_start..expr_end]; + + for r in replacements { + mutants.push(Mutant::new( + file_resolver, + namespace.clone(), + loc, + op.clone(), + expr_string.to_string(), + r.to_string(), + )); + } + mutants } /// This testing module defines and uses the testing infrastructure, allowing diff --git a/src/mutator.rs b/src/mutator.rs index c355dc87..75f5c155 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -332,8 +332,10 @@ impl Mutator { pub fn apply_fallback_operators_to_expression(&mut self, expr: &Expression) { if let Some(_) = expr.loc().try_file_no() { let mut mutants = vec![]; + println!("YOYOYO "); for op in self.fallback_mutation_operators() { - mutants.append(&mut op.mutate_expression(self, expr)); + println!("Fallback op: {:?}", op); + mutants.append(&mut op.mutate_expression_fallback(self, expr)); } self.mutants.append(&mut mutants); } @@ -378,7 +380,13 @@ pub fn mutate_statement(statement: &Statement, mutator: &mut Mutator) -> bool { } Statement::While(_, _, c, _) => { c.recurse(mutator, mutate_expression); + println!( + "While: {}, {}", + num_mutants_before_expr_mutate, + mutator.mutants.len() + ); if mutator.mutants.len() == num_mutants_before_expr_mutate { + println!("HELLO"); perform_fallback_mutations(c, mutator); } true From 7b967c844fea8dff5a85d43b344e4cc1be0962d2 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 5 Aug 2023 13:39:18 -0700 Subject: [PATCH 084/200] Added regression tests for EVR (double check these!) --- .../all_ops.json/gambit_results.json | 44 ++-- .../regressions/all_ops.json/mutants.log | 28 +-- .../all_ops.json/mutants/62/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/63/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/64/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/65/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/66/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/67/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/68/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/69/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/70/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/71/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/72/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/73/ROR/ROR.sol | 65 ----- .../mutants/{75 => 73}/UOR/UOR.sol | 0 .../all_ops.json/mutants/74/ROR/ROR.sol | 65 ----- .../mutants/{76 => 74}/UOR/UOR.sol | 0 .../regressions/ror.json/gambit_results.json | 36 +-- resources/regressions/ror.json/mutants.log | 24 +- .../ror.json/mutants/16/Ops/ROR/ROR.sol | 4 +- .../ror.json/mutants/17/Ops/ROR/ROR.sol | 6 +- .../ror.json/mutants/18/Ops/ROR/ROR.sol | 4 +- .../ror.json/mutants/19/Ops/ROR/ROR.sol | 4 +- .../ror.json/mutants/20/Ops/ROR/ROR.sol | 6 +- .../ror.json/mutants/21/Ops/ROR/ROR.sol | 6 +- .../ror.json/mutants/22/Ops/ROR/ROR.sol | 6 +- .../ror.json/mutants/23/Ops/ROR/ROR.sol | 4 +- .../ror.json/mutants/24/Ops/ROR/ROR.sol | 6 +- .../ror.json/mutants/25/Ops/ROR/ROR.sol | 6 +- .../ror.json/mutants/26/Ops/ROR/ROR.sol | 4 +- .../ror.json/mutants/27/Ops/ROR/ROR.sol | 65 ----- .../ror.json/mutants/28/Ops/ROR/ROR.sol | 65 ----- .../test_log_invalid.json/gambit_results.json | 44 ++-- .../test_log_invalid.json/mutants.log | 28 +-- .../mutants/62/ROR/ROR.sol | 4 +- .../mutants/63/ROR/ROR.sol | 6 +- .../mutants/64/ROR/ROR.sol | 4 +- .../mutants/65/ROR/ROR.sol | 4 +- .../mutants/66/ROR/ROR.sol | 6 +- .../mutants/67/ROR/ROR.sol | 6 +- .../mutants/68/ROR/ROR.sol | 6 +- .../mutants/69/ROR/ROR.sol | 4 +- .../mutants/70/ROR/ROR.sol | 6 +- .../mutants/71/ROR/ROR.sol | 6 +- .../mutants/72/ROR/ROR.sol | 4 +- .../mutants/73/ROR/ROR.sol | 65 ----- .../mutants/{75 => 73}/UOR/UOR.sol | 0 .../mutants/74/ROR/ROR.sol | 65 ----- .../mutants/{76 => 74}/UOR/UOR.sol | 0 .../gambit_results.json | 230 ++++++++++++------ .../mutants.log | 108 ++++---- .../mutants/10/MultipleContracts/C.sol | 6 +- .../mutants/11/MultipleContracts/C.sol | 6 +- .../mutants/12/MultipleContracts/C.sol | 6 +- .../mutants/13/MultipleContracts/C.sol | 6 +- .../mutants/14/MultipleContracts/C.sol | 6 +- .../mutants/15/MultipleContracts/C.sol | 6 +- .../mutants/16/MultipleContracts/C.sol | 4 +- .../mutants/17/MultipleContracts/C.sol | 4 +- .../mutants/18/MultipleContracts/C.sol | 6 +- .../mutants/19/MultipleContracts/C.sol | 6 +- .../mutants/2/MultipleContracts/C.sol | 6 +- .../mutants/20/MultipleContracts/C.sol | 6 +- .../mutants/21/MultipleContracts/C.sol | 6 +- .../mutants/22/MultipleContracts/C.sol | 6 +- .../mutants/23/MultipleContracts/C.sol | 6 +- .../mutants/24/MultipleContracts/C.sol | 6 +- .../mutants/25/MultipleContracts/C.sol | 6 +- .../mutants/26/MultipleContracts/C.sol | 6 +- .../mutants/27/MultipleContracts/C.sol | 6 +- .../mutants/28/MultipleContracts/C.sol | 6 +- .../mutants/29/MultipleContracts/C.sol | 6 +- .../mutants/3/MultipleContracts/C.sol | 6 +- .../mutants/30/MultipleContracts/C.sol | 6 +- .../mutants/31/MultipleContracts/C.sol | 6 +- .../mutants/32/MultipleContracts/C.sol | 6 +- .../mutants/33/MultipleContracts/C.sol | 6 +- .../mutants/34/MultipleContracts/C.sol | 6 +- .../mutants/35/MultipleContracts/C.sol | 6 +- .../mutants/36/MultipleContracts/C.sol | 6 +- .../mutants/37/MultipleContracts/C.sol | 6 +- .../mutants/38/MultipleContracts/C.sol | 6 +- .../mutants/39/MultipleContracts/C.sol | 6 +- .../mutants/4/MultipleContracts/C.sol | 4 +- .../mutants/40/MultipleContracts/C.sol | 6 +- .../mutants/41/MultipleContracts/C.sol | 6 +- .../mutants/42/MultipleContracts/C.sol | 6 +- .../mutants/43/MultipleContracts/C.sol | 6 +- .../mutants/44/MultipleContracts/C.sol | 6 +- .../mutants/45/MultipleContracts/C.sol | 6 +- .../mutants/46/MultipleContracts/C.sol | 6 +- .../mutants/47/MultipleContracts/C.sol | 6 +- .../mutants/48/MultipleContracts/C.sol | 6 +- .../mutants/49/MultipleContracts/C.sol | 6 +- .../mutants/5/MultipleContracts/C.sol | 4 +- .../mutants/50/MultipleContracts/C.sol | 6 +- .../mutants/51/MultipleContracts/C.sol | 41 ++++ .../mutants/52/MultipleContracts/C.sol | 41 ++++ .../mutants/53/MultipleContracts/C.sol | 41 ++++ .../mutants/54/MultipleContracts/C.sol | 41 ++++ .../mutants/55/MultipleContracts/C.sol | 41 ++++ .../mutants/56/MultipleContracts/C.sol | 41 ++++ .../mutants/57/MultipleContracts/C.sol | 41 ++++ .../mutants/58/MultipleContracts/C.sol | 41 ++++ .../mutants/59/MultipleContracts/C.sol | 41 ++++ .../mutants/6/MultipleContracts/C.sol | 4 +- .../mutants/60/MultipleContracts/C.sol | 41 ++++ .../mutants/7/MultipleContracts/C.sol | 6 +- .../mutants/8/MultipleContracts/C.sol | 6 +- .../mutants/9/MultipleContracts/C.sol | 6 +- .../gambit_results.json | 230 ++++++++++++------ .../mutants.log | 108 ++++---- .../mutants/10/MultipleContracts/C.sol | 6 +- .../mutants/11/MultipleContracts/C.sol | 6 +- .../mutants/12/MultipleContracts/C.sol | 6 +- .../mutants/13/MultipleContracts/C.sol | 6 +- .../mutants/14/MultipleContracts/C.sol | 6 +- .../mutants/15/MultipleContracts/C.sol | 6 +- .../mutants/16/MultipleContracts/C.sol | 4 +- .../mutants/17/MultipleContracts/C.sol | 4 +- .../mutants/18/MultipleContracts/C.sol | 6 +- .../mutants/19/MultipleContracts/C.sol | 6 +- .../mutants/2/MultipleContracts/C.sol | 6 +- .../mutants/20/MultipleContracts/C.sol | 6 +- .../mutants/21/MultipleContracts/C.sol | 6 +- .../mutants/22/MultipleContracts/C.sol | 6 +- .../mutants/23/MultipleContracts/C.sol | 6 +- .../mutants/24/MultipleContracts/C.sol | 6 +- .../mutants/25/MultipleContracts/C.sol | 6 +- .../mutants/26/MultipleContracts/C.sol | 6 +- .../mutants/27/MultipleContracts/C.sol | 6 +- .../mutants/28/MultipleContracts/C.sol | 6 +- .../mutants/29/MultipleContracts/C.sol | 6 +- .../mutants/3/MultipleContracts/C.sol | 6 +- .../mutants/30/MultipleContracts/C.sol | 6 +- .../mutants/31/MultipleContracts/C.sol | 6 +- .../mutants/32/MultipleContracts/C.sol | 6 +- .../mutants/33/MultipleContracts/C.sol | 6 +- .../mutants/34/MultipleContracts/C.sol | 6 +- .../mutants/35/MultipleContracts/C.sol | 6 +- .../mutants/36/MultipleContracts/C.sol | 6 +- .../mutants/37/MultipleContracts/C.sol | 6 +- .../mutants/38/MultipleContracts/C.sol | 6 +- .../mutants/39/MultipleContracts/C.sol | 6 +- .../mutants/4/MultipleContracts/C.sol | 4 +- .../mutants/40/MultipleContracts/C.sol | 6 +- .../mutants/41/MultipleContracts/C.sol | 6 +- .../mutants/42/MultipleContracts/C.sol | 6 +- .../mutants/43/MultipleContracts/C.sol | 6 +- .../mutants/44/MultipleContracts/C.sol | 6 +- .../mutants/45/MultipleContracts/C.sol | 6 +- .../mutants/46/MultipleContracts/C.sol | 6 +- .../mutants/47/MultipleContracts/C.sol | 6 +- .../mutants/48/MultipleContracts/C.sol | 6 +- .../mutants/49/MultipleContracts/C.sol | 6 +- .../mutants/5/MultipleContracts/C.sol | 4 +- .../mutants/50/MultipleContracts/C.sol | 6 +- .../mutants/51/MultipleContracts/C.sol | 41 ++++ .../mutants/52/MultipleContracts/C.sol | 41 ++++ .../mutants/53/MultipleContracts/C.sol | 41 ++++ .../mutants/54/MultipleContracts/C.sol | 41 ++++ .../mutants/55/MultipleContracts/C.sol | 41 ++++ .../mutants/56/MultipleContracts/C.sol | 41 ++++ .../mutants/57/MultipleContracts/C.sol | 41 ++++ .../mutants/58/MultipleContracts/C.sol | 41 ++++ .../mutants/59/MultipleContracts/C.sol | 41 ++++ .../mutants/6/MultipleContracts/C.sol | 4 +- .../mutants/60/MultipleContracts/C.sol | 41 ++++ .../mutants/7/MultipleContracts/C.sol | 6 +- .../mutants/8/MultipleContracts/C.sol | 6 +- .../mutants/9/MultipleContracts/C.sol | 6 +- .../gambit_results.json | 230 ++++++++++++------ .../mutants.log | 108 ++++---- .../mutants/10/MultipleContracts/C.sol | 6 +- .../mutants/11/MultipleContracts/C.sol | 6 +- .../mutants/12/MultipleContracts/C.sol | 6 +- .../mutants/13/MultipleContracts/C.sol | 6 +- .../mutants/14/MultipleContracts/C.sol | 6 +- .../mutants/15/MultipleContracts/C.sol | 6 +- .../mutants/16/MultipleContracts/C.sol | 4 +- .../mutants/17/MultipleContracts/C.sol | 4 +- .../mutants/18/MultipleContracts/C.sol | 6 +- .../mutants/19/MultipleContracts/C.sol | 6 +- .../mutants/2/MultipleContracts/C.sol | 6 +- .../mutants/20/MultipleContracts/C.sol | 6 +- .../mutants/21/MultipleContracts/C.sol | 6 +- .../mutants/22/MultipleContracts/C.sol | 6 +- .../mutants/23/MultipleContracts/C.sol | 6 +- .../mutants/24/MultipleContracts/C.sol | 6 +- .../mutants/25/MultipleContracts/C.sol | 6 +- .../mutants/26/MultipleContracts/C.sol | 6 +- .../mutants/27/MultipleContracts/C.sol | 6 +- .../mutants/28/MultipleContracts/C.sol | 6 +- .../mutants/29/MultipleContracts/C.sol | 6 +- .../mutants/3/MultipleContracts/C.sol | 6 +- .../mutants/30/MultipleContracts/C.sol | 6 +- .../mutants/31/MultipleContracts/C.sol | 6 +- .../mutants/32/MultipleContracts/C.sol | 6 +- .../mutants/33/MultipleContracts/C.sol | 6 +- .../mutants/34/MultipleContracts/C.sol | 6 +- .../mutants/35/MultipleContracts/C.sol | 6 +- .../mutants/36/MultipleContracts/C.sol | 6 +- .../mutants/37/MultipleContracts/C.sol | 6 +- .../mutants/38/MultipleContracts/C.sol | 6 +- .../mutants/39/MultipleContracts/C.sol | 6 +- .../mutants/4/MultipleContracts/C.sol | 4 +- .../mutants/40/MultipleContracts/C.sol | 6 +- .../mutants/41/MultipleContracts/C.sol | 6 +- .../mutants/42/MultipleContracts/C.sol | 6 +- .../mutants/43/MultipleContracts/C.sol | 6 +- .../mutants/44/MultipleContracts/C.sol | 6 +- .../mutants/45/MultipleContracts/C.sol | 6 +- .../mutants/46/MultipleContracts/C.sol | 6 +- .../mutants/47/MultipleContracts/C.sol | 6 +- .../mutants/48/MultipleContracts/C.sol | 6 +- .../mutants/49/MultipleContracts/C.sol | 6 +- .../mutants/5/MultipleContracts/C.sol | 4 +- .../mutants/50/MultipleContracts/C.sol | 6 +- .../mutants/51/MultipleContracts/C.sol | 41 ++++ .../mutants/52/MultipleContracts/C.sol | 41 ++++ .../mutants/53/MultipleContracts/C.sol | 41 ++++ .../mutants/54/MultipleContracts/C.sol | 41 ++++ .../mutants/55/MultipleContracts/C.sol | 41 ++++ .../mutants/56/MultipleContracts/C.sol | 41 ++++ .../mutants/57/MultipleContracts/C.sol | 41 ++++ .../mutants/58/MultipleContracts/C.sol | 41 ++++ .../mutants/59/MultipleContracts/C.sol | 41 ++++ .../mutants/6/MultipleContracts/C.sol | 4 +- .../mutants/60/MultipleContracts/C.sol | 41 ++++ .../mutants/7/MultipleContracts/C.sol | 6 +- .../mutants/8/MultipleContracts/C.sol | 6 +- .../mutants/9/MultipleContracts/C.sol | 6 +- .../gambit_results.json | 119 +++++---- .../test_multiple_files_1.json/mutants.log | 53 ++-- .../mutants/29/MultipleContracts/C.sol | 6 +- .../mutants/30/MultipleContracts/C.sol | 6 +- .../mutants/31/MultipleContracts/C.sol | 4 +- .../mutants/32/MultipleContracts/C.sol | 4 +- .../mutants/33/MultipleContracts/C.sol | 4 +- .../mutants/34/MultipleContracts/C.sol | 6 +- .../mutants/35/MultipleContracts/C.sol | 6 +- .../mutants/36/MultipleContracts/C.sol | 6 +- .../mutants/37/MultipleContracts/C.sol | 6 +- .../mutants/38/MultipleContracts/C.sol | 6 +- .../mutants/39/MultipleContracts/C.sol | 6 +- .../mutants/40/MultipleContracts/C.sol | 6 +- .../mutants/41/MultipleContracts/C.sol | 6 +- .../mutants/42/MultipleContracts/C.sol | 6 +- .../mutants/43/MultipleContracts/C.sol | 4 +- .../mutants/44/MultipleContracts/C.sol | 4 +- .../mutants/45/MultipleContracts/C.sol | 6 +- .../mutants/46/MultipleContracts/C.sol | 6 +- .../mutants/47/MultipleContracts/C.sol | 6 +- .../mutants/48/MultipleContracts/C.sol | 6 +- .../mutants/49/MultipleContracts/C.sol | 6 +- .../mutants/50/MultipleContracts/C.sol | 6 +- .../mutants/51/MultipleContracts/C.sol | 6 +- .../mutants/52/MultipleContracts/C.sol | 6 +- .../mutants/53/MultipleContracts/C.sol | 41 ++++ .../mutants/54/MultipleContracts/C.sol | 41 ++++ .../mutants/55/MultipleContracts/C.sol | 41 ++++ .../mutants/56/MultipleContracts/C.sol | 41 ++++ .../mutants/57/MultipleContracts/C.sol | 41 ++++ 263 files changed, 2823 insertions(+), 1546 deletions(-) delete mode 100644 resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol rename resources/regressions/all_ops.json/mutants/{75 => 73}/UOR/UOR.sol (100%) delete mode 100644 resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol rename resources/regressions/all_ops.json/mutants/{76 => 74}/UOR/UOR.sol (100%) delete mode 100644 resources/regressions/ror.json/mutants/27/Ops/ROR/ROR.sol delete mode 100644 resources/regressions/ror.json/mutants/28/Ops/ROR/ROR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol rename resources/regressions/test_log_invalid.json/mutants/{75 => 73}/UOR/UOR.sol (100%) delete mode 100644 resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol rename resources/regressions/test_log_invalid.json/mutants/{76 => 74}/UOR/UOR.sol (100%) create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol diff --git a/resources/regressions/all_ops.json/gambit_results.json b/resources/regressions/all_ops.json/gambit_results.json index 729abcbf..1c5f0d77 100644 --- a/resources/regressions/all_ops.json/gambit_results.json +++ b/resources/regressions/all_ops.json/gambit_results.json @@ -428,107 +428,93 @@ }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "62", "name": "mutants/62/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "63", "name": "mutants/63/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "64", "name": "mutants/64/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", "id": "65", "name": "mutants/65/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "66", "name": "mutants/66/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "67", "name": "mutants/67/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "68", "name": "mutants/68/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "69", "name": "mutants/69/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", "id": "70", "name": "mutants/70/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", "id": "71", "name": "mutants/71/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", "id": "72", "name": "mutants/72/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, - { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", - "id": "73", - "name": "mutants/73/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" - }, - { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", - "id": "74", - "name": "mutants/74/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" - }, { "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", - "id": "75", - "name": "mutants/75/UOR/UOR.sol", + "id": "73", + "name": "mutants/73/UOR/UOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" }, { "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", - "id": "76", - "name": "mutants/76/UOR/UOR.sol", + "id": "74", + "name": "mutants/74/UOR/UOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" } ] \ No newline at end of file diff --git a/resources/regressions/all_ops.json/mutants.log b/resources/regressions/all_ops.json/mutants.log index 6454a41d..12711d6c 100644 --- a/resources/regressions/all_ops.json/mutants.log +++ b/resources/regressions/all_ops.json/mutants.log @@ -59,18 +59,16 @@ 59,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,<= 60,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,>= 61,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:7,x == y,false -62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,true -63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false -64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< -65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> -66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true -67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true -68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,false -69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> -70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== -71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true -72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< -73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> -74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true -75,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,13:7,~, - -76,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,18:7,~, ~ +62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false +63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< +64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> +65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true +66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true +67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> +68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== +69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true +70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< +71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> +72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true +73,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,13:7,~, - +74,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,18:7,~, ~ diff --git a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol index e2798373..ab40e6c9 100644 --- a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol @@ -30,9 +30,9 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;` + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return false; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol index ab40e6c9..f42e7b7e 100644 --- a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol @@ -30,14 +30,14 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x == y; } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x < y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol index f42e7b7e..e5f50322 100644 --- a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x > y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol index e5f50322..83684484 100644 --- a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return true; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol index 83684484..3ae92133 100644 --- a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol @@ -35,14 +35,14 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x != y; } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol index 3ae92133..bdeac3af 100644 --- a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol @@ -40,9 +40,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) > z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol index b137a5bd..430379f6 100644 --- a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol @@ -40,9 +40,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) == z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol index bdeac3af..3d67c155 100644 --- a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol @@ -49,9 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) > z; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol index 430379f6..13612614 100644 --- a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol @@ -49,9 +49,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) == z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) < z; } } diff --git a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol index 3d67c155..dd0c83ca 100644 --- a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol @@ -49,9 +49,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return true; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) > z; } } diff --git a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol index 13612614..84889114 100644 --- a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol @@ -58,8 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) < z; + return true; } } diff --git a/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol deleted file mode 100644 index dd0c83ca..00000000 --- a/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` - ) public pure returns (bool) { - return (x + y) > z; - } -} diff --git a/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/73/UOR/UOR.sol similarity index 100% rename from resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol rename to resources/regressions/all_ops.json/mutants/73/UOR/UOR.sol diff --git a/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol deleted file mode 100644 index 84889114..00000000 --- a/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` - ) public pure returns (bool) { - return true; - } -} diff --git a/resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol similarity index 100% rename from resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol rename to resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol diff --git a/resources/regressions/ror.json/gambit_results.json b/resources/regressions/ror.json/gambit_results.json index 5173b73d..c0d3e1ca 100644 --- a/resources/regressions/ror.json/gambit_results.json +++ b/resources/regressions/ror.json/gambit_results.json @@ -106,93 +106,79 @@ }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "16", "name": "mutants/16/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "17", "name": "mutants/17/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "18", "name": "mutants/18/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", "id": "19", "name": "mutants/19/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "20", "name": "mutants/20/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "21", "name": "mutants/21/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "22", "name": "mutants/22/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "23", "name": "mutants/23/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", "id": "24", "name": "mutants/24/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", "id": "25", "name": "mutants/25/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", "id": "26", "name": "mutants/26/Ops/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" - }, - { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", - "id": "27", - "name": "mutants/27/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" - }, - { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", - "id": "28", - "name": "mutants/28/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" } ] \ No newline at end of file diff --git a/resources/regressions/ror.json/mutants.log b/resources/regressions/ror.json/mutants.log index a4dbcaf7..ac6e5ab0 100644 --- a/resources/regressions/ror.json/mutants.log +++ b/resources/regressions/ror.json/mutants.log @@ -13,16 +13,14 @@ 13,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,<= 14,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,>= 15,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:7,x == y,false -16,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,true -17,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false -18,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< -19,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> -20,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true -21,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true -22,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,false -23,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> -24,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== -25,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true -26,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< -27,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> -28,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true +16,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false +17,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< +18,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> +19,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true +20,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true +21,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> +22,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== +23,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true +24,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< +25,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> +26,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true diff --git a/resources/regressions/ror.json/mutants/16/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/16/Ops/ROR/ROR.sol index e2798373..ab40e6c9 100644 --- a/resources/regressions/ror.json/mutants/16/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/16/Ops/ROR/ROR.sol @@ -30,9 +30,9 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;` + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return false; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/ror.json/mutants/17/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/17/Ops/ROR/ROR.sol index ab40e6c9..f42e7b7e 100644 --- a/resources/regressions/ror.json/mutants/17/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/17/Ops/ROR/ROR.sol @@ -30,14 +30,14 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x == y; } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x < y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/ror.json/mutants/18/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/18/Ops/ROR/ROR.sol index f42e7b7e..e5f50322 100644 --- a/resources/regressions/ror.json/mutants/18/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/18/Ops/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x > y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/ror.json/mutants/19/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/19/Ops/ROR/ROR.sol index e5f50322..83684484 100644 --- a/resources/regressions/ror.json/mutants/19/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/19/Ops/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return true; } // Expect 2 mutants: true, false diff --git a/resources/regressions/ror.json/mutants/20/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/20/Ops/ROR/ROR.sol index 83684484..3ae92133 100644 --- a/resources/regressions/ror.json/mutants/20/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/20/Ops/ROR/ROR.sol @@ -35,14 +35,14 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x != y; } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/ror.json/mutants/21/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/21/Ops/ROR/ROR.sol index 3ae92133..bdeac3af 100644 --- a/resources/regressions/ror.json/mutants/21/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/21/Ops/ROR/ROR.sol @@ -40,9 +40,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) > z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/ror.json/mutants/22/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/22/Ops/ROR/ROR.sol index b137a5bd..430379f6 100644 --- a/resources/regressions/ror.json/mutants/22/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/22/Ops/ROR/ROR.sol @@ -40,9 +40,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) == z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/ror.json/mutants/23/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/23/Ops/ROR/ROR.sol index bdeac3af..3d67c155 100644 --- a/resources/regressions/ror.json/mutants/23/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/23/Ops/ROR/ROR.sol @@ -49,9 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) > z; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/ror.json/mutants/24/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/24/Ops/ROR/ROR.sol index 430379f6..13612614 100644 --- a/resources/regressions/ror.json/mutants/24/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/24/Ops/ROR/ROR.sol @@ -49,9 +49,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) == z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) < z; } } diff --git a/resources/regressions/ror.json/mutants/25/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/25/Ops/ROR/ROR.sol index 3d67c155..dd0c83ca 100644 --- a/resources/regressions/ror.json/mutants/25/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/25/Ops/ROR/ROR.sol @@ -49,9 +49,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return true; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) > z; } } diff --git a/resources/regressions/ror.json/mutants/26/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/26/Ops/ROR/ROR.sol index 13612614..84889114 100644 --- a/resources/regressions/ror.json/mutants/26/Ops/ROR/ROR.sol +++ b/resources/regressions/ror.json/mutants/26/Ops/ROR/ROR.sol @@ -58,8 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) < z; + return true; } } diff --git a/resources/regressions/ror.json/mutants/27/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/27/Ops/ROR/ROR.sol deleted file mode 100644 index dd0c83ca..00000000 --- a/resources/regressions/ror.json/mutants/27/Ops/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` - ) public pure returns (bool) { - return (x + y) > z; - } -} diff --git a/resources/regressions/ror.json/mutants/28/Ops/ROR/ROR.sol b/resources/regressions/ror.json/mutants/28/Ops/ROR/ROR.sol deleted file mode 100644 index 84889114..00000000 --- a/resources/regressions/ror.json/mutants/28/Ops/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` - ) public pure returns (bool) { - return true; - } -} diff --git a/resources/regressions/test_log_invalid.json/gambit_results.json b/resources/regressions/test_log_invalid.json/gambit_results.json index 729abcbf..1c5f0d77 100644 --- a/resources/regressions/test_log_invalid.json/gambit_results.json +++ b/resources/regressions/test_log_invalid.json/gambit_results.json @@ -428,107 +428,93 @@ }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return true;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "62", "name": "mutants/62/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "63", "name": "mutants/63/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "64", "name": "mutants/64/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", "id": "65", "name": "mutants/65/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", + "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "66", "name": "mutants/66/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "67", "name": "mutants/67/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return false;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "68", "name": "mutants/68/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "69", "name": "mutants/69/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", "id": "70", "name": "mutants/70/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", "id": "71", "name": "mutants/71/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, { "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", "id": "72", "name": "mutants/72/ROR/ROR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" }, - { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", - "id": "73", - "name": "mutants/73/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" - }, - { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", - "id": "74", - "name": "mutants/74/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" - }, { "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", - "id": "75", - "name": "mutants/75/UOR/UOR.sol", + "id": "73", + "name": "mutants/73/UOR/UOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" }, { "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", - "id": "76", - "name": "mutants/76/UOR/UOR.sol", + "id": "74", + "name": "mutants/74/UOR/UOR.sol", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_log_invalid.json/mutants.log b/resources/regressions/test_log_invalid.json/mutants.log index 6454a41d..12711d6c 100644 --- a/resources/regressions/test_log_invalid.json/mutants.log +++ b/resources/regressions/test_log_invalid.json/mutants.log @@ -59,18 +59,16 @@ 59,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,<= 60,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,>= 61,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:7,x == y,false -62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,true -63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false -64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< -65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> -66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true -67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true -68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,false -69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> -70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== -71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true -72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< -73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> -74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true -75,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,13:7,~, - -76,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,18:7,~, ~ +62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false +63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< +64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> +65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true +66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true +67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> +68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== +69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true +70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< +71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> +72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true +73,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,13:7,~, - +74,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,18:7,~, ~ diff --git a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol index e2798373..ab40e6c9 100644 --- a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol @@ -30,9 +30,9 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `true`) of: `return x == y;` + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return false; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol index ab40e6c9..f42e7b7e 100644 --- a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol @@ -30,14 +30,14 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x == y; } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x < y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol index f42e7b7e..e5f50322 100644 --- a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x > y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol index e5f50322..83684484 100644 --- a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return true; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol index 83684484..3ae92133 100644 --- a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol @@ -35,14 +35,14 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x != y; } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol index 3ae92133..bdeac3af 100644 --- a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol @@ -40,9 +40,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) > z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol index b137a5bd..430379f6 100644 --- a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol @@ -40,9 +40,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `false`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) == z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol index bdeac3af..3d67c155 100644 --- a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol @@ -49,9 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) > z; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol index 430379f6..13612614 100644 --- a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol @@ -49,9 +49,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) == z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) < z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol index 3d67c155..dd0c83ca 100644 --- a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol @@ -49,9 +49,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return true; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) > z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol index 13612614..84889114 100644 --- a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol @@ -58,8 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) < z; + return true; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol deleted file mode 100644 index dd0c83ca..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` - ) public pure returns (bool) { - return (x + y) > z; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/73/UOR/UOR.sol similarity index 100% rename from resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol rename to resources/regressions/test_log_invalid.json/mutants/73/UOR/UOR.sol diff --git a/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol deleted file mode 100644 index 84889114..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` - ) public pure returns (bool) { - return true; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol similarity index 100% rename from resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol rename to resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol diff --git a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json index 209e619f..56d595e5 100644 --- a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json @@ -7,346 +7,416 @@ "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "27", "name": "mutants/27/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "51", + "name": "mutants/51/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "52", + "name": "mutants/52/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "id": "53", + "name": "mutants/53/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "id": "54", + "name": "mutants/54/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "id": "55", + "name": "mutants/55/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "id": "56", + "name": "mutants/56/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "57", + "name": "mutants/57/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "58", + "name": "mutants/58/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "59", + "name": "mutants/59/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "60", + "name": "mutants/60/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants.log b/resources/regressions/test_multiple_contracts_1.json/mutants.log index addf7287..efff0a10 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_1.json/mutants.log @@ -1,50 +1,60 @@ 1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -2,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -3,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -4,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -7,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -8,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -9,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -10,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -11,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -13,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -14,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -15,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -18,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -19,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -20,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -22,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -23,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -24,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -25,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% -26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -32,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -35,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -36,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -37,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -41,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -42,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -44,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -46,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +2,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false +3,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 +4,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +9,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +10,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +11,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 +13,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +14,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +15,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +22,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +23,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +24,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 +25,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) +32,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false +33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 +34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +40,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +41,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +45,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +53,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +54,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 +55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +60,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol index a9342ea1..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol @@ -13,11 +13,11 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` + address[] memory a = new address[](2); a[0] = msg.sender; - assert(true); + return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol index f2136ed3..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol @@ -14,14 +14,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + assert(true); return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol index f69e3360..9db93f13 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol @@ -14,14 +14,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + a[1] = msg.sender; return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol index 13319cbe..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol @@ -15,14 +15,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - return a; + assert(true); } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a + decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol index 3279b41e..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; + uint256 a = 0; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol index 95cc94e7..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; + uint256 a = 11; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol index cc3476f1..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; + uint256 res = a + decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol index 4979f42e..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a - decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol index 5933d066..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol @@ -20,10 +20,10 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); + uint256 res = a * decimals; + return res; } function getarray(address[] memory c, address e) public pure { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol index a4c6c970..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol @@ -20,14 +20,14 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a / decimals; return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol index f7a48737..ecdc98c4 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - assert(true); + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol index a14e05da..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a % decimals; return res; } @@ -30,9 +31,8 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol index 4887a934..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol @@ -21,8 +21,9 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; - return res; + assert(true); } function getarray(address[] memory c, address e) public pure { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol index 7a0c07d0..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol index d73584b8..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol index c226dcfd..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(c[1] == e); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol index c6022ee9..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol index 5f69007a..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol @@ -3,9 +3,8 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(true); + assert(c[0] == e); } function add(int8 a, int8 b) public pure returns (int8) { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol index f7a48737..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - assert(true); + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol index 9e5f617a..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol index 86125329..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol index 9e5f617a..e9466e07 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(c[1] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol index e85ef12c..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol index b32909ed..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol index f9a5de25..ecdc98c4 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol @@ -3,8 +3,9 @@ pragma solidity ^0.8.13; library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } function add(int8 a, int8 b) public pure returns (int8) { @@ -13,9 +14,8 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol index 16f8bc88..e9466e07 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol @@ -3,8 +3,9 @@ pragma solidity ^0.8.13; library Utils { + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(c[1] == e); } function add(int8 a, int8 b) public pure returns (int8) { @@ -13,9 +14,8 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol index 427647a6..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol @@ -7,16 +7,16 @@ library Utils { assert(c[0] == e); } + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + assert(true); } } contract C { function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - assert(true); + a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol index a9342ea1..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol @@ -7,17 +7,17 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a - b; } } contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - assert(true); + return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol index f2136ed3..86125329 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a * b; } } @@ -19,9 +20,8 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol index f69e3360..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a / b; } } @@ -19,9 +20,8 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol index 13319cbe..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a % b; } } @@ -20,9 +21,8 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a + decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol index 3279b41e..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol @@ -13,16 +13,16 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); + address[] memory a = new address[](0); a[0] = msg.sender; return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a - decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol index 86125329..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol index 95cc94e7..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol @@ -13,16 +13,16 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); + address[] memory a = new address[](2); a[0] = msg.sender; return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a * decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol index cc3476f1..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol @@ -14,15 +14,15 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + assert(true); return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol index 4979f42e..9db93f13 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol @@ -14,15 +14,15 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + a[1] = msg.sender; return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol index 5933d066..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol @@ -15,15 +15,15 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - return a; + assert(true); } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; - assert(true); + return res; } function getarray(address[] memory c, address e) public pure { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol index a4c6c970..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol @@ -19,15 +19,15 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; + uint256 a = 0; uint256 res = a ** decimals; return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol index a14e05da..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol @@ -19,8 +19,9 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; + uint256 a = 11; uint256 res = a ** decimals; return res; } @@ -30,9 +31,8 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol index 4887a934..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a + decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol index 7a0c07d0..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a - decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol index d73584b8..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a * decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol index c226dcfd..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a / decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol index e85ef12c..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a - b; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol index c6022ee9..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a % decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol new file mode 100644 index 00000000..5933d066 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol new file mode 100644 index 00000000..a4c6c970 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol new file mode 100644 index 00000000..781e87b1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(false); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol new file mode 100644 index 00000000..7749a0cb --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(c[1] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol new file mode 100644 index 00000000..a14e05da --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` + address[] memory b = this.foo(); + assert(true); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol new file mode 100644 index 00000000..4887a934 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + assert(true); + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol new file mode 100644 index 00000000..7a0c07d0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol new file mode 100644 index 00000000..d73584b8 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol new file mode 100644 index 00000000..c226dcfd --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol index b32909ed..86125329 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a * b; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol new file mode 100644 index 00000000..c6022ee9 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol index f9a5de25..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a / b; } } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol index 16f8bc88..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a % b; } } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol index 427647a6..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); + address[] memory a = new address[](0); + a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json index 209e619f..56d595e5 100644 --- a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json @@ -7,346 +7,416 @@ "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "27", "name": "mutants/27/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "51", + "name": "mutants/51/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "52", + "name": "mutants/52/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "id": "53", + "name": "mutants/53/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "id": "54", + "name": "mutants/54/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "id": "55", + "name": "mutants/55/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "id": "56", + "name": "mutants/56/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "57", + "name": "mutants/57/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "58", + "name": "mutants/58/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "59", + "name": "mutants/59/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "60", + "name": "mutants/60/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants.log b/resources/regressions/test_multiple_contracts_2.json/mutants.log index addf7287..efff0a10 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_2.json/mutants.log @@ -1,50 +1,60 @@ 1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -2,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -3,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -4,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -7,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -8,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -9,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -10,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -11,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -13,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -14,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -15,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -18,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -19,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -20,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -22,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -23,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -24,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -25,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% -26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -32,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -35,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -36,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -37,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -41,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -42,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -44,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -46,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +2,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false +3,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 +4,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +9,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +10,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +11,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 +13,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +14,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +15,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +22,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +23,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +24,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 +25,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) +32,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false +33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 +34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +40,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +41,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +45,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +53,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +54,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 +55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +60,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol index a9342ea1..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol @@ -13,11 +13,11 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` + address[] memory a = new address[](2); a[0] = msg.sender; - assert(true); + return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol index f2136ed3..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol @@ -14,14 +14,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + assert(true); return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol index f69e3360..9db93f13 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol @@ -14,14 +14,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + a[1] = msg.sender; return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol index 13319cbe..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol @@ -15,14 +15,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - return a; + assert(true); } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a + decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol index 3279b41e..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; + uint256 a = 0; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol index 95cc94e7..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; + uint256 a = 11; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol index cc3476f1..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; + uint256 res = a + decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol index 4979f42e..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a - decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol index 5933d066..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol @@ -20,10 +20,10 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); + uint256 res = a * decimals; + return res; } function getarray(address[] memory c, address e) public pure { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol index a4c6c970..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol @@ -20,14 +20,14 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a / decimals; return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol index f7a48737..ecdc98c4 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - assert(true); + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol index a14e05da..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a % decimals; return res; } @@ -30,9 +31,8 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol index 4887a934..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol @@ -21,8 +21,9 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; - return res; + assert(true); } function getarray(address[] memory c, address e) public pure { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol index 7a0c07d0..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol index d73584b8..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol index c226dcfd..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(c[1] == e); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol index c6022ee9..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol index 5f69007a..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol @@ -3,9 +3,8 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(true); + assert(c[0] == e); } function add(int8 a, int8 b) public pure returns (int8) { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol index f7a48737..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - assert(true); + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol index 9e5f617a..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol index 86125329..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol index 9e5f617a..e9466e07 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(c[1] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol index e85ef12c..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol index b32909ed..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol index f9a5de25..ecdc98c4 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol @@ -3,8 +3,9 @@ pragma solidity ^0.8.13; library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } function add(int8 a, int8 b) public pure returns (int8) { @@ -13,9 +14,8 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol index 16f8bc88..e9466e07 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol @@ -3,8 +3,9 @@ pragma solidity ^0.8.13; library Utils { + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(c[1] == e); } function add(int8 a, int8 b) public pure returns (int8) { @@ -13,9 +14,8 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol index 427647a6..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol @@ -7,16 +7,16 @@ library Utils { assert(c[0] == e); } + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + assert(true); } } contract C { function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - assert(true); + a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol index a9342ea1..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol @@ -7,17 +7,17 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a - b; } } contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - assert(true); + return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol index f2136ed3..86125329 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a * b; } } @@ -19,9 +20,8 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol index f69e3360..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a / b; } } @@ -19,9 +20,8 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol index 13319cbe..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a % b; } } @@ -20,9 +21,8 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a + decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol index 3279b41e..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol @@ -13,16 +13,16 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); + address[] memory a = new address[](0); a[0] = msg.sender; return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a - decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol index 86125329..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol index 95cc94e7..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol @@ -13,16 +13,16 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); + address[] memory a = new address[](2); a[0] = msg.sender; return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a * decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol index cc3476f1..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol @@ -14,15 +14,15 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + assert(true); return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol index 4979f42e..9db93f13 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol @@ -14,15 +14,15 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + a[1] = msg.sender; return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol index 5933d066..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol @@ -15,15 +15,15 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - return a; + assert(true); } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; - assert(true); + return res; } function getarray(address[] memory c, address e) public pure { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol index a4c6c970..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol @@ -19,15 +19,15 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; + uint256 a = 0; uint256 res = a ** decimals; return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol index a14e05da..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol @@ -19,8 +19,9 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; + uint256 a = 11; uint256 res = a ** decimals; return res; } @@ -30,9 +31,8 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol index 4887a934..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a + decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol index 7a0c07d0..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a - decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol index d73584b8..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a * decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol index c226dcfd..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a / decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol index e85ef12c..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a - b; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol index c6022ee9..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a % decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol new file mode 100644 index 00000000..5933d066 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol new file mode 100644 index 00000000..a4c6c970 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol new file mode 100644 index 00000000..781e87b1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(false); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol new file mode 100644 index 00000000..7749a0cb --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(c[1] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol new file mode 100644 index 00000000..a14e05da --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` + address[] memory b = this.foo(); + assert(true); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol new file mode 100644 index 00000000..4887a934 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + assert(true); + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol new file mode 100644 index 00000000..7a0c07d0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol new file mode 100644 index 00000000..d73584b8 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol new file mode 100644 index 00000000..c226dcfd --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol index b32909ed..86125329 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a * b; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol new file mode 100644 index 00000000..c6022ee9 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol index f9a5de25..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a / b; } } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol index 16f8bc88..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a % b; } } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol index 427647a6..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); + address[] memory a = new address[](0); + a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json index 209e619f..56d595e5 100644 --- a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json @@ -7,346 +7,416 @@ "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "27", "name": "mutants/27/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "51", + "name": "mutants/51/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "52", + "name": "mutants/52/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "id": "53", + "name": "mutants/53/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "id": "54", + "name": "mutants/54/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "id": "55", + "name": "mutants/55/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "id": "56", + "name": "mutants/56/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "57", + "name": "mutants/57/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "58", + "name": "mutants/58/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "59", + "name": "mutants/59/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "60", + "name": "mutants/60/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants.log b/resources/regressions/test_multiple_contracts_3.json/mutants.log index addf7287..efff0a10 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_3.json/mutants.log @@ -1,50 +1,60 @@ 1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -2,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -3,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -4,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -7,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -8,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -9,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -10,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -11,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -13,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -14,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -15,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -18,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -19,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -20,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -22,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -23,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -24,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -25,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% -26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -32,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -35,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -36,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -37,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -41,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -42,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -44,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -46,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +2,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false +3,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 +4,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +9,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +10,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +11,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 +13,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +14,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +15,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +22,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +23,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +24,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 +25,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) +32,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false +33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 +34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +40,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +41,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +45,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +53,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +54,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 +55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +60,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol index a9342ea1..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol @@ -13,11 +13,11 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` + address[] memory a = new address[](2); a[0] = msg.sender; - assert(true); + return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol index f2136ed3..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol @@ -14,14 +14,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + assert(true); return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol index f69e3360..9db93f13 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol @@ -14,14 +14,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + a[1] = msg.sender; return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol index 13319cbe..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol @@ -15,14 +15,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - return a; + assert(true); } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a + decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol index 3279b41e..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; + uint256 a = 0; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol index 95cc94e7..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; + uint256 a = 11; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol index cc3476f1..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; + uint256 res = a + decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol index 4979f42e..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a - decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol index 5933d066..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol @@ -20,10 +20,10 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); + uint256 res = a * decimals; + return res; } function getarray(address[] memory c, address e) public pure { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol index a4c6c970..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol @@ -20,14 +20,14 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a / decimals; return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol index f7a48737..ecdc98c4 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - assert(true); + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol index a14e05da..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a % decimals; return res; } @@ -30,9 +31,8 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol index 4887a934..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol @@ -21,8 +21,9 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; - return res; + assert(true); } function getarray(address[] memory c, address e) public pure { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol index 7a0c07d0..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol index d73584b8..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol index c226dcfd..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(c[1] == e); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol index c6022ee9..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol index 5f69007a..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol @@ -3,9 +3,8 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(true); + assert(c[0] == e); } function add(int8 a, int8 b) public pure returns (int8) { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol index f7a48737..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - assert(true); + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol index 9e5f617a..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol index 86125329..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol index 9e5f617a..e9466e07 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(c[1] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol index e85ef12c..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol index b32909ed..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol index f9a5de25..ecdc98c4 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol @@ -3,8 +3,9 @@ pragma solidity ^0.8.13; library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } function add(int8 a, int8 b) public pure returns (int8) { @@ -13,9 +14,8 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol index 16f8bc88..e9466e07 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol @@ -3,8 +3,9 @@ pragma solidity ^0.8.13; library Utils { + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(c[1] == e); } function add(int8 a, int8 b) public pure returns (int8) { @@ -13,9 +14,8 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol index 427647a6..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol @@ -7,16 +7,16 @@ library Utils { assert(c[0] == e); } + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + assert(true); } } contract C { function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - assert(true); + a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol index a9342ea1..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol @@ -7,17 +7,17 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a - b; } } contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - assert(true); + return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol index f2136ed3..86125329 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a * b; } } @@ -19,9 +20,8 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol index f69e3360..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a / b; } } @@ -19,9 +20,8 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol index 13319cbe..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a % b; } } @@ -20,9 +21,8 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a + decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol index 3279b41e..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol @@ -13,16 +13,16 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); + address[] memory a = new address[](0); a[0] = msg.sender; return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a - decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol index 86125329..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol index 95cc94e7..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol @@ -13,16 +13,16 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); + address[] memory a = new address[](2); a[0] = msg.sender; return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a * decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol index cc3476f1..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol @@ -14,15 +14,15 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + assert(true); return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol index 4979f42e..9db93f13 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol @@ -14,15 +14,15 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + a[1] = msg.sender; return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol index 5933d066..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol @@ -15,15 +15,15 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - return a; + assert(true); } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; - assert(true); + return res; } function getarray(address[] memory c, address e) public pure { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol index a4c6c970..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol @@ -19,15 +19,15 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; + uint256 a = 0; uint256 res = a ** decimals; return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol index a14e05da..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol @@ -19,8 +19,9 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; + uint256 a = 11; uint256 res = a ** decimals; return res; } @@ -30,9 +31,8 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol index 4887a934..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a + decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol index 7a0c07d0..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a - decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol index d73584b8..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a * decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol index c226dcfd..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a / decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol index e85ef12c..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a - b; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol index c6022ee9..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a % decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol new file mode 100644 index 00000000..5933d066 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol new file mode 100644 index 00000000..a4c6c970 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol new file mode 100644 index 00000000..781e87b1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(false); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol new file mode 100644 index 00000000..7749a0cb --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(c[1] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol new file mode 100644 index 00000000..a14e05da --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` + address[] memory b = this.foo(); + assert(true); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol new file mode 100644 index 00000000..4887a934 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + assert(true); + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol new file mode 100644 index 00000000..7a0c07d0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol new file mode 100644 index 00000000..d73584b8 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol new file mode 100644 index 00000000..c226dcfd --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol index b32909ed..86125329 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a * b; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol new file mode 100644 index 00000000..c6022ee9 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol index f9a5de25..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a / b; } } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol index 16f8bc88..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a % b; } } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol index 427647a6..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); + address[] memory a = new address[](0); + a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_files_1.json/gambit_results.json b/resources/regressions/test_multiple_files_1.json/gambit_results.json index 10adf42f..933ec731 100644 --- a/resources/regressions/test_multiple_files_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_files_1.json/gambit_results.json @@ -196,171 +196,206 @@ "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "51", "name": "mutants/51/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "52", "name": "mutants/52/MultipleContracts/C.sol", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "id": "53", + "name": "mutants/53/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "54", + "name": "mutants/54/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "55", + "name": "mutants/55/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "56", + "name": "mutants/56/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "57", + "name": "mutants/57/MultipleContracts/C.sol", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_files_1.json/mutants.log b/resources/regressions/test_multiple_files_1.json/mutants.log index ea3380b2..0b0e4d7d 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants.log +++ b/resources/regressions/test_multiple_files_1.json/mutants.log @@ -26,27 +26,32 @@ 26,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,/ 27,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,% 28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -29,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -33,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -34,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -35,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -36,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -37,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -38,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -41,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -42,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -43,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -44,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -46,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -47,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -48,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -51,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -52,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +29,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false +30,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 +31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +33,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +34,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +36,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +37,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +38,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 +40,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +43,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +44,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +45,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +48,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +49,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +50,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +51,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 +52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +54,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +55,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +56,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% diff --git a/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol index f7a48737..ecdc98c4 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - assert(true); + return a + b; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol index 9e5f617a..e9466e07 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(c[1] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a + b; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol index 86125329..f7a48737 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + assert(true); } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol index e85ef12c..9e5f617a 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a - b; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol index b32909ed..86125329 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a * b; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol index f9a5de25..e85ef12c 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a / b; } } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol index 16f8bc88..b32909ed 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a % b; } } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol index 427647a6..f9a5de25 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); + address[] memory a = new address[](0); + a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol index a9342ea1..16f8bc88 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol @@ -13,11 +13,11 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` + address[] memory a = new address[](2); a[0] = msg.sender; - assert(true); + return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { diff --git a/resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol index f2136ed3..427647a6 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol @@ -14,14 +14,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + assert(true); return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol index f69e3360..9db93f13 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol @@ -14,14 +14,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + a[1] = msg.sender; return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol index 13319cbe..a9342ea1 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol @@ -15,14 +15,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - return a; + assert(true); } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a + decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol index 3279b41e..f2136ed3 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; + uint256 a = 0; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol index 95cc94e7..f69e3360 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; + uint256 a = 11; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol index cc3476f1..13319cbe 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; + uint256 res = a + decimals; return res; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol index 4979f42e..3279b41e 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a - decimals; return res; } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol index 5933d066..95cc94e7 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol @@ -20,10 +20,10 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); + uint256 res = a * decimals; + return res; } function getarray(address[] memory c, address e) public pure { diff --git a/resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol index a4c6c970..cc3476f1 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol @@ -20,14 +20,14 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a / decimals; return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol index a14e05da..4979f42e 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a % decimals; return res; } @@ -30,9 +31,8 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol index 4887a934..5933d066 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol @@ -21,8 +21,9 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; - return res; + assert(true); } function getarray(address[] memory c, address e) public pure { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c + d; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol index 7a0c07d0..a4c6c970 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol index d73584b8..781e87b1 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c + d; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol index c226dcfd..7749a0cb 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(c[1] == e); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol index c6022ee9..a14e05da 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c + d; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol new file mode 100644 index 00000000..4887a934 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + assert(true); + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol new file mode 100644 index 00000000..7a0c07d0 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol new file mode 100644 index 00000000..d73584b8 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol new file mode 100644 index 00000000..c226dcfd --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol new file mode 100644 index 00000000..c6022ee9 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} From 4d084dad51edcc6e3815c307d014db793e5ae456 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 5 Aug 2023 15:07:02 -0700 Subject: [PATCH 085/200] BIG COMMIT: lots of changes to src and regressions --- benchmarks/Ops/EVR/EVR.sol | 24 + benchmarks/config-jsons/evr.json | 12 + .../all_ops.json/gambit_results.json | 696 ++++++++++++++---- .../regressions/all_ops.json/mutants.log | 111 +-- .../all_ops.json/mutants/27/EDC/EDC.sol | 22 + .../all_ops.json/mutants/28/EDC/EDC.sol | 22 + .../all_ops.json/mutants/29/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/30/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/31/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/32/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/33/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/34/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/35/LOR/LOR.sol | 4 +- .../mutants/36}/LOR/LOR.sol | 6 +- .../mutants/{27 => 37}/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/38/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/39/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/40/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/41/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/42/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/43/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/44/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/45/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/46/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/47/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/48/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/49/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/50/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/51/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/51/ROR/ROR.sol | 65 -- .../all_ops.json/mutants/52/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/53/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/54/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/55/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/56/LVR/LVR.sol | 43 ++ .../mutants/57}/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/58/LVR/LVR.sol | 43 ++ .../all_ops.json/mutants/59/LVR/LVR.sol | 43 ++ .../mutants/60}/LVR/LVR.sol | 6 +- .../mutants/{37 => 61}/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/62/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/63/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/64/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/65/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/66/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/67/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/68/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/69/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/70/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/71/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/72/ROR/ROR.sol | 6 +- .../mutants/{58 => 73}/ROR/ROR.sol | 0 .../mutants/{59 => 74}/ROR/ROR.sol | 0 .../mutants/{60 => 75}/ROR/ROR.sol | 0 .../mutants/{61 => 76}/ROR/ROR.sol | 0 .../mutants/{55 => 77}/ROR/ROR.sol | 6 +- .../mutants/78}/ROR/ROR.sol | 6 +- .../mutants/{53 => 79}/ROR/ROR.sol | 6 +- .../mutants/80}/ROR/ROR.sol | 6 +- .../mutants/{52 => 81}/ROR/ROR.sol | 6 +- .../mutants/{56 => 82}/ROR/ROR.sol | 6 +- .../mutants/{57 => 83}/ROR/ROR.sol | 6 +- .../mutants/{49 => 84}/ROR/ROR.sol | 6 +- .../mutants/{47 => 85}/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/86/ROR/ROR.sol | 65 ++ .../all_ops.json/mutants/87/ROR/ROR.sol | 65 ++ .../mutants/{73 => 88}/UOR/UOR.sol | 0 .../mutants/{74 => 89}/UOR/UOR.sol | 0 .../regressions/aor.json/gambit_results.json | 110 ++- .../regressions/bor.json/gambit_results.json | 15 +- .../regressions/edc.json/gambit_results.json | 25 +- resources/regressions/edc.json/mutants.log | 2 + .../edc.json/mutants/2/Ops/EDC/EDC.sol | 22 + .../edc.json/mutants/3/Ops/EDC/EDC.sol | 22 + .../regressions/evr.json/gambit_results.json | 142 ++++ resources/regressions/evr.json/mutants.log | 14 + .../evr.json/mutants/1/Ops/EVR/EVR.sol | 25 + .../evr.json/mutants/10/Ops/EVR/EVR.sol | 25 + .../evr.json/mutants/11/Ops/EVR/EVR.sol | 25 + .../evr.json/mutants/12/Ops/EVR/EVR.sol | 25 + .../evr.json/mutants/13/Ops/EVR/EVR.sol | 25 + .../evr.json/mutants/14/Ops/EVR/EVR.sol | 25 + .../evr.json/mutants/2/Ops/EVR/EVR.sol | 25 + .../evr.json/mutants/3/Ops/EVR/EVR.sol | 25 + .../evr.json/mutants/4/Ops/EVR/EVR.sol | 25 + .../evr.json/mutants/5/Ops/EVR/EVR.sol | 25 + .../evr.json/mutants/6/Ops/EVR/EVR.sol | 25 + .../evr.json/mutants/7/Ops/EVR/EVR.sol | 25 + .../evr.json/mutants/8/Ops/EVR/EVR.sol | 25 + .../evr.json/mutants/9/Ops/EVR/EVR.sol | 25 + .../regressions/lor.json/gambit_results.json | 45 +- .../regressions/lvr.json/gambit_results.json | 215 +++++- resources/regressions/lvr.json/mutants.log | 33 +- .../lvr.json/mutants/10/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/11/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/12/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/13/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/14/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/15/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/16/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/17/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/18/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/19/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/2/Ops/LVR/LVR.sol | 6 +- .../mutants/20/Ops}/LVR/LVR.sol | 6 +- .../lvr.json/mutants/21/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/22/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/23/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/24/Ops/LVR/LVR.sol | 43 ++ .../lvr.json/mutants/3/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/4/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/5/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/6/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/7/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/8/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/9/Ops/LVR/LVR.sol | 6 +- .../regressions/ror.json/gambit_results.json | 130 +++- .../test_import_map.json/gambit_results.json | 20 +- .../test_log_invalid.json/gambit_results.json | 696 ++++++++++++++---- .../test_log_invalid.json/mutants.log | 111 +-- .../mutants/27/EDC/EDC.sol | 22 + .../mutants/28/EDC/EDC.sol | 22 + .../mutants/29/LOR/LOR.sol | 4 +- .../mutants/30/LOR/LOR.sol | 6 +- .../mutants/31/LOR/LOR.sol | 6 +- .../mutants/32/LOR/LOR.sol | 4 +- .../mutants/33/LOR/LOR.sol | 6 +- .../mutants/34/LOR/LOR.sol | 6 +- .../mutants/35/LOR/LOR.sol | 4 +- .../mutants/{28 => 36}/LOR/LOR.sol | 6 +- .../mutants/37}/LOR/LOR.sol | 6 +- .../mutants/38/LVR/LVR.sol | 6 +- .../mutants/39/LVR/LVR.sol | 6 +- .../mutants/40/LVR/LVR.sol | 6 +- .../mutants/41/LVR/LVR.sol | 6 +- .../mutants/42/LVR/LVR.sol | 6 +- .../mutants/43/LVR/LVR.sol | 6 +- .../mutants/44/LVR/LVR.sol | 6 +- .../mutants/45/LVR/LVR.sol | 6 +- .../mutants/46/LVR/LVR.sol | 6 +- .../mutants/47/LVR/LVR.sol | 43 ++ .../mutants/47/ROR/ROR.sol | 65 -- .../mutants/48/LVR/LVR.sol | 43 ++ .../mutants/48/ROR/ROR.sol | 65 -- .../mutants/49/LVR/LVR.sol | 43 ++ .../mutants/50/LVR/LVR.sol | 43 ++ .../mutants/51/LVR/LVR.sol | 43 ++ .../mutants/51/ROR/ROR.sol | 65 -- .../mutants/52/LVR/LVR.sol | 43 ++ .../mutants/53/LVR/LVR.sol | 43 ++ .../mutants/53/ROR/ROR.sol | 65 -- .../mutants/54/LVR/LVR.sol | 43 ++ .../mutants/54/ROR/ROR.sol | 65 -- .../mutants/55/LVR/LVR.sol | 43 ++ .../mutants/55/ROR/ROR.sol | 65 -- .../mutants/56/LVR/LVR.sol | 43 ++ .../mutants/57/LVR/LVR.sol | 43 ++ .../mutants/58/LVR/LVR.sol | 43 ++ .../mutants/59/LVR/LVR.sol | 43 ++ .../mutants/60/LVR/LVR.sol | 43 ++ .../mutants/61/LVR/LVR.sol | 43 ++ .../mutants/62/ROR/ROR.sol | 6 +- .../mutants/63/ROR/ROR.sol | 6 +- .../mutants/64/ROR/ROR.sol | 6 +- .../mutants/65/ROR/ROR.sol | 6 +- .../mutants/66/ROR/ROR.sol | 6 +- .../mutants/67/ROR/ROR.sol | 6 +- .../mutants/68/ROR/ROR.sol | 6 +- .../mutants/69/ROR/ROR.sol | 6 +- .../mutants/70/ROR/ROR.sol | 6 +- .../mutants/71/ROR/ROR.sol | 6 +- .../mutants/72/ROR/ROR.sol | 6 +- .../mutants/{58 => 73}/ROR/ROR.sol | 0 .../mutants/{59 => 74}/ROR/ROR.sol | 0 .../mutants/{60 => 75}/ROR/ROR.sol | 0 .../mutants/{61 => 76}/ROR/ROR.sol | 0 .../mutants/{49 => 77}/ROR/ROR.sol | 6 +- .../mutants/78}/ROR/ROR.sol | 6 +- .../mutants/79}/ROR/ROR.sol | 6 +- .../mutants/80}/ROR/ROR.sol | 6 +- .../mutants/81/ROR/ROR.sol | 65 ++ .../mutants/{56 => 82}/ROR/ROR.sol | 6 +- .../mutants/{57 => 83}/ROR/ROR.sol | 6 +- .../mutants/84/ROR/ROR.sol | 65 ++ .../mutants/85/ROR/ROR.sol | 65 ++ .../mutants/86/ROR/ROR.sol | 65 ++ .../mutants/87/ROR/ROR.sol | 65 ++ .../mutants/{73 => 88}/UOR/UOR.sol | 0 .../mutants/{74 => 89}/UOR/UOR.sol | 0 .../gambit_results.json | 474 ++++++++---- .../mutants.log | 82 ++- .../mutants/22/MultipleContracts/C.sol | 6 +- .../mutants/23/MultipleContracts/C.sol | 6 +- .../mutants/24/MultipleContracts/C.sol | 4 +- .../mutants/25/MultipleContracts/C.sol | 6 +- .../mutants/26/MultipleContracts/C.sol | 6 +- .../mutants/27/MultipleContracts/C.sol | 6 +- .../mutants/28/MultipleContracts/C.sol | 4 +- .../mutants/29/MultipleContracts/C.sol | 4 +- .../mutants/30/MultipleContracts/C.sol | 4 +- .../mutants/31/MultipleContracts/C.sol | 6 +- .../mutants/32/MultipleContracts/C.sol | 6 +- .../mutants/33/MultipleContracts/C.sol | 4 +- .../mutants/34/MultipleContracts/C.sol | 6 +- .../mutants/35/MultipleContracts/C.sol | 6 +- .../mutants/36/MultipleContracts/C.sol | 4 +- .../mutants/37/MultipleContracts/C.sol | 4 +- .../mutants/38/MultipleContracts/C.sol | 4 +- .../mutants/39/MultipleContracts/C.sol | 6 +- .../mutants/40/MultipleContracts/C.sol | 6 +- .../mutants/41/MultipleContracts/C.sol | 6 +- .../mutants/42/MultipleContracts/C.sol | 6 +- .../mutants/43/MultipleContracts/C.sol | 4 +- .../mutants/44/MultipleContracts/C.sol | 6 +- .../mutants/45/MultipleContracts/C.sol | 6 +- .../mutants/46/MultipleContracts/C.sol | 6 +- .../mutants/47/MultipleContracts/C.sol | 6 +- .../mutants/48/MultipleContracts/C.sol | 4 +- .../mutants/49/MultipleContracts/C.sol | 4 +- .../mutants/50/MultipleContracts/C.sol | 4 +- .../mutants/51/MultipleContracts/C.sol | 6 +- .../mutants/52/MultipleContracts/C.sol | 6 +- .../mutants/53/MultipleContracts/C.sol | 6 +- .../mutants/54/MultipleContracts/C.sol | 6 +- .../mutants/55/MultipleContracts/C.sol | 6 +- .../mutants/56/MultipleContracts/C.sol | 6 +- .../mutants/57/MultipleContracts/C.sol | 6 +- .../mutants/58/MultipleContracts/C.sol | 6 +- .../mutants/59/MultipleContracts/C.sol | 6 +- .../mutants/60/MultipleContracts/C.sol | 4 +- .../mutants/61/MultipleContracts/C.sol | 41 ++ .../mutants/62/MultipleContracts/C.sol | 41 ++ .../mutants/63/MultipleContracts/C.sol | 41 ++ .../mutants/64/MultipleContracts/C.sol | 41 ++ .../gambit_results.json | 474 ++++++++---- .../mutants.log | 82 ++- .../mutants/22/MultipleContracts/C.sol | 6 +- .../mutants/23/MultipleContracts/C.sol | 6 +- .../mutants/24/MultipleContracts/C.sol | 4 +- .../mutants/25/MultipleContracts/C.sol | 6 +- .../mutants/26/MultipleContracts/C.sol | 6 +- .../mutants/27/MultipleContracts/C.sol | 6 +- .../mutants/28/MultipleContracts/C.sol | 4 +- .../mutants/29/MultipleContracts/C.sol | 4 +- .../mutants/30/MultipleContracts/C.sol | 4 +- .../mutants/31/MultipleContracts/C.sol | 6 +- .../mutants/32/MultipleContracts/C.sol | 6 +- .../mutants/33/MultipleContracts/C.sol | 4 +- .../mutants/34/MultipleContracts/C.sol | 6 +- .../mutants/35/MultipleContracts/C.sol | 6 +- .../mutants/36/MultipleContracts/C.sol | 4 +- .../mutants/37/MultipleContracts/C.sol | 4 +- .../mutants/38/MultipleContracts/C.sol | 4 +- .../mutants/39/MultipleContracts/C.sol | 6 +- .../mutants/40/MultipleContracts/C.sol | 6 +- .../mutants/41/MultipleContracts/C.sol | 6 +- .../mutants/42/MultipleContracts/C.sol | 6 +- .../mutants/43/MultipleContracts/C.sol | 4 +- .../mutants/44/MultipleContracts/C.sol | 6 +- .../mutants/45/MultipleContracts/C.sol | 6 +- .../mutants/46/MultipleContracts/C.sol | 6 +- .../mutants/47/MultipleContracts/C.sol | 6 +- .../mutants/48/MultipleContracts/C.sol | 4 +- .../mutants/49/MultipleContracts/C.sol | 4 +- .../mutants/50/MultipleContracts/C.sol | 4 +- .../mutants/51/MultipleContracts/C.sol | 6 +- .../mutants/52/MultipleContracts/C.sol | 6 +- .../mutants/53/MultipleContracts/C.sol | 6 +- .../mutants/54/MultipleContracts/C.sol | 6 +- .../mutants/55/MultipleContracts/C.sol | 6 +- .../mutants/56/MultipleContracts/C.sol | 6 +- .../mutants/57/MultipleContracts/C.sol | 6 +- .../mutants/58/MultipleContracts/C.sol | 6 +- .../mutants/59/MultipleContracts/C.sol | 6 +- .../mutants/60/MultipleContracts/C.sol | 4 +- .../mutants/61/MultipleContracts/C.sol | 41 ++ .../mutants/62/MultipleContracts/C.sol | 41 ++ .../mutants/63/MultipleContracts/C.sol | 41 ++ .../mutants/64/MultipleContracts/C.sol | 41 ++ .../gambit_results.json | 474 ++++++++---- .../mutants.log | 82 ++- .../mutants/22/MultipleContracts/C.sol | 6 +- .../mutants/23/MultipleContracts/C.sol | 6 +- .../mutants/24/MultipleContracts/C.sol | 4 +- .../mutants/25/MultipleContracts/C.sol | 6 +- .../mutants/26/MultipleContracts/C.sol | 6 +- .../mutants/27/MultipleContracts/C.sol | 6 +- .../mutants/28/MultipleContracts/C.sol | 4 +- .../mutants/29/MultipleContracts/C.sol | 4 +- .../mutants/30/MultipleContracts/C.sol | 4 +- .../mutants/31/MultipleContracts/C.sol | 6 +- .../mutants/32/MultipleContracts/C.sol | 6 +- .../mutants/33/MultipleContracts/C.sol | 4 +- .../mutants/34/MultipleContracts/C.sol | 6 +- .../mutants/35/MultipleContracts/C.sol | 6 +- .../mutants/36/MultipleContracts/C.sol | 4 +- .../mutants/37/MultipleContracts/C.sol | 4 +- .../mutants/38/MultipleContracts/C.sol | 4 +- .../mutants/39/MultipleContracts/C.sol | 6 +- .../mutants/40/MultipleContracts/C.sol | 6 +- .../mutants/41/MultipleContracts/C.sol | 6 +- .../mutants/42/MultipleContracts/C.sol | 6 +- .../mutants/43/MultipleContracts/C.sol | 4 +- .../mutants/44/MultipleContracts/C.sol | 6 +- .../mutants/45/MultipleContracts/C.sol | 6 +- .../mutants/46/MultipleContracts/C.sol | 6 +- .../mutants/47/MultipleContracts/C.sol | 6 +- .../mutants/48/MultipleContracts/C.sol | 4 +- .../mutants/49/MultipleContracts/C.sol | 4 +- .../mutants/50/MultipleContracts/C.sol | 4 +- .../mutants/51/MultipleContracts/C.sol | 6 +- .../mutants/52/MultipleContracts/C.sol | 6 +- .../mutants/53/MultipleContracts/C.sol | 6 +- .../mutants/54/MultipleContracts/C.sol | 6 +- .../mutants/55/MultipleContracts/C.sol | 6 +- .../mutants/56/MultipleContracts/C.sol | 6 +- .../mutants/57/MultipleContracts/C.sol | 6 +- .../mutants/58/MultipleContracts/C.sol | 6 +- .../mutants/59/MultipleContracts/C.sol | 6 +- .../mutants/60/MultipleContracts/C.sol | 4 +- .../mutants/61/MultipleContracts/C.sol | 41 ++ .../mutants/62/MultipleContracts/C.sol | 41 ++ .../mutants/63/MultipleContracts/C.sol | 41 ++ .../mutants/64/MultipleContracts/C.sol | 41 ++ .../gambit_results.json | 318 ++++++-- .../mutants.log | 64 +- .../mutants/1/MultipleContracts/C.sol | 6 +- .../mutants/10/MultipleContracts/C.sol | 6 +- .../mutants/11/MultipleContracts/C.sol | 6 +- .../mutants/12/MultipleContracts/C.sol | 6 +- .../mutants/13/MultipleContracts/C.sol | 6 +- .../mutants/14/MultipleContracts/C.sol | 6 +- .../mutants/15/MultipleContracts/C.sol | 6 +- .../mutants/16/MultipleContracts/C.sol | 6 +- .../mutants/17/MultipleContracts/C.sol | 6 +- .../mutants/18/MultipleContracts/C.sol | 6 +- .../mutants/19/MultipleContracts/C.sol | 6 +- .../mutants/2/MultipleContracts/C.sol | 6 +- .../mutants/20/MultipleContracts/C.sol | 6 +- .../mutants/21/MultipleContracts/C.sol | 6 +- .../mutants/22/MultipleContracts/C.sol | 6 +- .../mutants/23/MultipleContracts/C.sol | 6 +- .../mutants/24/MultipleContracts/C.sol | 6 +- .../mutants/25/MultipleContracts/C.sol | 6 +- .../mutants/26/MultipleContracts/C.sol | 6 +- .../mutants/27/MultipleContracts/C.sol | 41 ++ .../mutants/28/MultipleContracts/C.sol | 41 ++ .../mutants/29/MultipleContracts/C.sol | 41 ++ .../mutants/3/MultipleContracts/C.sol | 4 +- .../mutants/30/MultipleContracts/C.sol | 41 ++ .../mutants/31/MultipleContracts/C.sol | 41 ++ .../mutants/32/MultipleContracts/C.sol | 41 ++ .../mutants/33/MultipleContracts/C.sol | 41 ++ .../mutants/34/MultipleContracts/C.sol | 41 ++ .../mutants/35/MultipleContracts/C.sol | 41 ++ .../mutants/36/MultipleContracts/C.sol | 41 ++ .../mutants/37/MultipleContracts/C.sol | 41 ++ .../mutants/38/MultipleContracts/C.sol | 41 ++ .../mutants/4/MultipleContracts/C.sol | 4 +- .../mutants/5/MultipleContracts/C.sol | 6 +- .../mutants/6/MultipleContracts/C.sol | 6 +- .../mutants/7/MultipleContracts/C.sol | 4 +- .../mutants/8/MultipleContracts/C.sol | 4 +- .../mutants/9/MultipleContracts/C.sol | 4 +- .../gambit_results.json | 337 +++++++-- .../test_multiple_files_1.json/mutants.log | 20 +- .../mutants/49/MultipleContracts/C.sol | 6 +- .../mutants/50/MultipleContracts/C.sol | 6 +- .../mutants/51/MultipleContracts/C.sol | 4 +- .../mutants/52/MultipleContracts/C.sol | 6 +- .../mutants/53/MultipleContracts/C.sol | 6 +- .../mutants/54/MultipleContracts/C.sol | 6 +- .../mutants/55/MultipleContracts/C.sol | 4 +- .../mutants/56/MultipleContracts/C.sol | 4 +- .../mutants/57/MultipleContracts/C.sol | 4 +- .../mutants/58/MultipleContracts/C.sol | 41 ++ .../mutants/59/MultipleContracts/C.sol | 41 ++ .../test_no_export.json/gambit_results.json | 140 +++- .../test_num_mutants.json/gambit_results.json | 25 +- .../test_seed.json/gambit_results.json | 50 +- .../regressions/uor.json/gambit_results.json | 10 +- src/cli.rs | 11 +- src/mutant_writer.rs | 3 + src/mutation.rs | 12 +- src/mutator.rs | 8 - src/summary.rs | 166 +++-- 386 files changed, 8286 insertions(+), 2408 deletions(-) create mode 100644 benchmarks/Ops/EVR/EVR.sol create mode 100644 benchmarks/config-jsons/evr.json create mode 100644 resources/regressions/all_ops.json/mutants/27/EDC/EDC.sol create mode 100644 resources/regressions/all_ops.json/mutants/28/EDC/EDC.sol rename resources/regressions/{test_log_invalid.json/mutants/27 => all_ops.json/mutants/36}/LOR/LOR.sol (76%) rename resources/regressions/all_ops.json/mutants/{27 => 37}/LOR/LOR.sol (78%) create mode 100644 resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/49/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/50/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/51/LVR/LVR.sol delete mode 100644 resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/52/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/53/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/54/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/55/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/56/LVR/LVR.sol rename resources/regressions/{test_log_invalid.json/mutants/36 => all_ops.json/mutants/57}/LVR/LVR.sol (89%) create mode 100644 resources/regressions/all_ops.json/mutants/58/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/59/LVR/LVR.sol rename resources/regressions/{test_log_invalid.json/mutants/37 => all_ops.json/mutants/60}/LVR/LVR.sol (89%) rename resources/regressions/all_ops.json/mutants/{37 => 61}/LVR/LVR.sol (89%) rename resources/regressions/all_ops.json/mutants/{58 => 73}/ROR/ROR.sol (100%) rename resources/regressions/all_ops.json/mutants/{59 => 74}/ROR/ROR.sol (100%) rename resources/regressions/all_ops.json/mutants/{60 => 75}/ROR/ROR.sol (100%) rename resources/regressions/all_ops.json/mutants/{61 => 76}/ROR/ROR.sol (100%) rename resources/regressions/all_ops.json/mutants/{55 => 77}/ROR/ROR.sol (94%) rename resources/regressions/{test_log_invalid.json/mutants/50 => all_ops.json/mutants/78}/ROR/ROR.sol (94%) rename resources/regressions/all_ops.json/mutants/{53 => 79}/ROR/ROR.sol (93%) rename resources/regressions/{test_log_invalid.json/mutants/52 => all_ops.json/mutants/80}/ROR/ROR.sol (94%) rename resources/regressions/all_ops.json/mutants/{52 => 81}/ROR/ROR.sol (94%) rename resources/regressions/all_ops.json/mutants/{56 => 82}/ROR/ROR.sol (96%) rename resources/regressions/all_ops.json/mutants/{57 => 83}/ROR/ROR.sol (96%) rename resources/regressions/all_ops.json/mutants/{49 => 84}/ROR/ROR.sol (92%) rename resources/regressions/all_ops.json/mutants/{47 => 85}/ROR/ROR.sol (93%) create mode 100644 resources/regressions/all_ops.json/mutants/86/ROR/ROR.sol create mode 100644 resources/regressions/all_ops.json/mutants/87/ROR/ROR.sol rename resources/regressions/all_ops.json/mutants/{73 => 88}/UOR/UOR.sol (100%) rename resources/regressions/all_ops.json/mutants/{74 => 89}/UOR/UOR.sol (100%) create mode 100644 resources/regressions/edc.json/mutants/2/Ops/EDC/EDC.sol create mode 100644 resources/regressions/edc.json/mutants/3/Ops/EDC/EDC.sol create mode 100644 resources/regressions/evr.json/gambit_results.json create mode 100644 resources/regressions/evr.json/mutants.log create mode 100644 resources/regressions/evr.json/mutants/1/Ops/EVR/EVR.sol create mode 100644 resources/regressions/evr.json/mutants/10/Ops/EVR/EVR.sol create mode 100644 resources/regressions/evr.json/mutants/11/Ops/EVR/EVR.sol create mode 100644 resources/regressions/evr.json/mutants/12/Ops/EVR/EVR.sol create mode 100644 resources/regressions/evr.json/mutants/13/Ops/EVR/EVR.sol create mode 100644 resources/regressions/evr.json/mutants/14/Ops/EVR/EVR.sol create mode 100644 resources/regressions/evr.json/mutants/2/Ops/EVR/EVR.sol create mode 100644 resources/regressions/evr.json/mutants/3/Ops/EVR/EVR.sol create mode 100644 resources/regressions/evr.json/mutants/4/Ops/EVR/EVR.sol create mode 100644 resources/regressions/evr.json/mutants/5/Ops/EVR/EVR.sol create mode 100644 resources/regressions/evr.json/mutants/6/Ops/EVR/EVR.sol create mode 100644 resources/regressions/evr.json/mutants/7/Ops/EVR/EVR.sol create mode 100644 resources/regressions/evr.json/mutants/8/Ops/EVR/EVR.sol create mode 100644 resources/regressions/evr.json/mutants/9/Ops/EVR/EVR.sol create mode 100644 resources/regressions/lvr.json/mutants/12/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/13/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/14/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/15/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/16/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/17/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/18/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/19/Ops/LVR/LVR.sol rename resources/regressions/{all_ops.json/mutants/36 => lvr.json/mutants/20/Ops}/LVR/LVR.sol (89%) create mode 100644 resources/regressions/lvr.json/mutants/21/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/22/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/23/Ops/LVR/LVR.sol create mode 100644 resources/regressions/lvr.json/mutants/24/Ops/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/27/EDC/EDC.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/28/EDC/EDC.sol rename resources/regressions/test_log_invalid.json/mutants/{28 => 36}/LOR/LOR.sol (76%) rename resources/regressions/{all_ops.json/mutants/28 => test_log_invalid.json/mutants/37}/LOR/LOR.sol (78%) create mode 100644 resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/49/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/50/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/51/LVR/LVR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/52/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/53/LVR/LVR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/54/LVR/LVR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/55/LVR/LVR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/56/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/57/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/58/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/59/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/60/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/61/LVR/LVR.sol rename resources/regressions/test_log_invalid.json/mutants/{58 => 73}/ROR/ROR.sol (100%) rename resources/regressions/test_log_invalid.json/mutants/{59 => 74}/ROR/ROR.sol (100%) rename resources/regressions/test_log_invalid.json/mutants/{60 => 75}/ROR/ROR.sol (100%) rename resources/regressions/test_log_invalid.json/mutants/{61 => 76}/ROR/ROR.sol (100%) rename resources/regressions/test_log_invalid.json/mutants/{49 => 77}/ROR/ROR.sol (94%) rename resources/regressions/{all_ops.json/mutants/50 => test_log_invalid.json/mutants/78}/ROR/ROR.sol (94%) rename resources/regressions/{all_ops.json/mutants/54 => test_log_invalid.json/mutants/79}/ROR/ROR.sol (93%) rename resources/regressions/{all_ops.json/mutants/48 => test_log_invalid.json/mutants/80}/ROR/ROR.sol (93%) create mode 100644 resources/regressions/test_log_invalid.json/mutants/81/ROR/ROR.sol rename resources/regressions/test_log_invalid.json/mutants/{56 => 82}/ROR/ROR.sol (96%) rename resources/regressions/test_log_invalid.json/mutants/{57 => 83}/ROR/ROR.sol (96%) create mode 100644 resources/regressions/test_log_invalid.json/mutants/84/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/85/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/86/ROR/ROR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/87/ROR/ROR.sol rename resources/regressions/test_log_invalid.json/mutants/{73 => 88}/UOR/UOR.sol (100%) rename resources/regressions/test_log_invalid.json/mutants/{74 => 89}/UOR/UOR.sol (100%) create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/61/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/62/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/63/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/64/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/61/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/62/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/63/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/64/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/61/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/62/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/63/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/64/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/27/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/28/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/29/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/30/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/31/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/32/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/33/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/34/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/35/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/36/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/37/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/38/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/58/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/59/MultipleContracts/C.sol diff --git a/benchmarks/Ops/EVR/EVR.sol b/benchmarks/Ops/EVR/EVR.sol new file mode 100644 index 00000000..c3ded1b8 --- /dev/null +++ b/benchmarks/Ops/EVR/EVR.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = a < b; + while (c) { + b = b - a; + c = a < b; + } + return a - b; + } +} diff --git a/benchmarks/config-jsons/evr.json b/benchmarks/config-jsons/evr.json new file mode 100644 index 00000000..07c39609 --- /dev/null +++ b/benchmarks/config-jsons/evr.json @@ -0,0 +1,12 @@ +[ + { + "filename": "../Ops/EVR/EVR.sol", + "import_paths": [ + ".." + ], + "mutations": [], + "fallback_mutations": [ + "evr" + ] + } +] \ No newline at end of file diff --git a/resources/regressions/all_ops.json/gambit_results.json b/resources/regressions/all_ops.json/gambit_results.json index 1c5f0d77..6ab76978 100644 --- a/resources/regressions/all_ops.json/gambit_results.json +++ b/resources/regressions/all_ops.json/gambit_results.json @@ -4,517 +4,889 @@ "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "9", "name": "mutants/9/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "10", "name": "mutants/10/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "**" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "18", "name": "mutants/18/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "19", "name": "mutants/19/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "20", "name": "mutants/20/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "21", "name": "mutants/21/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "22", "name": "mutants/22/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", "id": "23", "name": "mutants/23/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" + "op": "BOR", + "orig": "|", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "repl": "&" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", "id": "24", "name": "mutants/24/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" + "op": "BOR", + "orig": "&", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "repl": "|" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", "id": "25", "name": "mutants/25/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" + "op": "BOR", + "orig": "^", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "repl": "&" }, { "description": "ElimDelegateCall", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", "id": "26", "name": "mutants/26/EDC/EDC.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol" + "op": "EDC", + "orig": "delegatecall", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + "repl": "call" }, { - "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(true, \"Delegatecall failed\");\n }\n }\n", "id": "27", - "name": "mutants/27/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "name": "mutants/27/EDC/EDC.sol", + "op": "EVR", + "orig": "success", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + "repl": "true" }, { - "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(false, \"Delegatecall failed\");\n }\n }\n", "id": "28", - "name": "mutants/28/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "name": "mutants/28/EDC/EDC.sol", + "op": "EVR", + "orig": "success", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + "repl": "false" }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", "id": "29", "name": "mutants/29/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a && b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "a" }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", "id": "30", "name": "mutants/30/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a && b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "b" }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", "id": "31", "name": "mutants/31/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a && b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "false" }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "32", "name": "mutants/32/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a || b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "a" }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "33", "name": "mutants/33/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a || b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "b" }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "34", "name": "mutants/34/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a || b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "true" }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", "id": "35", "name": "mutants/35/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "(x < y) || (a != (x >= y))", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "x < y" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", "id": "36", - "name": "mutants/36/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "name": "mutants/36/LOR/LOR.sol", + "op": "LOR", + "orig": "(x < y) || (a != (x >= y))", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "a != (x >= y)" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", "id": "37", - "name": "mutants/37/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "name": "mutants/37/LOR/LOR.sol", + "op": "LOR", + "orig": "(x < y) || (a != (x >= y))", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "true" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", "id": "38", "name": "mutants/38/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 0;\n }\n \n // Expect 2 mutant: 0, 2\n", "id": "39", "name": "mutants/39/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 1;\n }\n \n // Expect 2 mutant: 0, 2\n", "id": "40", "name": "mutants/40/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", "id": "41", "name": "mutants/41/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", "id": "42", "name": "mutants/42/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "2" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 0;\n }\n \n // Expect 2 mutants: 0, 1\n", "id": "43", "name": "mutants/43/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "EVR", + "orig": "one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 1;\n }\n \n // Expect 2 mutants: 0, 1\n", "id": "44", "name": "mutants/44/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "EVR", + "orig": "one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "45", "name": "mutants/45/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "-1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", "id": "46", "name": "mutants/46/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "-1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", + "id": "47", + "name": "mutants/47/LVR/LVR.sol", + "op": "LVR", + "orig": "-1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-2" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 0\n", + "id": "48", + "name": "mutants/48/LVR/LVR.sol", + "op": "EVR", + "orig": "neg_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 0\n", + "id": "49", + "name": "mutants/49/LVR/LVR.sol", + "op": "EVR", + "orig": "neg_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 0\n", + "id": "50", + "name": "mutants/50/LVR/LVR.sol", + "op": "EVR", + "orig": "neg_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", + "id": "51", + "name": "mutants/51/LVR/LVR.sol", + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", + "id": "52", + "name": "mutants/52/LVR/LVR.sol", + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", + "id": "53", + "name": "mutants/53/LVR/LVR.sol", + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "2" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 1\n", + "id": "54", + "name": "mutants/54/LVR/LVR.sol", + "op": "EVR", + "orig": "pos_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 1\n", + "id": "55", + "name": "mutants/55/LVR/LVR.sol", + "op": "EVR", + "orig": "pos_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 1\n", + "id": "56", + "name": "mutants/56/LVR/LVR.sol", + "op": "EVR", + "orig": "pos_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", + "id": "57", + "name": "mutants/57/LVR/LVR.sol", + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", + "id": "58", + "name": "mutants/58/LVR/LVR.sol", + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return -1;\n }\n }\n", + "id": "59", + "name": "mutants/59/LVR/LVR.sol", + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 0;\n }\n }\n", + "id": "60", + "name": "mutants/60/LVR/LVR.sol", + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 1;\n }\n }\n", + "id": "61", + "name": "mutants/61/LVR/LVR.sol", + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "47", - "name": "mutants/47/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "62", + "name": "mutants/62/ROR/ROR.sol", + "op": "ROR", + "orig": "<", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "48", - "name": "mutants/48/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "63", + "name": "mutants/63/ROR/ROR.sol", + "op": "ROR", + "orig": "<", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "!=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "49", - "name": "mutants/49/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "64", + "name": "mutants/64/ROR/ROR.sol", + "op": "ROR", + "orig": "x < y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "false" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "50", - "name": "mutants/50/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "65", + "name": "mutants/65/ROR/ROR.sol", + "op": "ROR", + "orig": "<=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "51", - "name": "mutants/51/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "66", + "name": "mutants/66/ROR/ROR.sol", + "op": "ROR", + "orig": "<=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "==" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "52", - "name": "mutants/52/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "67", + "name": "mutants/67/ROR/ROR.sol", + "op": "ROR", + "orig": "x <= y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "53", - "name": "mutants/53/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "68", + "name": "mutants/68/ROR/ROR.sol", + "op": "ROR", + "orig": ">", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "54", - "name": "mutants/54/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "69", + "name": "mutants/69/ROR/ROR.sol", + "op": "ROR", + "orig": ">", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "!=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "55", - "name": "mutants/55/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "70", + "name": "mutants/70/ROR/ROR.sol", + "op": "ROR", + "orig": "x > y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "false" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "56", - "name": "mutants/56/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "71", + "name": "mutants/71/ROR/ROR.sol", + "op": "ROR", + "orig": ">=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "57", - "name": "mutants/57/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "72", + "name": "mutants/72/ROR/ROR.sol", + "op": "ROR", + "orig": ">=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "==" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "58", - "name": "mutants/58/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "73", + "name": "mutants/73/ROR/ROR.sol", + "op": "ROR", + "orig": "x >= y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "59", - "name": "mutants/59/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "74", + "name": "mutants/74/ROR/ROR.sol", + "op": "ROR", + "orig": "==", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "60", - "name": "mutants/60/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "75", + "name": "mutants/75/ROR/ROR.sol", + "op": "ROR", + "orig": "==", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "61", - "name": "mutants/61/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "76", + "name": "mutants/76/ROR/ROR.sol", + "op": "ROR", + "orig": "x == y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "false" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", - "id": "62", - "name": "mutants/62/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "77", + "name": "mutants/77/ROR/ROR.sol", + "op": "ROR", + "orig": "x == y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "false" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "63", - "name": "mutants/63/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "78", + "name": "mutants/78/ROR/ROR.sol", + "op": "ROR", + "orig": "!=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "64", - "name": "mutants/64/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "79", + "name": "mutants/79/ROR/ROR.sol", + "op": "ROR", + "orig": "!=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "65", - "name": "mutants/65/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "80", + "name": "mutants/80/ROR/ROR.sol", + "op": "ROR", + "orig": "x != y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", - "id": "66", - "name": "mutants/66/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "81", + "name": "mutants/81/ROR/ROR.sol", + "op": "ROR", + "orig": "x != y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "67", - "name": "mutants/67/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "82", + "name": "mutants/82/ROR/ROR.sol", + "op": "ROR", + "orig": ">=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "68", - "name": "mutants/68/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "83", + "name": "mutants/83/ROR/ROR.sol", + "op": "ROR", + "orig": ">=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "==" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "69", - "name": "mutants/69/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "84", + "name": "mutants/84/ROR/ROR.sol", + "op": "ROR", + "orig": "(x + y) >= z", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", - "id": "70", - "name": "mutants/70/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "85", + "name": "mutants/85/ROR/ROR.sol", + "op": "ROR", + "orig": "!=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", - "id": "71", - "name": "mutants/71/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "86", + "name": "mutants/86/ROR/ROR.sol", + "op": "ROR", + "orig": "!=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", - "id": "72", - "name": "mutants/72/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "87", + "name": "mutants/87/ROR/ROR.sol", + "op": "ROR", + "orig": "(x + y) != z", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", - "id": "73", - "name": "mutants/73/UOR/UOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" + "id": "88", + "name": "mutants/88/UOR/UOR.sol", + "op": "UOR", + "orig": "~", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "repl": " - " }, { "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", - "id": "74", - "name": "mutants/74/UOR/UOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" + "id": "89", + "name": "mutants/89/UOR/UOR.sol", + "op": "UOR", + "orig": "~", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "repl": " ~ " } ] \ No newline at end of file diff --git a/resources/regressions/all_ops.json/mutants.log b/resources/regressions/all_ops.json/mutants.log index 12711d6c..874f7998 100644 --- a/resources/regressions/all_ops.json/mutants.log +++ b/resources/regressions/all_ops.json/mutants.log @@ -24,51 +24,66 @@ 24,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,15:9,&,| 25,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,21:9,^,& 26,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,15:29,delegatecall,call -27,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,a -28,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,b -29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,false -30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,a -31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,b -32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,true -33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),x < y -34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),a != (x >= y) -35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),true -36,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,14:15,0,1 -37,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,0 -38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 -39,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 -40,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 -41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,-2 -42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 -43,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 -44,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 -45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,-1 -46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,1 -47,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,<= -48,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,!= -49,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:7,x < y,false -50,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,< -51,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,== -52,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:7,x <= y,true -53,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,>= -54,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,!= -55,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:7,x > y,false -56,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,> -57,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,== -58,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:7,x >= y,true -59,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,<= -60,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,>= -61,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:7,x == y,false -62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false -63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< -64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> -65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true -66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true -67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> -68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== -69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true -70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< -71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> -72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true -73,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,13:7,~, - -74,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,18:7,~, ~ +27,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,18:8,success,true +28,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,18:8,success,false +29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,a +30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,b +31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,false +32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,a +33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,b +34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,true +35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),x < y +36,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),a != (x >= y) +37,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),true +38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,14:15,0,1 +39,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:7,zero,0 +40,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:7,zero,1 +41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,0 +42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 +43,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:7,one,0 +44,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:7,one,1 +45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 +46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 +47,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,-2 +48,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,-1 +49,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,0 +50,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,1 +51,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 +52,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 +53,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 +54,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,-1 +55,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,0 +56,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,1 +57,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,-1 +58,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,1 +59,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,-1 +60,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,0 +61,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,1 +62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,<= +63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,!= +64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:7,x < y,false +65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,< +66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,== +67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:7,x <= y,true +68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,>= +69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,!= +70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:7,x > y,false +71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,> +72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,== +73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:7,x >= y,true +74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,<= +75,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,>= +76,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:7,x == y,false +77,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false +78,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< +79,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> +80,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true +81,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true +82,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> +83,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== +84,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true +85,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< +86,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> +87,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true +88,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,13:7,~, - +89,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,18:7,~, ~ diff --git a/resources/regressions/all_ops.json/mutants/27/EDC/EDC.sol b/resources/regressions/all_ops.json/mutants/27/EDC/EDC.sol new file mode 100644 index 00000000..c078b6f6 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/27/EDC/EDC.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.13; + +contract Helper { + function setVars(uint _num) public payable {} +} + +contract EDC { + uint public num; + address public sender; + uint public value; + bool public delegateSuccessful; + bytes public myData; + + function setVars(address _contract) public payable { + (bool success, ) = _contract.delegatecall( + abi.encodeWithSignature("setVars(uint256)", 1) + /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, "Delegatecall failed");` + ); + require(true, "Delegatecall failed"); + } +} diff --git a/resources/regressions/all_ops.json/mutants/28/EDC/EDC.sol b/resources/regressions/all_ops.json/mutants/28/EDC/EDC.sol new file mode 100644 index 00000000..eed317db --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/28/EDC/EDC.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.13; + +contract Helper { + function setVars(uint _num) public payable {} +} + +contract EDC { + uint public num; + address public sender; + uint public value; + bool public delegateSuccessful; + bytes public myData; + + function setVars(address _contract) public payable { + (bool success, ) = _contract.delegatecall( + abi.encodeWithSignature("setVars(uint256)", 1) + /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, "Delegatecall failed");` + ); + require(false, "Delegatecall failed"); + } +} diff --git a/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol index 0e5805db..67f4f5df 100644 --- a/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` + /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return false; + return a; } // Expect three mutants: a, b, true diff --git a/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol index 06fbf70c..d63286bb 100644 --- a/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a && b; + return b; } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a; + return a || b; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol index 620f1630..0e5805db 100644 --- a/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a && b; + return false; } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return b; + return a || b; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol index 29afb982..06fbf70c 100644 --- a/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol @@ -10,9 +10,9 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` + /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return true; + return a; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol index eb339ae7..620f1630 100644 --- a/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol @@ -10,13 +10,13 @@ contract LOR { } // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a || b; + return b; } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return x < y; + return (x < y) || (a != (x >= y)); } } diff --git a/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol index fb49fdaf..29afb982 100644 --- a/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol @@ -10,13 +10,13 @@ contract LOR { } // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a || b; + return true; } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return a != (x >= y); + return (x < y) || (a != (x >= y)); } } diff --git a/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol index 0d9c28b2..eb339ae7 100644 --- a/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol @@ -15,8 +15,8 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return true; + return x < y; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol similarity index 76% rename from resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol rename to resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol index 67f4f5df..fb49fdaf 100644 --- a/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a; + return a && b; } // Expect three mutants: a, b, true @@ -16,7 +15,8 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return (x < y) || (a != (x >= y)); + return a != (x >= y); } } diff --git a/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol similarity index 78% rename from resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol rename to resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol index 67f4f5df..0d9c28b2 100644 --- a/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a; + return a && b; } // Expect three mutants: a, b, true @@ -16,7 +15,8 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return (x < y) || (a != (x >= y)); + return true; } } diff --git a/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol index d18c6c48..e06271e2 100644 --- a/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol @@ -11,15 +11,15 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; + uint256 zero = 1; return zero; } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 2; + uint256 one = 1; return one; } diff --git a/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol index 173dc540..135e11e3 100644 --- a/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol @@ -12,8 +12,9 @@ contract LVR { // Expect 1 mutant: 1 function unsigned_zero() public pure returns (uint256) { + /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;` uint256 zero = 0; - return zero; + return 0; } // Expect 2 mutant: 0, 2 @@ -23,9 +24,8 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol index 72ffaedf..0d782e4a 100644 --- a/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol @@ -12,8 +12,9 @@ contract LVR { // Expect 1 mutant: 1 function unsigned_zero() public pure returns (uint256) { + /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;` uint256 zero = 0; - return zero; + return 1; } // Expect 2 mutant: 0, 2 @@ -23,9 +24,8 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 1; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol index 1e24417f..f2cb8295 100644 --- a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 0; return one; } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -2; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol index e088a4e3..d18c6c48 100644 --- a/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol @@ -17,8 +17,9 @@ contract LVR { } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 2; return one; } @@ -29,9 +30,8 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 0; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol index 2407079e..0d9d6236 100644 --- a/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol @@ -18,8 +18,9 @@ contract LVR { // Expect 2 mutant: 0, 2 function unsigned_one() public pure returns (uint256) { + /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;` uint256 one = 1; - return one; + return 0; } // Expect 2 mutants: 0, 1 @@ -29,9 +30,8 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = -1; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol index a5082f3b..091e9f64 100644 --- a/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol @@ -18,8 +18,9 @@ contract LVR { // Expect 2 mutant: 0, 2 function unsigned_one() public pure returns (uint256) { + /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;` uint256 one = 1; - return one; + return 1; } // Expect 2 mutants: 0, 1 @@ -29,9 +30,8 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 2; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol index 22af4185..173dc540 100644 --- a/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol @@ -23,8 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 0; return neg_one; } @@ -35,9 +36,8 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = -1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol index e241973d..72ffaedf 100644 --- a/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol @@ -23,8 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 1; return neg_one; } @@ -35,9 +36,8 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol new file mode 100644 index 00000000..1e24417f --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -2; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol new file mode 100644 index 00000000..96e97ffa --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;` + int256 neg_one = -1; + return -1; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/49/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/49/LVR/LVR.sol new file mode 100644 index 00000000..2d831118 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/49/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;` + int256 neg_one = -1; + return 0; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/50/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/50/LVR/LVR.sol new file mode 100644 index 00000000..cd826db1 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/50/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;` + int256 neg_one = -1; + return 1; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/51/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/51/LVR/LVR.sol new file mode 100644 index 00000000..e088a4e3 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/51/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 0; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol deleted file mode 100644 index 18e38f34..00000000 --- a/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) != z; - } -} diff --git a/resources/regressions/all_ops.json/mutants/52/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/52/LVR/LVR.sol new file mode 100644 index 00000000..2407079e --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/52/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = -1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/53/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/53/LVR/LVR.sol new file mode 100644 index 00000000..a5082f3b --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/53/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 2; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/54/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/54/LVR/LVR.sol new file mode 100644 index 00000000..cb3769d5 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/54/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;` + int256 pos_one = 1; + return -1; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/55/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/55/LVR/LVR.sol new file mode 100644 index 00000000..98a170bc --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/55/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;` + int256 pos_one = 1; + return 0; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/56/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/56/LVR/LVR.sol new file mode 100644 index 00000000..31602f01 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/56/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;` + int256 pos_one = 1; + return 1; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/57/LVR/LVR.sol similarity index 89% rename from resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol rename to resources/regressions/all_ops.json/mutants/57/LVR/LVR.sol index e06271e2..22af4185 100644 --- a/resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/57/LVR/LVR.sol @@ -11,9 +11,8 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 1; + uint256 zero = 0; return zero; } @@ -36,8 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = -1; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/58/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/58/LVR/LVR.sol new file mode 100644 index 00000000..e241973d --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/58/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` + function signed_zero() public pure returns (int256) { + int256 zero = 1; + return zero; + } +} diff --git a/resources/regressions/all_ops.json/mutants/59/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/59/LVR/LVR.sol new file mode 100644 index 00000000..bae6e772 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/59/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;` + int256 zero = 0; + return -1; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/60/LVR/LVR.sol similarity index 89% rename from resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol rename to resources/regressions/all_ops.json/mutants/60/LVR/LVR.sol index f2cb8295..728fbb96 100644 --- a/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/60/LVR/LVR.sol @@ -17,9 +17,8 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 0; + uint256 one = 1; return one; } @@ -37,7 +36,8 @@ contract LVR { // Expect 2 mutants: -1, 1 function signed_zero() public pure returns (int256) { + /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;` int256 zero = 0; - return zero; + return 0; } } diff --git a/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/61/LVR/LVR.sol similarity index 89% rename from resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol rename to resources/regressions/all_ops.json/mutants/61/LVR/LVR.sol index f2cb8295..a4882479 100644 --- a/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/61/LVR/LVR.sol @@ -17,9 +17,8 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 0; + uint256 one = 1; return one; } @@ -37,7 +36,8 @@ contract LVR { // Expect 2 mutants: -1, 1 function signed_zero() public pure returns (int256) { + /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;` int256 zero = 0; - return zero; + return 1; } } diff --git a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol index ab40e6c9..dec84f24 100644 --- a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x <= y; } // Expect 3 mutants: x < y, x == y, true @@ -30,9 +31,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x == y; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol index f42e7b7e..0c05265c 100644 --- a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x != y; } // Expect 3 mutants: x < y, x == y, true @@ -35,9 +36,8 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol index e5f50322..6141947b 100644 --- a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return false; } // Expect 3 mutants: x < y, x == y, true @@ -35,9 +36,8 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol index 83684484..9f8ccd04 100644 --- a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol @@ -10,8 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x < y; } // Expect 3 mutants: x >= y, x != y, false @@ -35,9 +36,8 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol index 3ae92133..18e38f34 100644 --- a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol @@ -10,8 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x == y; } // Expect 3 mutants: x >= y, x != y, false @@ -40,9 +41,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol index bdeac3af..55dd7c79 100644 --- a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol @@ -10,8 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return true; } // Expect 3 mutants: x >= y, x != y, false @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol index 430379f6..52949d03 100644 --- a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol @@ -15,8 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x >= y; } // Expect 3 mutants: x > y, x == y, true @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) == z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol index 3d67c155..a3e16320 100644 --- a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol @@ -15,8 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x != y; } // Expect 3 mutants: x > y, x == y, true @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return true; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol index 13612614..a9024427 100644 --- a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol @@ -15,8 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return false; } // Expect 3 mutants: x > y, x == y, true @@ -58,8 +59,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) < z; + return (x + y) != z; } } diff --git a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol index dd0c83ca..337c9a92 100644 --- a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol @@ -20,8 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x > y; } // Expect 3 mutants: x >= y, x <= y, false @@ -58,8 +59,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) != z; } } diff --git a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol index 84889114..7c02b73b 100644 --- a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol @@ -20,8 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x == y; } // Expect 3 mutants: x >= y, x <= y, false @@ -58,8 +59,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return true; + return (x + y) != z; } } diff --git a/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol similarity index 100% rename from resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol diff --git a/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol similarity index 100% rename from resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol diff --git a/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/75/ROR/ROR.sol similarity index 100% rename from resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/75/ROR/ROR.sol diff --git a/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/76/ROR/ROR.sol similarity index 100% rename from resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/76/ROR/ROR.sol diff --git a/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/77/ROR/ROR.sol similarity index 94% rename from resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/77/ROR/ROR.sol index a9024427..ab40e6c9 100644 --- a/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/77/ROR/ROR.sol @@ -15,9 +15,8 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x > y; } // Expect 3 mutants: x > y, x == y, true @@ -31,8 +30,9 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; + return false; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/78/ROR/ROR.sol similarity index 94% rename from resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/78/ROR/ROR.sol index 9f8ccd04..f42e7b7e 100644 --- a/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/78/ROR/ROR.sol @@ -10,9 +10,8 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false @@ -36,8 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x < y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/79/ROR/ROR.sol similarity index 93% rename from resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/79/ROR/ROR.sol index 52949d03..e5f50322 100644 --- a/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/79/ROR/ROR.sol @@ -15,9 +15,8 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x > y; } // Expect 3 mutants: x > y, x == y, true @@ -36,8 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x > y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/80/ROR/ROR.sol similarity index 94% rename from resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/80/ROR/ROR.sol index 55dd7c79..83684484 100644 --- a/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/80/ROR/ROR.sol @@ -10,9 +10,8 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false @@ -36,8 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return true; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/81/ROR/ROR.sol similarity index 94% rename from resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/81/ROR/ROR.sol index 55dd7c79..3ae92133 100644 --- a/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/81/ROR/ROR.sol @@ -10,9 +10,8 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false @@ -41,8 +40,9 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/82/ROR/ROR.sol similarity index 96% rename from resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/82/ROR/ROR.sol index 337c9a92..bdeac3af 100644 --- a/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/82/ROR/ROR.sol @@ -20,9 +20,8 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) > z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/83/ROR/ROR.sol similarity index 96% rename from resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/83/ROR/ROR.sol index 7c02b73b..430379f6 100644 --- a/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/83/ROR/ROR.sol @@ -20,9 +20,8 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) == z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/84/ROR/ROR.sol similarity index 92% rename from resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/84/ROR/ROR.sol index 6141947b..3d67c155 100644 --- a/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/84/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/85/ROR/ROR.sol similarity index 93% rename from resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/85/ROR/ROR.sol index dec84f24..13612614 100644 --- a/resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/85/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) < z; } } diff --git a/resources/regressions/all_ops.json/mutants/86/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/86/ROR/ROR.sol new file mode 100644 index 00000000..dd0c83ca --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/86/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` + ) public pure returns (bool) { + return (x + y) > z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/87/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/87/ROR/ROR.sol new file mode 100644 index 00000000..84889114 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/87/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` + ) public pure returns (bool) { + return true; + } +} diff --git a/resources/regressions/all_ops.json/mutants/73/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/88/UOR/UOR.sol similarity index 100% rename from resources/regressions/all_ops.json/mutants/73/UOR/UOR.sol rename to resources/regressions/all_ops.json/mutants/88/UOR/UOR.sol diff --git a/resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/89/UOR/UOR.sol similarity index 100% rename from resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol rename to resources/regressions/all_ops.json/mutants/89/UOR/UOR.sol diff --git a/resources/regressions/aor.json/gambit_results.json b/resources/regressions/aor.json/gambit_results.json index 613640ea..5f5305ea 100644 --- a/resources/regressions/aor.json/gambit_results.json +++ b/resources/regressions/aor.json/gambit_results.json @@ -4,153 +4,219 @@ "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "9", "name": "mutants/9/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "10", "name": "mutants/10/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "**" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "18", "name": "mutants/18/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "19", "name": "mutants/19/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "20", "name": "mutants/20/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "21", "name": "mutants/21/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "22", "name": "mutants/22/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" } ] \ No newline at end of file diff --git a/resources/regressions/bor.json/gambit_results.json b/resources/regressions/bor.json/gambit_results.json index 681c8943..355b3a0e 100644 --- a/resources/regressions/bor.json/gambit_results.json +++ b/resources/regressions/bor.json/gambit_results.json @@ -4,20 +4,29 @@ "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", "id": "1", "name": "mutants/1/Ops/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" + "op": "BOR", + "orig": "|", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "repl": "&" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", "id": "2", "name": "mutants/2/Ops/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" + "op": "BOR", + "orig": "&", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "repl": "|" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", "id": "3", "name": "mutants/3/Ops/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" + "op": "BOR", + "orig": "^", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "repl": "&" } ] \ No newline at end of file diff --git a/resources/regressions/edc.json/gambit_results.json b/resources/regressions/edc.json/gambit_results.json index 25f554f5..5f4e24ca 100644 --- a/resources/regressions/edc.json/gambit_results.json +++ b/resources/regressions/edc.json/gambit_results.json @@ -4,6 +4,29 @@ "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", "id": "1", "name": "mutants/1/Ops/EDC/EDC.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol" + "op": "EDC", + "orig": "delegatecall", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + "repl": "call" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(true, \"Delegatecall failed\");\n }\n }\n", + "id": "2", + "name": "mutants/2/Ops/EDC/EDC.sol", + "op": "EVR", + "orig": "success", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + "repl": "true" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(false, \"Delegatecall failed\");\n }\n }\n", + "id": "3", + "name": "mutants/3/Ops/EDC/EDC.sol", + "op": "EVR", + "orig": "success", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + "repl": "false" } ] \ No newline at end of file diff --git a/resources/regressions/edc.json/mutants.log b/resources/regressions/edc.json/mutants.log index cd87b38e..7ee729a1 100644 --- a/resources/regressions/edc.json/mutants.log +++ b/resources/regressions/edc.json/mutants.log @@ -1 +1,3 @@ 1,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,15:29,delegatecall,call +2,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,18:8,success,true +3,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,18:8,success,false diff --git a/resources/regressions/edc.json/mutants/2/Ops/EDC/EDC.sol b/resources/regressions/edc.json/mutants/2/Ops/EDC/EDC.sol new file mode 100644 index 00000000..c078b6f6 --- /dev/null +++ b/resources/regressions/edc.json/mutants/2/Ops/EDC/EDC.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.13; + +contract Helper { + function setVars(uint _num) public payable {} +} + +contract EDC { + uint public num; + address public sender; + uint public value; + bool public delegateSuccessful; + bytes public myData; + + function setVars(address _contract) public payable { + (bool success, ) = _contract.delegatecall( + abi.encodeWithSignature("setVars(uint256)", 1) + /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, "Delegatecall failed");` + ); + require(true, "Delegatecall failed"); + } +} diff --git a/resources/regressions/edc.json/mutants/3/Ops/EDC/EDC.sol b/resources/regressions/edc.json/mutants/3/Ops/EDC/EDC.sol new file mode 100644 index 00000000..eed317db --- /dev/null +++ b/resources/regressions/edc.json/mutants/3/Ops/EDC/EDC.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.13; + +contract Helper { + function setVars(uint _num) public payable {} +} + +contract EDC { + uint public num; + address public sender; + uint public value; + bool public delegateSuccessful; + bytes public myData; + + function setVars(address _contract) public payable { + (bool success, ) = _contract.delegatecall( + abi.encodeWithSignature("setVars(uint256)", 1) + /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, "Delegatecall failed");` + ); + require(false, "Delegatecall failed"); + } +} diff --git a/resources/regressions/evr.json/gambit_results.json b/resources/regressions/evr.json/gambit_results.json new file mode 100644 index 00000000..a66a801a --- /dev/null +++ b/resources/regressions/evr.json/gambit_results.json @@ -0,0 +1,142 @@ +[ + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -4,8 +4,9 @@\n \n // This contract provides test functions for relational operator replacement (ROR)\n contract EVR {\n+ /// ExpressionValueReplacement(`a + b` |==> `0`) of: `return a + b;`\n function add(uint256 a, uint256 b) public pure returns (uint256) {\n- return a + b;\n+ return 0;\n }\n \n function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) {\n", + "id": "1", + "name": "mutants/1/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "a + b", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "0" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -4,8 +4,9 @@\n \n // This contract provides test functions for relational operator replacement (ROR)\n contract EVR {\n+ /// ExpressionValueReplacement(`a + b` |==> `1`) of: `return a + b;`\n function add(uint256 a, uint256 b) public pure returns (uint256) {\n- return a + b;\n+ return 1;\n }\n \n function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) {\n", + "id": "2", + "name": "mutants/2/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "a + b", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n }\n \n function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`result` |==> `0`) of: `return result;`\n uint256 result = add(a, b);\n- return result;\n+ return 0;\n }\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n", + "id": "3", + "name": "mutants/3/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "result", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "0" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n }\n \n function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`result` |==> `1`) of: `return result;`\n uint256 result = add(a, b);\n- return result;\n+ return 1;\n }\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n", + "id": "4", + "name": "mutants/4/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "result", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n return result;\n }\n \n+ /// ExpressionValueReplacement(`a < b` |==> `true`) of: `bool c = a < b;`\n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n- bool c = a < b;\n+ bool c = true;\n while (c) {\n b = b - a;\n c = a < b;\n", + "id": "5", + "name": "mutants/5/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "a < b", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "true" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n return result;\n }\n \n+ /// ExpressionValueReplacement(`a < b` |==> `false`) of: `bool c = a < b;`\n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n- bool c = a < b;\n+ bool c = false;\n while (c) {\n b = b - a;\n c = a < b;\n", + "id": "6", + "name": "mutants/6/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "a < b", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "false" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n }\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`c` |==> `true`) of: `while (c) {`\n bool c = a < b;\n- while (c) {\n+ while (true) {\n b = b - a;\n c = a < b;\n }\n", + "id": "7", + "name": "mutants/7/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "c", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "true" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n }\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`c` |==> `false`) of: `while (c) {`\n bool c = a < b;\n- while (c) {\n+ while (false) {\n b = b - a;\n c = a < b;\n }\n", + "id": "8", + "name": "mutants/8/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "c", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "false" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n bool c = a < b;\n+ /// ExpressionValueReplacement(`b - a` |==> `0`) of: `b = b - a;`\n while (c) {\n- b = b - a;\n+ b = 0;\n c = a < b;\n }\n return a - b;\n", + "id": "9", + "name": "mutants/9/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "b - a", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "0" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n bool c = a < b;\n+ /// ExpressionValueReplacement(`b - a` |==> `1`) of: `b = b - a;`\n while (c) {\n- b = b - a;\n+ b = 1;\n c = a < b;\n }\n return a - b;\n", + "id": "10", + "name": "mutants/10/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "b - a", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -16,8 +16,9 @@\n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n bool c = a < b;\n while (c) {\n+ /// ExpressionValueReplacement(`a < b` |==> `true`) of: `c = a < b;`\n b = b - a;\n- c = a < b;\n+ c = true;\n }\n return a - b;\n }\n", + "id": "11", + "name": "mutants/11/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "a < b", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "true" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -16,8 +16,9 @@\n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n bool c = a < b;\n while (c) {\n+ /// ExpressionValueReplacement(`a < b` |==> `false`) of: `c = a < b;`\n b = b - a;\n- c = a < b;\n+ c = false;\n }\n return a - b;\n }\n", + "id": "12", + "name": "mutants/12/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "a < b", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "false" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n while (c) {\n b = b - a;\n c = a < b;\n+ /// ExpressionValueReplacement(`a - b` |==> `0`) of: `return a - b;`\n }\n- return a - b;\n+ return 0;\n }\n }\n", + "id": "13", + "name": "mutants/13/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "a - b", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "0" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n while (c) {\n b = b - a;\n c = a < b;\n+ /// ExpressionValueReplacement(`a - b` |==> `1`) of: `return a - b;`\n }\n- return a - b;\n+ return 1;\n }\n }\n", + "id": "14", + "name": "mutants/14/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "a - b", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "1" + } +] \ No newline at end of file diff --git a/resources/regressions/evr.json/mutants.log b/resources/regressions/evr.json/mutants.log new file mode 100644 index 00000000..459ec989 --- /dev/null +++ b/resources/regressions/evr.json/mutants.log @@ -0,0 +1,14 @@ +1,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,7:7,a + b,0 +2,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,7:7,a + b,1 +3,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,12:7,result,0 +4,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,12:7,result,1 +5,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,16:9,a < b,true +6,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,16:9,a < b,false +7,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,17:7,c,true +8,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,17:7,c,false +9,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,18:4,b - a,0 +10,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,18:4,b - a,1 +11,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,19:4,a < b,true +12,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,19:4,a < b,false +13,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,21:7,a - b,0 +14,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,21:7,a - b,1 diff --git a/resources/regressions/evr.json/mutants/1/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/1/Ops/EVR/EVR.sol new file mode 100644 index 00000000..1b02f6a4 --- /dev/null +++ b/resources/regressions/evr.json/mutants/1/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + /// ExpressionValueReplacement(`a + b` |==> `0`) of: `return a + b;` + function add(uint256 a, uint256 b) public pure returns (uint256) { + return 0; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = a < b; + while (c) { + b = b - a; + c = a < b; + } + return a - b; + } +} diff --git a/resources/regressions/evr.json/mutants/10/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/10/Ops/EVR/EVR.sol new file mode 100644 index 00000000..ebe50b7f --- /dev/null +++ b/resources/regressions/evr.json/mutants/10/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = a < b; + /// ExpressionValueReplacement(`b - a` |==> `1`) of: `b = b - a;` + while (c) { + b = 1; + c = a < b; + } + return a - b; + } +} diff --git a/resources/regressions/evr.json/mutants/11/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/11/Ops/EVR/EVR.sol new file mode 100644 index 00000000..0ad35872 --- /dev/null +++ b/resources/regressions/evr.json/mutants/11/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = a < b; + while (c) { + /// ExpressionValueReplacement(`a < b` |==> `true`) of: `c = a < b;` + b = b - a; + c = true; + } + return a - b; + } +} diff --git a/resources/regressions/evr.json/mutants/12/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/12/Ops/EVR/EVR.sol new file mode 100644 index 00000000..82bacee7 --- /dev/null +++ b/resources/regressions/evr.json/mutants/12/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = a < b; + while (c) { + /// ExpressionValueReplacement(`a < b` |==> `false`) of: `c = a < b;` + b = b - a; + c = false; + } + return a - b; + } +} diff --git a/resources/regressions/evr.json/mutants/13/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/13/Ops/EVR/EVR.sol new file mode 100644 index 00000000..8518990e --- /dev/null +++ b/resources/regressions/evr.json/mutants/13/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = a < b; + while (c) { + b = b - a; + c = a < b; + /// ExpressionValueReplacement(`a - b` |==> `0`) of: `return a - b;` + } + return 0; + } +} diff --git a/resources/regressions/evr.json/mutants/14/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/14/Ops/EVR/EVR.sol new file mode 100644 index 00000000..940f678b --- /dev/null +++ b/resources/regressions/evr.json/mutants/14/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = a < b; + while (c) { + b = b - a; + c = a < b; + /// ExpressionValueReplacement(`a - b` |==> `1`) of: `return a - b;` + } + return 1; + } +} diff --git a/resources/regressions/evr.json/mutants/2/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/2/Ops/EVR/EVR.sol new file mode 100644 index 00000000..414bc91d --- /dev/null +++ b/resources/regressions/evr.json/mutants/2/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + /// ExpressionValueReplacement(`a + b` |==> `1`) of: `return a + b;` + function add(uint256 a, uint256 b) public pure returns (uint256) { + return 1; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = a < b; + while (c) { + b = b - a; + c = a < b; + } + return a - b; + } +} diff --git a/resources/regressions/evr.json/mutants/3/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/3/Ops/EVR/EVR.sol new file mode 100644 index 00000000..f9ec895e --- /dev/null +++ b/resources/regressions/evr.json/mutants/3/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + /// ExpressionValueReplacement(`result` |==> `0`) of: `return result;` + uint256 result = add(a, b); + return 0; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = a < b; + while (c) { + b = b - a; + c = a < b; + } + return a - b; + } +} diff --git a/resources/regressions/evr.json/mutants/4/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/4/Ops/EVR/EVR.sol new file mode 100644 index 00000000..9bd1c212 --- /dev/null +++ b/resources/regressions/evr.json/mutants/4/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + /// ExpressionValueReplacement(`result` |==> `1`) of: `return result;` + uint256 result = add(a, b); + return 1; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = a < b; + while (c) { + b = b - a; + c = a < b; + } + return a - b; + } +} diff --git a/resources/regressions/evr.json/mutants/5/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/5/Ops/EVR/EVR.sol new file mode 100644 index 00000000..69055912 --- /dev/null +++ b/resources/regressions/evr.json/mutants/5/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + /// ExpressionValueReplacement(`a < b` |==> `true`) of: `bool c = a < b;` + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = true; + while (c) { + b = b - a; + c = a < b; + } + return a - b; + } +} diff --git a/resources/regressions/evr.json/mutants/6/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/6/Ops/EVR/EVR.sol new file mode 100644 index 00000000..88b7d5e7 --- /dev/null +++ b/resources/regressions/evr.json/mutants/6/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + /// ExpressionValueReplacement(`a < b` |==> `false`) of: `bool c = a < b;` + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = false; + while (c) { + b = b - a; + c = a < b; + } + return a - b; + } +} diff --git a/resources/regressions/evr.json/mutants/7/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/7/Ops/EVR/EVR.sol new file mode 100644 index 00000000..bf2cfc8c --- /dev/null +++ b/resources/regressions/evr.json/mutants/7/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + /// ExpressionValueReplacement(`c` |==> `true`) of: `while (c) {` + bool c = a < b; + while (true) { + b = b - a; + c = a < b; + } + return a - b; + } +} diff --git a/resources/regressions/evr.json/mutants/8/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/8/Ops/EVR/EVR.sol new file mode 100644 index 00000000..b8a6e6de --- /dev/null +++ b/resources/regressions/evr.json/mutants/8/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + /// ExpressionValueReplacement(`c` |==> `false`) of: `while (c) {` + bool c = a < b; + while (false) { + b = b - a; + c = a < b; + } + return a - b; + } +} diff --git a/resources/regressions/evr.json/mutants/9/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/9/Ops/EVR/EVR.sol new file mode 100644 index 00000000..c4d10472 --- /dev/null +++ b/resources/regressions/evr.json/mutants/9/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = a < b; + /// ExpressionValueReplacement(`b - a` |==> `0`) of: `b = b - a;` + while (c) { + b = 0; + c = a < b; + } + return a - b; + } +} diff --git a/resources/regressions/lor.json/gambit_results.json b/resources/regressions/lor.json/gambit_results.json index 7defb78a..c5e75538 100644 --- a/resources/regressions/lor.json/gambit_results.json +++ b/resources/regressions/lor.json/gambit_results.json @@ -4,62 +4,89 @@ "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", "id": "1", "name": "mutants/1/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a && b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "a" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", "id": "2", "name": "mutants/2/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a && b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "b" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", "id": "3", "name": "mutants/3/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a && b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "false" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "4", "name": "mutants/4/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a || b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "a" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "5", "name": "mutants/5/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a || b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "b" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "6", "name": "mutants/6/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a || b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "true" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", "id": "7", "name": "mutants/7/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "(x < y) || (a != (x >= y))", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "x < y" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", "id": "8", "name": "mutants/8/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "(x < y) || (a != (x >= y))", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "a != (x >= y)" }, { "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", "id": "9", "name": "mutants/9/Ops/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "(x < y) || (a != (x >= y))", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "true" } ] \ No newline at end of file diff --git a/resources/regressions/lvr.json/gambit_results.json b/resources/regressions/lvr.json/gambit_results.json index b001d311..d5b51f82 100644 --- a/resources/regressions/lvr.json/gambit_results.json +++ b/resources/regressions/lvr.json/gambit_results.json @@ -4,76 +4,239 @@ "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", "id": "1", "name": "mutants/1/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 0;\n }\n \n // Expect 2 mutant: 0, 2\n", "id": "2", "name": "mutants/2/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 1;\n }\n \n // Expect 2 mutant: 0, 2\n", "id": "3", "name": "mutants/3/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", "id": "4", "name": "mutants/4/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", "id": "5", "name": "mutants/5/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "2" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 0;\n }\n \n // Expect 2 mutants: 0, 1\n", "id": "6", "name": "mutants/6/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "EVR", + "orig": "one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 1;\n }\n \n // Expect 2 mutants: 0, 1\n", "id": "7", "name": "mutants/7/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "EVR", + "orig": "one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "8", "name": "mutants/8/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "-1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", "id": "9", "name": "mutants/9/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "-1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", "id": "10", "name": "mutants/10/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "-1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-2" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 0\n", "id": "11", "name": "mutants/11/Ops/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "EVR", + "orig": "neg_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 0\n", + "id": "12", + "name": "mutants/12/Ops/LVR/LVR.sol", + "op": "EVR", + "orig": "neg_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 0\n", + "id": "13", + "name": "mutants/13/Ops/LVR/LVR.sol", + "op": "EVR", + "orig": "neg_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", + "id": "14", + "name": "mutants/14/Ops/LVR/LVR.sol", + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", + "id": "15", + "name": "mutants/15/Ops/LVR/LVR.sol", + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", + "id": "16", + "name": "mutants/16/Ops/LVR/LVR.sol", + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "2" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 1\n", + "id": "17", + "name": "mutants/17/Ops/LVR/LVR.sol", + "op": "EVR", + "orig": "pos_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 1\n", + "id": "18", + "name": "mutants/18/Ops/LVR/LVR.sol", + "op": "EVR", + "orig": "pos_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 1\n", + "id": "19", + "name": "mutants/19/Ops/LVR/LVR.sol", + "op": "EVR", + "orig": "pos_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", + "id": "20", + "name": "mutants/20/Ops/LVR/LVR.sol", + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", + "id": "21", + "name": "mutants/21/Ops/LVR/LVR.sol", + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return -1;\n }\n }\n", + "id": "22", + "name": "mutants/22/Ops/LVR/LVR.sol", + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 0;\n }\n }\n", + "id": "23", + "name": "mutants/23/Ops/LVR/LVR.sol", + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 1;\n }\n }\n", + "id": "24", + "name": "mutants/24/Ops/LVR/LVR.sol", + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" } ] \ No newline at end of file diff --git a/resources/regressions/lvr.json/mutants.log b/resources/regressions/lvr.json/mutants.log index 3eb9dd77..ae7ae700 100644 --- a/resources/regressions/lvr.json/mutants.log +++ b/resources/regressions/lvr.json/mutants.log @@ -1,11 +1,24 @@ 1,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,14:15,0,1 -2,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,0 -3,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 -4,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 -5,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 -6,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,-2 -7,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 -8,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 -9,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 -10,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,-1 -11,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,1 +2,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:7,zero,0 +3,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:7,zero,1 +4,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,0 +5,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 +6,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:7,one,0 +7,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:7,one,1 +8,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 +9,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 +10,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,-2 +11,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,-1 +12,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,0 +13,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,1 +14,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 +15,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 +16,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 +17,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,-1 +18,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,0 +19,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,1 +20,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,-1 +21,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,1 +22,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,-1 +23,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,0 +24,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,1 diff --git a/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol index 22af4185..1e24417f 100644 --- a/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol @@ -23,8 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = -2; return neg_one; } @@ -35,9 +36,8 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = -1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol index e241973d..96e97ffa 100644 --- a/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol @@ -24,8 +24,9 @@ contract LVR { // Expect 2 mutants: 0, 1 function signed_neg_one() public pure returns (int256) { + /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;` int256 neg_one = -1; - return neg_one; + return -1; } // Expect 2 mutants: -1, 0 @@ -35,9 +36,8 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/lvr.json/mutants/12/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/12/Ops/LVR/LVR.sol new file mode 100644 index 00000000..2d831118 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/12/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;` + int256 neg_one = -1; + return 0; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/13/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/13/Ops/LVR/LVR.sol new file mode 100644 index 00000000..cd826db1 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/13/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;` + int256 neg_one = -1; + return 1; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/14/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/14/Ops/LVR/LVR.sol new file mode 100644 index 00000000..e088a4e3 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/14/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 0; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/15/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/15/Ops/LVR/LVR.sol new file mode 100644 index 00000000..2407079e --- /dev/null +++ b/resources/regressions/lvr.json/mutants/15/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = -1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/16/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/16/Ops/LVR/LVR.sol new file mode 100644 index 00000000..a5082f3b --- /dev/null +++ b/resources/regressions/lvr.json/mutants/16/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 2; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/17/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/17/Ops/LVR/LVR.sol new file mode 100644 index 00000000..cb3769d5 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/17/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;` + int256 pos_one = 1; + return -1; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/18/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/18/Ops/LVR/LVR.sol new file mode 100644 index 00000000..98a170bc --- /dev/null +++ b/resources/regressions/lvr.json/mutants/18/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;` + int256 pos_one = 1; + return 0; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/19/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/19/Ops/LVR/LVR.sol new file mode 100644 index 00000000..31602f01 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/19/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;` + int256 pos_one = 1; + return 1; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol index f2cb8295..135e11e3 100644 --- a/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol @@ -12,14 +12,14 @@ contract LVR { // Expect 1 mutant: 1 function unsigned_zero() public pure returns (uint256) { + /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;` uint256 zero = 0; - return zero; + return 0; } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 0; + uint256 one = 1; return one; } diff --git a/resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/20/Ops/LVR/LVR.sol similarity index 89% rename from resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol rename to resources/regressions/lvr.json/mutants/20/Ops/LVR/LVR.sol index e06271e2..22af4185 100644 --- a/resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/20/Ops/LVR/LVR.sol @@ -11,9 +11,8 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 1; + uint256 zero = 0; return zero; } @@ -36,8 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = -1; return zero; } } diff --git a/resources/regressions/lvr.json/mutants/21/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/21/Ops/LVR/LVR.sol new file mode 100644 index 00000000..e241973d --- /dev/null +++ b/resources/regressions/lvr.json/mutants/21/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` + function signed_zero() public pure returns (int256) { + int256 zero = 1; + return zero; + } +} diff --git a/resources/regressions/lvr.json/mutants/22/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/22/Ops/LVR/LVR.sol new file mode 100644 index 00000000..bae6e772 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/22/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;` + int256 zero = 0; + return -1; + } +} diff --git a/resources/regressions/lvr.json/mutants/23/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/23/Ops/LVR/LVR.sol new file mode 100644 index 00000000..728fbb96 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/23/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;` + int256 zero = 0; + return 0; + } +} diff --git a/resources/regressions/lvr.json/mutants/24/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/24/Ops/LVR/LVR.sol new file mode 100644 index 00000000..a4882479 --- /dev/null +++ b/resources/regressions/lvr.json/mutants/24/Ops/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;` + int256 zero = 0; + return 1; + } +} diff --git a/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol index d18c6c48..0d782e4a 100644 --- a/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol @@ -12,14 +12,14 @@ contract LVR { // Expect 1 mutant: 1 function unsigned_zero() public pure returns (uint256) { + /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;` uint256 zero = 0; - return zero; + return 1; } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 2; + uint256 one = 1; return one; } diff --git a/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol index 173dc540..f2cb8295 100644 --- a/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 0; return one; } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol index 72ffaedf..d18c6c48 100644 --- a/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 2; return one; } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 1; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol index 1e24417f..0d9d6236 100644 --- a/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol @@ -18,14 +18,14 @@ contract LVR { // Expect 2 mutant: 0, 2 function unsigned_one() public pure returns (uint256) { + /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;` uint256 one = 1; - return one; + return 0; } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -2; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol index e088a4e3..091e9f64 100644 --- a/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol @@ -18,8 +18,9 @@ contract LVR { // Expect 2 mutant: 0, 2 function unsigned_one() public pure returns (uint256) { + /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;` uint256 one = 1; - return one; + return 1; } // Expect 2 mutants: 0, 1 @@ -29,9 +30,8 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 0; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol index 2407079e..173dc540 100644 --- a/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol @@ -23,15 +23,15 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 0; return neg_one; } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = -1; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol index a5082f3b..72ffaedf 100644 --- a/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol @@ -23,15 +23,15 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 1; return neg_one; } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 2; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/ror.json/gambit_results.json b/resources/regressions/ror.json/gambit_results.json index c0d3e1ca..32645ef4 100644 --- a/resources/regressions/ror.json/gambit_results.json +++ b/resources/regressions/ror.json/gambit_results.json @@ -4,181 +4,259 @@ "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "1", "name": "mutants/1/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "<", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "2", "name": "mutants/2/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "<", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "!=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "3", "name": "mutants/3/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "x < y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "false" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "4", "name": "mutants/4/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "<=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "5", "name": "mutants/5/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "<=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "==" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "6", "name": "mutants/6/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "x <= y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "7", "name": "mutants/7/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": ">", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "8", "name": "mutants/8/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": ">", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "!=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "9", "name": "mutants/9/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "x > y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "false" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "10", "name": "mutants/10/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": ">=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "11", "name": "mutants/11/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": ">=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "==" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "12", "name": "mutants/12/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "x >= y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "13", "name": "mutants/13/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "==", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "14", "name": "mutants/14/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "==", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", "id": "15", "name": "mutants/15/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "x == y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "false" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "16", "name": "mutants/16/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "x == y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "false" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "17", "name": "mutants/17/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "!=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "18", "name": "mutants/18/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "!=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", "id": "19", "name": "mutants/19/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "x != y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "20", "name": "mutants/20/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "x != y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "21", "name": "mutants/21/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": ">=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "22", "name": "mutants/22/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": ">=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "==" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "23", "name": "mutants/23/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "(x + y) >= z", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", "id": "24", "name": "mutants/24/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "!=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", "id": "25", "name": "mutants/25/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "!=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", "id": "26", "name": "mutants/26/Ops/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "op": "ROR", + "orig": "(x + y) != z", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" } ] \ No newline at end of file diff --git a/resources/regressions/test_import_map.json/gambit_results.json b/resources/regressions/test_import_map.json/gambit_results.json index 8fdce801..3b4fafe3 100644 --- a/resources/regressions/test_import_map.json/gambit_results.json +++ b/resources/regressions/test_import_map.json/gambit_results.json @@ -4,27 +4,39 @@ "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n }\n", "id": "1", "name": "mutants/1/contracts/Contract.sol", - "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n }\n", "id": "2", "name": "mutants/2/contracts/Contract.sol", - "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n }\n", "id": "3", "name": "mutants/3/contracts/Contract.sol", - "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n }\n", "id": "4", "name": "mutants/4/contracts/Contract.sol", - "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + "repl": "%" } ] \ No newline at end of file diff --git a/resources/regressions/test_log_invalid.json/gambit_results.json b/resources/regressions/test_log_invalid.json/gambit_results.json index 1c5f0d77..6ab76978 100644 --- a/resources/regressions/test_log_invalid.json/gambit_results.json +++ b/resources/regressions/test_log_invalid.json/gambit_results.json @@ -4,517 +4,889 @@ "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "9", "name": "mutants/9/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "10", "name": "mutants/10/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "**" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "18", "name": "mutants/18/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "19", "name": "mutants/19/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "20", "name": "mutants/20/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "21", "name": "mutants/21/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "22", "name": "mutants/22/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", "id": "23", "name": "mutants/23/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" + "op": "BOR", + "orig": "|", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "repl": "&" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", "id": "24", "name": "mutants/24/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" + "op": "BOR", + "orig": "&", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "repl": "|" }, { "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", "id": "25", "name": "mutants/25/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" + "op": "BOR", + "orig": "^", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "repl": "&" }, { "description": "ElimDelegateCall", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", "id": "26", "name": "mutants/26/EDC/EDC.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol" + "op": "EDC", + "orig": "delegatecall", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + "repl": "call" }, { - "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(true, \"Delegatecall failed\");\n }\n }\n", "id": "27", - "name": "mutants/27/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "name": "mutants/27/EDC/EDC.sol", + "op": "EVR", + "orig": "success", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + "repl": "true" }, { - "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(false, \"Delegatecall failed\");\n }\n }\n", "id": "28", - "name": "mutants/28/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "name": "mutants/28/EDC/EDC.sol", + "op": "EVR", + "orig": "success", + "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", + "repl": "false" }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", "id": "29", "name": "mutants/29/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a && b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "a" }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", "id": "30", "name": "mutants/30/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a && b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "b" }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", "id": "31", "name": "mutants/31/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a && b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "false" }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "32", "name": "mutants/32/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a || b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "a" }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "33", "name": "mutants/33/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a || b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "b" }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "34", "name": "mutants/34/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "a || b", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "true" }, { "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", "id": "35", "name": "mutants/35/LOR/LOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol" + "op": "LOR", + "orig": "(x < y) || (a != (x >= y))", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "x < y" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", "id": "36", - "name": "mutants/36/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "name": "mutants/36/LOR/LOR.sol", + "op": "LOR", + "orig": "(x < y) || (a != (x >= y))", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "a != (x >= y)" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", "id": "37", - "name": "mutants/37/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "name": "mutants/37/LOR/LOR.sol", + "op": "LOR", + "orig": "(x < y) || (a != (x >= y))", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "true" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", "id": "38", "name": "mutants/38/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 0;\n }\n \n // Expect 2 mutant: 0, 2\n", "id": "39", "name": "mutants/39/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 1;\n }\n \n // Expect 2 mutant: 0, 2\n", "id": "40", "name": "mutants/40/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", "id": "41", "name": "mutants/41/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", "id": "42", "name": "mutants/42/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "2" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 0;\n }\n \n // Expect 2 mutants: 0, 1\n", "id": "43", "name": "mutants/43/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "EVR", + "orig": "one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 1;\n }\n \n // Expect 2 mutants: 0, 1\n", "id": "44", "name": "mutants/44/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "EVR", + "orig": "one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "45", "name": "mutants/45/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "-1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", "id": "46", "name": "mutants/46/LVR/LVR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol" + "op": "LVR", + "orig": "-1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", + "id": "47", + "name": "mutants/47/LVR/LVR.sol", + "op": "LVR", + "orig": "-1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-2" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 0\n", + "id": "48", + "name": "mutants/48/LVR/LVR.sol", + "op": "EVR", + "orig": "neg_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 0\n", + "id": "49", + "name": "mutants/49/LVR/LVR.sol", + "op": "EVR", + "orig": "neg_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 0\n", + "id": "50", + "name": "mutants/50/LVR/LVR.sol", + "op": "EVR", + "orig": "neg_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", + "id": "51", + "name": "mutants/51/LVR/LVR.sol", + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", + "id": "52", + "name": "mutants/52/LVR/LVR.sol", + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", + "id": "53", + "name": "mutants/53/LVR/LVR.sol", + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "2" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 1\n", + "id": "54", + "name": "mutants/54/LVR/LVR.sol", + "op": "EVR", + "orig": "pos_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 1\n", + "id": "55", + "name": "mutants/55/LVR/LVR.sol", + "op": "EVR", + "orig": "pos_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 1\n", + "id": "56", + "name": "mutants/56/LVR/LVR.sol", + "op": "EVR", + "orig": "pos_one", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", + "id": "57", + "name": "mutants/57/LVR/LVR.sol", + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", + "id": "58", + "name": "mutants/58/LVR/LVR.sol", + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return -1;\n }\n }\n", + "id": "59", + "name": "mutants/59/LVR/LVR.sol", + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "-1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 0;\n }\n }\n", + "id": "60", + "name": "mutants/60/LVR/LVR.sol", + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "0" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 1;\n }\n }\n", + "id": "61", + "name": "mutants/61/LVR/LVR.sol", + "op": "EVR", + "orig": "zero", + "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "repl": "1" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "47", - "name": "mutants/47/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "62", + "name": "mutants/62/ROR/ROR.sol", + "op": "ROR", + "orig": "<", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "48", - "name": "mutants/48/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "63", + "name": "mutants/63/ROR/ROR.sol", + "op": "ROR", + "orig": "<", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "!=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "49", - "name": "mutants/49/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "64", + "name": "mutants/64/ROR/ROR.sol", + "op": "ROR", + "orig": "x < y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "false" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "50", - "name": "mutants/50/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "65", + "name": "mutants/65/ROR/ROR.sol", + "op": "ROR", + "orig": "<=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "51", - "name": "mutants/51/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "66", + "name": "mutants/66/ROR/ROR.sol", + "op": "ROR", + "orig": "<=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "==" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "52", - "name": "mutants/52/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "67", + "name": "mutants/67/ROR/ROR.sol", + "op": "ROR", + "orig": "x <= y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "53", - "name": "mutants/53/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "68", + "name": "mutants/68/ROR/ROR.sol", + "op": "ROR", + "orig": ">", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "54", - "name": "mutants/54/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "69", + "name": "mutants/69/ROR/ROR.sol", + "op": "ROR", + "orig": ">", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "!=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "55", - "name": "mutants/55/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "70", + "name": "mutants/70/ROR/ROR.sol", + "op": "ROR", + "orig": "x > y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "false" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "56", - "name": "mutants/56/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "71", + "name": "mutants/71/ROR/ROR.sol", + "op": "ROR", + "orig": ">=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "57", - "name": "mutants/57/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "72", + "name": "mutants/72/ROR/ROR.sol", + "op": "ROR", + "orig": ">=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "==" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "58", - "name": "mutants/58/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "73", + "name": "mutants/73/ROR/ROR.sol", + "op": "ROR", + "orig": "x >= y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "59", - "name": "mutants/59/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "74", + "name": "mutants/74/ROR/ROR.sol", + "op": "ROR", + "orig": "==", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "60", - "name": "mutants/60/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "75", + "name": "mutants/75/ROR/ROR.sol", + "op": "ROR", + "orig": "==", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">=" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "61", - "name": "mutants/61/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "76", + "name": "mutants/76/ROR/ROR.sol", + "op": "ROR", + "orig": "x == y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "false" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", - "id": "62", - "name": "mutants/62/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "77", + "name": "mutants/77/ROR/ROR.sol", + "op": "ROR", + "orig": "x == y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "false" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "63", - "name": "mutants/63/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "78", + "name": "mutants/78/ROR/ROR.sol", + "op": "ROR", + "orig": "!=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "64", - "name": "mutants/64/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "79", + "name": "mutants/79/ROR/ROR.sol", + "op": "ROR", + "orig": "!=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "65", - "name": "mutants/65/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "80", + "name": "mutants/80/ROR/ROR.sol", + "op": "ROR", + "orig": "x != y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", - "id": "66", - "name": "mutants/66/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "81", + "name": "mutants/81/ROR/ROR.sol", + "op": "ROR", + "orig": "x != y", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "67", - "name": "mutants/67/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "82", + "name": "mutants/82/ROR/ROR.sol", + "op": "ROR", + "orig": ">=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "68", - "name": "mutants/68/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "83", + "name": "mutants/83/ROR/ROR.sol", + "op": "ROR", + "orig": ">=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "==" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "69", - "name": "mutants/69/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "84", + "name": "mutants/84/ROR/ROR.sol", + "op": "ROR", + "orig": "(x + y) >= z", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", - "id": "70", - "name": "mutants/70/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "85", + "name": "mutants/85/ROR/ROR.sol", + "op": "ROR", + "orig": "!=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "<" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", - "id": "71", - "name": "mutants/71/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "86", + "name": "mutants/86/ROR/ROR.sol", + "op": "ROR", + "orig": "!=", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": ">" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", - "id": "72", - "name": "mutants/72/ROR/ROR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol" + "id": "87", + "name": "mutants/87/ROR/ROR.sol", + "op": "ROR", + "orig": "(x + y) != z", + "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "repl": "true" }, { "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", - "id": "73", - "name": "mutants/73/UOR/UOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" + "id": "88", + "name": "mutants/88/UOR/UOR.sol", + "op": "UOR", + "orig": "~", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "repl": " - " }, { "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", - "id": "74", - "name": "mutants/74/UOR/UOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" + "id": "89", + "name": "mutants/89/UOR/UOR.sol", + "op": "UOR", + "orig": "~", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "repl": " ~ " } ] \ No newline at end of file diff --git a/resources/regressions/test_log_invalid.json/mutants.log b/resources/regressions/test_log_invalid.json/mutants.log index 12711d6c..874f7998 100644 --- a/resources/regressions/test_log_invalid.json/mutants.log +++ b/resources/regressions/test_log_invalid.json/mutants.log @@ -24,51 +24,66 @@ 24,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,15:9,&,| 25,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,21:9,^,& 26,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,15:29,delegatecall,call -27,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,a -28,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,b -29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,false -30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,a -31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,b -32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,true -33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),x < y -34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),a != (x >= y) -35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),true -36,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,14:15,0,1 -37,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,0 -38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 -39,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 -40,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 -41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,-2 -42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 -43,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 -44,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 -45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,-1 -46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,1 -47,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,<= -48,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,!= -49,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:7,x < y,false -50,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,< -51,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,== -52,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:7,x <= y,true -53,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,>= -54,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,!= -55,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:7,x > y,false -56,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,> -57,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,== -58,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:7,x >= y,true -59,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,<= -60,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,>= -61,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:7,x == y,false -62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false -63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< -64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> -65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true -66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true -67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> -68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== -69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true -70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< -71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> -72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true -73,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,13:7,~, - -74,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,18:7,~, ~ +27,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,18:8,success,true +28,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,18:8,success,false +29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,a +30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,b +31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,false +32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,a +33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,b +34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,true +35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),x < y +36,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),a != (x >= y) +37,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),true +38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,14:15,0,1 +39,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:7,zero,0 +40,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:7,zero,1 +41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,0 +42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 +43,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:7,one,0 +44,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:7,one,1 +45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 +46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 +47,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,-2 +48,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,-1 +49,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,0 +50,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,1 +51,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 +52,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 +53,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 +54,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,-1 +55,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,0 +56,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,1 +57,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,-1 +58,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,1 +59,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,-1 +60,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,0 +61,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,1 +62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,<= +63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,!= +64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:7,x < y,false +65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,< +66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,== +67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:7,x <= y,true +68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,>= +69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,!= +70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:7,x > y,false +71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,> +72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,== +73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:7,x >= y,true +74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,<= +75,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,>= +76,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:7,x == y,false +77,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false +78,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< +79,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> +80,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true +81,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true +82,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> +83,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== +84,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true +85,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< +86,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> +87,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true +88,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,13:7,~, - +89,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,18:7,~, ~ diff --git a/resources/regressions/test_log_invalid.json/mutants/27/EDC/EDC.sol b/resources/regressions/test_log_invalid.json/mutants/27/EDC/EDC.sol new file mode 100644 index 00000000..c078b6f6 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/27/EDC/EDC.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.13; + +contract Helper { + function setVars(uint _num) public payable {} +} + +contract EDC { + uint public num; + address public sender; + uint public value; + bool public delegateSuccessful; + bytes public myData; + + function setVars(address _contract) public payable { + (bool success, ) = _contract.delegatecall( + abi.encodeWithSignature("setVars(uint256)", 1) + /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, "Delegatecall failed");` + ); + require(true, "Delegatecall failed"); + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/28/EDC/EDC.sol b/resources/regressions/test_log_invalid.json/mutants/28/EDC/EDC.sol new file mode 100644 index 00000000..eed317db --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/28/EDC/EDC.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.13; + +contract Helper { + function setVars(uint _num) public payable {} +} + +contract EDC { + uint public num; + address public sender; + uint public value; + bool public delegateSuccessful; + bytes public myData; + + function setVars(address _contract) public payable { + (bool success, ) = _contract.delegatecall( + abi.encodeWithSignature("setVars(uint256)", 1) + /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, "Delegatecall failed");` + ); + require(false, "Delegatecall failed"); + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol index 0e5805db..67f4f5df 100644 --- a/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` + /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return false; + return a; } // Expect three mutants: a, b, true diff --git a/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol index 06fbf70c..d63286bb 100644 --- a/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a && b; + return b; } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a; + return a || b; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol index 620f1630..0e5805db 100644 --- a/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a && b; + return false; } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return b; + return a || b; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol index 29afb982..06fbf70c 100644 --- a/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol @@ -10,9 +10,9 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` + /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return true; + return a; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol index eb339ae7..620f1630 100644 --- a/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol @@ -10,13 +10,13 @@ contract LOR { } // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a || b; + return b; } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return x < y; + return (x < y) || (a != (x >= y)); } } diff --git a/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol index fb49fdaf..29afb982 100644 --- a/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol @@ -10,13 +10,13 @@ contract LOR { } // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a || b; + return true; } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return a != (x >= y); + return (x < y) || (a != (x >= y)); } } diff --git a/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol index 0d9c28b2..eb339ae7 100644 --- a/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol @@ -15,8 +15,8 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return true; + return x < y; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol similarity index 76% rename from resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol rename to resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol index d63286bb..fb49fdaf 100644 --- a/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return b; + return a && b; } // Expect three mutants: a, b, true @@ -16,7 +15,8 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return (x < y) || (a != (x >= y)); + return a != (x >= y); } } diff --git a/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol similarity index 78% rename from resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol rename to resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol index d63286bb..0d9c28b2 100644 --- a/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return b; + return a && b; } // Expect three mutants: a, b, true @@ -16,7 +15,8 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return (x < y) || (a != (x >= y)); + return true; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol index d18c6c48..e06271e2 100644 --- a/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol @@ -11,15 +11,15 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; + uint256 zero = 1; return zero; } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 2; + uint256 one = 1; return one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol index 173dc540..135e11e3 100644 --- a/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol @@ -12,8 +12,9 @@ contract LVR { // Expect 1 mutant: 1 function unsigned_zero() public pure returns (uint256) { + /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;` uint256 zero = 0; - return zero; + return 0; } // Expect 2 mutant: 0, 2 @@ -23,9 +24,8 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol index 72ffaedf..0d782e4a 100644 --- a/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol @@ -12,8 +12,9 @@ contract LVR { // Expect 1 mutant: 1 function unsigned_zero() public pure returns (uint256) { + /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;` uint256 zero = 0; - return zero; + return 1; } // Expect 2 mutant: 0, 2 @@ -23,9 +24,8 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 1; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol index 1e24417f..f2cb8295 100644 --- a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 0; return one; } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -2; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol index e088a4e3..d18c6c48 100644 --- a/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol @@ -17,8 +17,9 @@ contract LVR { } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 2; return one; } @@ -29,9 +30,8 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 0; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol index 2407079e..0d9d6236 100644 --- a/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol @@ -18,8 +18,9 @@ contract LVR { // Expect 2 mutant: 0, 2 function unsigned_one() public pure returns (uint256) { + /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;` uint256 one = 1; - return one; + return 0; } // Expect 2 mutants: 0, 1 @@ -29,9 +30,8 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = -1; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol index a5082f3b..091e9f64 100644 --- a/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol @@ -18,8 +18,9 @@ contract LVR { // Expect 2 mutant: 0, 2 function unsigned_one() public pure returns (uint256) { + /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;` uint256 one = 1; - return one; + return 1; } // Expect 2 mutants: 0, 1 @@ -29,9 +30,8 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 2; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol index 22af4185..173dc540 100644 --- a/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol @@ -23,8 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 0; return neg_one; } @@ -35,9 +36,8 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = -1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol index e241973d..72ffaedf 100644 --- a/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol @@ -23,8 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 1; return neg_one; } @@ -35,9 +36,8 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol new file mode 100644 index 00000000..1e24417f --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -2; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol deleted file mode 100644 index dec84f24..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` - function less(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) != z; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol new file mode 100644 index 00000000..96e97ffa --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;` + int256 neg_one = -1; + return -1; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol deleted file mode 100644 index 0c05265c..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` - function less(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) != z; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/49/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/49/LVR/LVR.sol new file mode 100644 index 00000000..2d831118 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/49/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;` + int256 neg_one = -1; + return 0; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/50/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/50/LVR/LVR.sol new file mode 100644 index 00000000..cd826db1 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/50/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;` + int256 neg_one = -1; + return 1; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/51/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/51/LVR/LVR.sol new file mode 100644 index 00000000..e088a4e3 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/51/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 0; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol deleted file mode 100644 index 18e38f34..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) != z; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/52/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/52/LVR/LVR.sol new file mode 100644 index 00000000..2407079e --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/52/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = -1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/53/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/53/LVR/LVR.sol new file mode 100644 index 00000000..a5082f3b --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/53/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 2; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol deleted file mode 100644 index 52949d03..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` - function more(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) != z; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/54/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/54/LVR/LVR.sol new file mode 100644 index 00000000..cb3769d5 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/54/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;` + int256 pos_one = 1; + return -1; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol deleted file mode 100644 index a3e16320..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` - function more(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) != z; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/55/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/55/LVR/LVR.sol new file mode 100644 index 00000000..98a170bc --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/55/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;` + int256 pos_one = 1; + return 0; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol deleted file mode 100644 index a9024427..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` - function more(uint256 x, uint256 y) public pure returns (bool) { - return false; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) != z; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/56/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/56/LVR/LVR.sol new file mode 100644 index 00000000..31602f01 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/56/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;` + int256 pos_one = 1; + return 1; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + int256 zero = 0; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/57/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/57/LVR/LVR.sol new file mode 100644 index 00000000..22af4185 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/57/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` + function signed_zero() public pure returns (int256) { + int256 zero = -1; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/58/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/58/LVR/LVR.sol new file mode 100644 index 00000000..e241973d --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/58/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` + function signed_zero() public pure returns (int256) { + int256 zero = 1; + return zero; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/59/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/59/LVR/LVR.sol new file mode 100644 index 00000000..bae6e772 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/59/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;` + int256 zero = 0; + return -1; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/60/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/60/LVR/LVR.sol new file mode 100644 index 00000000..728fbb96 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/60/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;` + int256 zero = 0; + return 0; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/61/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/61/LVR/LVR.sol new file mode 100644 index 00000000..a4882479 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/61/LVR/LVR.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LVR { + uint256 one_u = 1; + uint256 zero_u = 0; + int256 n_one_s = -1; + int256 one_s = 1; + int256 zero_s = 0; + + // Expect 1 mutant: 1 + function unsigned_zero() public pure returns (uint256) { + uint256 zero = 0; + return zero; + } + + // Expect 2 mutant: 0, 2 + function unsigned_one() public pure returns (uint256) { + uint256 one = 1; + return one; + } + + // Expect 2 mutants: 0, 1 + function signed_neg_one() public pure returns (int256) { + int256 neg_one = -1; + return neg_one; + } + + // Expect 2 mutants: -1, 0 + function signed_pos_one() public pure returns (int256) { + int256 pos_one = 1; + return pos_one; + } + + // Expect 2 mutants: -1, 1 + function signed_zero() public pure returns (int256) { + /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;` + int256 zero = 0; + return 1; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol index ab40e6c9..dec84f24 100644 --- a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x <= y; } // Expect 3 mutants: x < y, x == y, true @@ -30,9 +31,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x == y; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol index f42e7b7e..0c05265c 100644 --- a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x != y; } // Expect 3 mutants: x < y, x == y, true @@ -35,9 +36,8 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol index e5f50322..6141947b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return false; } // Expect 3 mutants: x < y, x == y, true @@ -35,9 +36,8 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol index 83684484..9f8ccd04 100644 --- a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol @@ -10,8 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x < y; } // Expect 3 mutants: x >= y, x != y, false @@ -35,9 +36,8 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol index 3ae92133..18e38f34 100644 --- a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol @@ -10,8 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x == y; } // Expect 3 mutants: x >= y, x != y, false @@ -40,9 +41,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol index bdeac3af..55dd7c79 100644 --- a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol @@ -10,8 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return true; } // Expect 3 mutants: x >= y, x != y, false @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol index 430379f6..52949d03 100644 --- a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol @@ -15,8 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x >= y; } // Expect 3 mutants: x > y, x == y, true @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) == z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol index 3d67c155..a3e16320 100644 --- a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol @@ -15,8 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x != y; } // Expect 3 mutants: x > y, x == y, true @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return true; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol index 13612614..a9024427 100644 --- a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol @@ -15,8 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return false; } // Expect 3 mutants: x > y, x == y, true @@ -58,8 +59,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) < z; + return (x + y) != z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol index dd0c83ca..337c9a92 100644 --- a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol @@ -20,8 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x > y; } // Expect 3 mutants: x >= y, x <= y, false @@ -58,8 +59,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) != z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol index 84889114..7c02b73b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol @@ -20,8 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x == y; } // Expect 3 mutants: x >= y, x <= y, false @@ -58,8 +59,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return true; + return (x + y) != z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol similarity index 100% rename from resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol diff --git a/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol similarity index 100% rename from resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol diff --git a/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/75/ROR/ROR.sol similarity index 100% rename from resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/75/ROR/ROR.sol diff --git a/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/76/ROR/ROR.sol similarity index 100% rename from resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/76/ROR/ROR.sol diff --git a/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/77/ROR/ROR.sol similarity index 94% rename from resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/77/ROR/ROR.sol index 6141947b..ab40e6c9 100644 --- a/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/77/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -31,8 +30,9 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; + return false; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/78/ROR/ROR.sol similarity index 94% rename from resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/78/ROR/ROR.sol index 9f8ccd04..f42e7b7e 100644 --- a/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/78/ROR/ROR.sol @@ -10,9 +10,8 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false @@ -36,8 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x < y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/79/ROR/ROR.sol similarity index 93% rename from resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/79/ROR/ROR.sol index a3e16320..e5f50322 100644 --- a/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/79/ROR/ROR.sol @@ -15,9 +15,8 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x > y; } // Expect 3 mutants: x > y, x == y, true @@ -36,8 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x > y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/80/ROR/ROR.sol similarity index 93% rename from resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/80/ROR/ROR.sol index 0c05265c..83684484 100644 --- a/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/80/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -36,8 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return true; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/81/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/81/ROR/ROR.sol new file mode 100644 index 00000000..3ae92133 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/81/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/82/ROR/ROR.sol similarity index 96% rename from resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/82/ROR/ROR.sol index 337c9a92..bdeac3af 100644 --- a/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/82/ROR/ROR.sol @@ -20,9 +20,8 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) > z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/83/ROR/ROR.sol similarity index 96% rename from resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/83/ROR/ROR.sol index 7c02b73b..430379f6 100644 --- a/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/83/ROR/ROR.sol @@ -20,9 +20,8 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) == z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/84/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/84/ROR/ROR.sol new file mode 100644 index 00000000..3d67c155 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/84/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` + ) public pure returns (bool) { + return true; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/85/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/85/ROR/ROR.sol new file mode 100644 index 00000000..13612614 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/85/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` + ) public pure returns (bool) { + return (x + y) < z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/86/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/86/ROR/ROR.sol new file mode 100644 index 00000000..dd0c83ca --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/86/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` + ) public pure returns (bool) { + return (x + y) > z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/87/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/87/ROR/ROR.sol new file mode 100644 index 00000000..84889114 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/87/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` + ) public pure returns (bool) { + return true; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/73/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/88/UOR/UOR.sol similarity index 100% rename from resources/regressions/test_log_invalid.json/mutants/73/UOR/UOR.sol rename to resources/regressions/test_log_invalid.json/mutants/88/UOR/UOR.sol diff --git a/resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/89/UOR/UOR.sol similarity index 100% rename from resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol rename to resources/regressions/test_log_invalid.json/mutants/89/UOR/UOR.sol diff --git a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json index 56d595e5..a6e11d59 100644 --- a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json @@ -4,419 +4,639 @@ "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "1", "name": "mutants/1/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return a + b", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "2" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "a[0] = msg.sender", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return a", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "11" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "27", "name": "mutants/27/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "Utils.getarray(b, address(this))", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return c + d", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return a + b", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "2" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "a[0] = msg.sender", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return a", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "11" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "51", "name": "mutants/51/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "52", "name": "mutants/52/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "53", "name": "mutants/53/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "54", "name": "mutants/54/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "55", "name": "mutants/55/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "56", "name": "mutants/56/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "57", "name": "mutants/57/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "58", "name": "mutants/58/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "59", "name": "mutants/59/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "Utils.getarray(b, address(this))", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "60", "name": "mutants/60/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return c + d", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "61", + "name": "mutants/61/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "62", + "name": "mutants/62/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "63", + "name": "mutants/63/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "64", + "name": "mutants/64/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants.log b/resources/regressions/test_multiple_contracts_1.json/mutants.log index efff0a10..34c109e1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_1.json/mutants.log @@ -19,42 +19,46 @@ 19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ 20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% 21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -22,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -23,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -24,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 -25,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% -31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -32,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false -33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 -34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -40,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -41,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -45,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -53,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -54,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 -55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -60,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +22,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 +23,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 +24,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +25,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +26,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 +27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +33,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) +34,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false +35,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 +36,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 +45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +46,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +47,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +51,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +52,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +54,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 +55,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 +56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +57,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +58,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 +59,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +60,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +61,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +62,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +63,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +64,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol index a4c6c970..f4904fd4 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return res; + return 0; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol index 781e87b1..e702ba43 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return res; + return 1; } - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol index 7749a0cb..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol @@ -25,9 +25,9 @@ contract C { return res; } - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); + assert(true); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol index a14e05da..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol @@ -25,14 +25,14 @@ contract C { return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol index 4887a934..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(c[1] == e); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol index 7a0c07d0..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol index d73584b8..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol index c226dcfd..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol index c6022ee9..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol index 5f69007a..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol @@ -3,9 +3,8 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(true); + assert(c[0] == e); } function add(int8 a, int8 b) public pure returns (int8) { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol index ecdc98c4..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol @@ -3,9 +3,8 @@ pragma solidity ^0.8.13; library Utils { - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(false); + assert(c[0] == e); } function add(int8 a, int8 b) public pure returns (int8) { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol index e9466e07..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.13; library Utils { - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[1] == e); + assert(true); } function add(int8 a, int8 b) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol index f7a48737..ecdc98c4 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - assert(true); + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol index 9e5f617a..e9466e07 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(c[1] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol index 86125329..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol index e85ef12c..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a - b; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol index b32909ed..86125329 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a * b; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol index f9a5de25..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a / b; } } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol index 16f8bc88..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a % b; } } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol index 427647a6..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); + address[] memory a = new address[](0); + a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol index 9db93f13..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - a[1] = msg.sender; + address[] memory a = new address[](2); + a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol index a9342ea1..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol @@ -14,10 +14,10 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` - a[0] = msg.sender; assert(true); + return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol index f2136ed3..9db93f13 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol @@ -14,14 +14,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + a[1] = msg.sender; return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol index f69e3360..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol @@ -15,13 +15,13 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - return a; + assert(true); } - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol index 13319cbe..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a + decimals; + uint256 a = 0; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol index 3279b41e..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; + uint256 a = 11; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol index 95cc94e7..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a * decimals; + uint256 res = a + decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol index cc3476f1..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; + uint256 res = a - decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol index 4979f42e..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a * decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol index 5933d066..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol @@ -20,10 +20,10 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); + uint256 res = a / decimals; + return res; } function getarray(address[] memory c, address e) public pure { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol index a4c6c970..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol @@ -20,14 +20,14 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a % decimals; return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol index 781e87b1..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; - return res; + assert(true); } - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol index 7749a0cb..f4904fd4 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return res; + return 0; } - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol index a14e05da..e702ba43 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol @@ -21,8 +21,9 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return res; + return 1; } function getarray(address[] memory c, address e) public pure { @@ -30,9 +31,8 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol index 4887a934..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol index 7a0c07d0..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol index d73584b8..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(c[1] == e); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol index c226dcfd..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol index c6022ee9..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/61/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/61/MultipleContracts/C.sol new file mode 100644 index 00000000..7a0c07d0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/61/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/62/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/62/MultipleContracts/C.sol new file mode 100644 index 00000000..d73584b8 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/62/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/63/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/63/MultipleContracts/C.sol new file mode 100644 index 00000000..c226dcfd --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/63/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/64/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/64/MultipleContracts/C.sol new file mode 100644 index 00000000..c6022ee9 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/64/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json index 56d595e5..a6e11d59 100644 --- a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json @@ -4,419 +4,639 @@ "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "1", "name": "mutants/1/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return a + b", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "2" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "a[0] = msg.sender", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return a", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "11" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "27", "name": "mutants/27/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "Utils.getarray(b, address(this))", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return c + d", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return a + b", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "2" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "a[0] = msg.sender", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return a", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "11" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "51", "name": "mutants/51/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "52", "name": "mutants/52/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "53", "name": "mutants/53/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "54", "name": "mutants/54/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "55", "name": "mutants/55/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "56", "name": "mutants/56/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "57", "name": "mutants/57/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "58", "name": "mutants/58/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "59", "name": "mutants/59/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "Utils.getarray(b, address(this))", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "60", "name": "mutants/60/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return c + d", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "61", + "name": "mutants/61/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "62", + "name": "mutants/62/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "63", + "name": "mutants/63/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "64", + "name": "mutants/64/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants.log b/resources/regressions/test_multiple_contracts_2.json/mutants.log index efff0a10..34c109e1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_2.json/mutants.log @@ -19,42 +19,46 @@ 19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ 20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% 21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -22,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -23,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -24,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 -25,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% -31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -32,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false -33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 -34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -40,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -41,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -45,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -53,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -54,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 -55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -60,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +22,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 +23,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 +24,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +25,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +26,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 +27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +33,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) +34,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false +35,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 +36,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 +45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +46,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +47,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +51,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +52,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +54,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 +55,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 +56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +57,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +58,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 +59,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +60,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +61,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +62,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +63,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +64,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol index a4c6c970..f4904fd4 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return res; + return 0; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol index 781e87b1..e702ba43 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return res; + return 1; } - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol index 7749a0cb..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol @@ -25,9 +25,9 @@ contract C { return res; } - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); + assert(true); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol index a14e05da..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol @@ -25,14 +25,14 @@ contract C { return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol index 4887a934..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(c[1] == e); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol index 7a0c07d0..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol index d73584b8..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol index c226dcfd..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol index c6022ee9..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol index 5f69007a..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol @@ -3,9 +3,8 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(true); + assert(c[0] == e); } function add(int8 a, int8 b) public pure returns (int8) { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol index ecdc98c4..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol @@ -3,9 +3,8 @@ pragma solidity ^0.8.13; library Utils { - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(false); + assert(c[0] == e); } function add(int8 a, int8 b) public pure returns (int8) { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol index e9466e07..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.13; library Utils { - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[1] == e); + assert(true); } function add(int8 a, int8 b) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol index f7a48737..ecdc98c4 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - assert(true); + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol index 9e5f617a..e9466e07 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(c[1] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol index 86125329..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol index e85ef12c..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a - b; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol index b32909ed..86125329 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a * b; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol index f9a5de25..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a / b; } } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol index 16f8bc88..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a % b; } } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol index 427647a6..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); + address[] memory a = new address[](0); + a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol index 9db93f13..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - a[1] = msg.sender; + address[] memory a = new address[](2); + a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol index a9342ea1..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol @@ -14,10 +14,10 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` - a[0] = msg.sender; assert(true); + return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol index f2136ed3..9db93f13 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol @@ -14,14 +14,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + a[1] = msg.sender; return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol index f69e3360..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol @@ -15,13 +15,13 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - return a; + assert(true); } - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol index 13319cbe..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a + decimals; + uint256 a = 0; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol index 3279b41e..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; + uint256 a = 11; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol index 95cc94e7..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a * decimals; + uint256 res = a + decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol index cc3476f1..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; + uint256 res = a - decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol index 4979f42e..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a * decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol index 5933d066..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol @@ -20,10 +20,10 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); + uint256 res = a / decimals; + return res; } function getarray(address[] memory c, address e) public pure { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol index a4c6c970..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol @@ -20,14 +20,14 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a % decimals; return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol index 781e87b1..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; - return res; + assert(true); } - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol index 7749a0cb..f4904fd4 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return res; + return 0; } - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol index a14e05da..e702ba43 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol @@ -21,8 +21,9 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return res; + return 1; } function getarray(address[] memory c, address e) public pure { @@ -30,9 +31,8 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol index 4887a934..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol index 7a0c07d0..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol index d73584b8..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(c[1] == e); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol index c226dcfd..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol index c6022ee9..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/61/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/61/MultipleContracts/C.sol new file mode 100644 index 00000000..7a0c07d0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/61/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/62/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/62/MultipleContracts/C.sol new file mode 100644 index 00000000..d73584b8 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/62/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/63/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/63/MultipleContracts/C.sol new file mode 100644 index 00000000..c226dcfd --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/63/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/64/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/64/MultipleContracts/C.sol new file mode 100644 index 00000000..c6022ee9 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/64/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json index 56d595e5..a6e11d59 100644 --- a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json @@ -4,419 +4,639 @@ "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "1", "name": "mutants/1/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return a + b", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "2" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "a[0] = msg.sender", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return a", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "11" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "27", "name": "mutants/27/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "Utils.getarray(b, address(this))", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return c + d", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return a + b", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "2" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "a[0] = msg.sender", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return a", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "11" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "51", "name": "mutants/51/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "52", "name": "mutants/52/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "53", "name": "mutants/53/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "54", "name": "mutants/54/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "55", "name": "mutants/55/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "56", "name": "mutants/56/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "57", "name": "mutants/57/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "58", "name": "mutants/58/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "59", "name": "mutants/59/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "Utils.getarray(b, address(this))", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "60", "name": "mutants/60/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return c + d", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "61", + "name": "mutants/61/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "62", + "name": "mutants/62/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "63", + "name": "mutants/63/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "64", + "name": "mutants/64/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants.log b/resources/regressions/test_multiple_contracts_3.json/mutants.log index efff0a10..34c109e1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_3.json/mutants.log @@ -19,42 +19,46 @@ 19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ 20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% 21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -22,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -23,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -24,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 -25,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% -31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -32,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false -33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 -34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -40,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -41,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -45,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -53,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -54,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 -55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -60,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +22,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 +23,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 +24,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +25,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +26,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 +27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +33,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) +34,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false +35,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 +36,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) +37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 +42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) +44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 +45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) +46,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 +47,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +51,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +52,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) +54,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 +55,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 +56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +57,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +58,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 +59,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +60,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +61,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +62,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +63,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +64,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol index a4c6c970..f4904fd4 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return res; + return 0; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol index 781e87b1..e702ba43 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return res; + return 1; } - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol index 7749a0cb..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol @@ -25,9 +25,9 @@ contract C { return res; } - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); + assert(true); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol index a14e05da..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol @@ -25,14 +25,14 @@ contract C { return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol index 4887a934..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(c[1] == e); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol index 7a0c07d0..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol index d73584b8..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol index c226dcfd..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol index c6022ee9..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol index 5f69007a..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol @@ -3,9 +3,8 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(true); + assert(c[0] == e); } function add(int8 a, int8 b) public pure returns (int8) { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol index ecdc98c4..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol @@ -3,9 +3,8 @@ pragma solidity ^0.8.13; library Utils { - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(false); + assert(c[0] == e); } function add(int8 a, int8 b) public pure returns (int8) { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol index e9466e07..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.13; library Utils { - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[1] == e); + assert(true); } function add(int8 a, int8 b) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol index f7a48737..ecdc98c4 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - assert(true); + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol index 9e5f617a..e9466e07 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(c[1] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol index 86125329..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol index e85ef12c..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a - b; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol index b32909ed..86125329 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a * b; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol index f9a5de25..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a / b; } } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol index 16f8bc88..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a % b; } } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); + address[] memory a = new address[](1); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol index 427647a6..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); + address[] memory a = new address[](0); + a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol index 9db93f13..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - a[1] = msg.sender; + address[] memory a = new address[](2); + a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol index a9342ea1..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol @@ -14,10 +14,10 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` - a[0] = msg.sender; assert(true); + return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol index f2136ed3..9db93f13 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol @@ -14,14 +14,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[0] = msg.sender; + a[1] = msg.sender; return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol index f69e3360..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol @@ -15,13 +15,13 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - return a; + assert(true); } - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; + uint256 a = 10; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol index 13319cbe..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a + decimals; + uint256 a = 0; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol index 3279b41e..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; + uint256 a = 11; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol index 95cc94e7..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a * decimals; + uint256 res = a + decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol index cc3476f1..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; + uint256 res = a - decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol index 4979f42e..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a * decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol index 5933d066..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol @@ -20,10 +20,10 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); + uint256 res = a / decimals; + return res; } function getarray(address[] memory c, address e) public pure { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol index a4c6c970..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol @@ -20,14 +20,14 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a % decimals; return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol index 781e87b1..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; - return res; + assert(true); } - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol index 7749a0cb..f4904fd4 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return res; + return 0; } - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol index a14e05da..e702ba43 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol @@ -21,8 +21,9 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return res; + return 1; } function getarray(address[] memory c, address e) public pure { @@ -30,9 +31,8 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol index 4887a934..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol index 7a0c07d0..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol index d73584b8..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(c[1] == e); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol index c226dcfd..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol index c6022ee9..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/61/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/61/MultipleContracts/C.sol new file mode 100644 index 00000000..7a0c07d0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/61/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/62/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/62/MultipleContracts/C.sol new file mode 100644 index 00000000..d73584b8 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/62/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/63/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/63/MultipleContracts/C.sol new file mode 100644 index 00000000..c226dcfd --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/63/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/64/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/64/MultipleContracts/C.sol new file mode 100644 index 00000000..c6022ee9 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/64/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json index 9a623121..df026e60 100644 --- a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json @@ -1,184 +1,382 @@ [ { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "1", "name": "mutants/1/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "true" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "true" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "19", "name": "mutants/19/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "20", "name": "mutants/20/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "true" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "21", "name": "mutants/21/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "22", "name": "mutants/22/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "23", "name": "mutants/23/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "24", "name": "mutants/24/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "25", "name": "mutants/25/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "26", "name": "mutants/26/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "+" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "27", + "name": "mutants/27/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "28", + "name": "mutants/28/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "29", + "name": "mutants/29/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "30", + "name": "mutants/30/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "31", + "name": "mutants/31/MultipleContracts/C.sol", + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "32", + "name": "mutants/32/MultipleContracts/C.sol", + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "33", + "name": "mutants/33/MultipleContracts/C.sol", + "op": "EVR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "true" + }, + { + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "id": "34", + "name": "mutants/34/MultipleContracts/C.sol", + "op": "EVR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "35", + "name": "mutants/35/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "36", + "name": "mutants/36/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "37", + "name": "mutants/37/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "38", + "name": "mutants/38/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants.log b/resources/regressions/test_multiple_contracts_4.json/mutants.log index 6bf4ccf9..97c4751e 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_4.json/mutants.log @@ -1,26 +1,38 @@ -1,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -2,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -3,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -4,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -9,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -10,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -11,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -12,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -13,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% -14,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -15,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -21,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -22,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -23,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -24,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -25,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -26,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +1,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,true +2,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false +3,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +4,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +9,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +10,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +11,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +12,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 +13,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 +14,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,true +15,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +20,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,true +21,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false +22,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- +23,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* +24,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ +25,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% +26,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ +27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- +28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% +31,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 +32,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 +33,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,true +34,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol index 9e5f617a..f1071c00 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol index 7a0c07d0..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a / decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol index d73584b8..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a % decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol index c226dcfd..f4904fd4 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol @@ -21,8 +21,9 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return res; + return 0; } function getarray(address[] memory c, address e) public pure { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol index c6022ee9..e702ba43 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol @@ -21,8 +21,9 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return res; + return 1; } function getarray(address[] memory c, address e) public pure { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol index 9e5f617a..564fa8e1 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a + b; } } @@ -26,8 +25,9 @@ contract C { return res; } + /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol index 86125329..d4d439fa 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + return a + b; } } @@ -26,8 +25,9 @@ contract C { return res; } + /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol index e85ef12c..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol index b32909ed..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol index 13319cbe..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol @@ -20,9 +20,8 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a + decimals; + uint256 res = a ** decimals; return res; } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol index 3279b41e..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol @@ -20,9 +20,8 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a - decimals; + uint256 res = a ** decimals; return res; } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol index 86125329..87a73488 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { + /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + return a + b; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol index 95cc94e7..f1071c00 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol @@ -3,8 +3,9 @@ pragma solidity ^0.8.13; library Utils { + /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(true); } function add(int8 a, int8 b) public pure returns (int8) { @@ -20,9 +21,8 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a * decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol index cc3476f1..87a73488 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol @@ -3,8 +3,9 @@ pragma solidity ^0.8.13; library Utils { + /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } function add(int8 a, int8 b) public pure returns (int8) { @@ -20,9 +21,8 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol index 4979f42e..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a - b; } } @@ -20,9 +21,8 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol index 7a0c07d0..86125329 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a * b; } } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol index d73584b8..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a / b; } } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol index c226dcfd..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a % b; } } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol index c6022ee9..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a + decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/27/MultipleContracts/C.sol new file mode 100644 index 00000000..3279b41e --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/27/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/28/MultipleContracts/C.sol new file mode 100644 index 00000000..95cc94e7 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/28/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/29/MultipleContracts/C.sol new file mode 100644 index 00000000..cc3476f1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/29/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol index e85ef12c..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a - b; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/30/MultipleContracts/C.sol new file mode 100644 index 00000000..4979f42e --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/30/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/31/MultipleContracts/C.sol new file mode 100644 index 00000000..f4904fd4 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/31/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` + uint256 res = a ** decimals; + return 0; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/32/MultipleContracts/C.sol new file mode 100644 index 00000000..e702ba43 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/32/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` + uint256 res = a ** decimals; + return 1; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/33/MultipleContracts/C.sol new file mode 100644 index 00000000..564fa8e1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/33/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/34/MultipleContracts/C.sol new file mode 100644 index 00000000..d4d439fa --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/34/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(false); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/35/MultipleContracts/C.sol new file mode 100644 index 00000000..7a0c07d0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/35/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/36/MultipleContracts/C.sol new file mode 100644 index 00000000..d73584b8 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/36/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/37/MultipleContracts/C.sol new file mode 100644 index 00000000..c226dcfd --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/37/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/38/MultipleContracts/C.sol new file mode 100644 index 00000000..c6022ee9 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/38/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol index b32909ed..86125329 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a * b; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol index 13319cbe..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a / b; } } @@ -20,9 +21,8 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a + decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol index 3279b41e..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a % b; } } @@ -20,9 +21,8 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a - decimals; + uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol index 95cc94e7..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a * decimals; + uint256 res = a + decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol index cc3476f1..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; + uint256 res = a - decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol index 4979f42e..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a * decimals; return res; } diff --git a/resources/regressions/test_multiple_files_1.json/gambit_results.json b/resources/regressions/test_multiple_files_1.json/gambit_results.json index 933ec731..05795c41 100644 --- a/resources/regressions/test_multiple_files_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_files_1.json/gambit_results.json @@ -4,398 +4,589 @@ "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "STD", + "orig": "return a + b", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "STD", + "orig": "return a - b", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "9", "name": "mutants/9/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "10", "name": "mutants/10/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "STD", + "orig": "return ((a)) * b", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "STD", + "orig": "return ((a)) * b", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "18", "name": "mutants/18/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "19", "name": "mutants/19/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "20", "name": "mutants/20/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "**" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "21", "name": "mutants/21/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ assert(true);\n }\n }\n", "id": "22", "name": "mutants/22/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "STD", + "orig": "return a ** b", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "23", "name": "mutants/23/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "24", "name": "mutants/24/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "25", "name": "mutants/25/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "26", "name": "mutants/26/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "27", "name": "mutants/27/Ops/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "28", "name": "mutants/28/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "29", "name": "mutants/29/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "30", "name": "mutants/30/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "31", "name": "mutants/31/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return a + b", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "32", "name": "mutants/32/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "33", "name": "mutants/33/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "34", "name": "mutants/34/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "35", "name": "mutants/35/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "36", "name": "mutants/36/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "37", "name": "mutants/37/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "2" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "38", "name": "mutants/38/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "a[0] = msg.sender", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "39", "name": "mutants/39/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "40", "name": "mutants/40/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return a", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "41", "name": "mutants/41/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "42", "name": "mutants/42/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "11" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "43", "name": "mutants/43/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "44", "name": "mutants/44/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "45", "name": "mutants/45/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "46", "name": "mutants/46/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "47", "name": "mutants/47/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "48", "name": "mutants/48/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "49", "name": "mutants/49/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "0" }, { - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "50", "name": "mutants/50/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "EVR", + "orig": "res", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "51", "name": "mutants/51/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "52", "name": "mutants/52/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "false" }, { - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "53", "name": "mutants/53/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "1" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "54", "name": "mutants/54/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "Utils.getarray(b, address(this))", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "55", "name": "mutants/55/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "STD", + "orig": "return c + d", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "56", "name": "mutants/56/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "57", "name": "mutants/57/MultipleContracts/C.sol", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "*" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "58", + "name": "mutants/58/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "/" + }, + { + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "59", + "name": "mutants/59/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "repl": "%" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_files_1.json/mutants.log b/resources/regressions/test_multiple_files_1.json/mutants.log index 0b0e4d7d..ff926312 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants.log +++ b/resources/regressions/test_multiple_files_1.json/mutants.log @@ -46,12 +46,14 @@ 46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ 47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% 48,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -49,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -50,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -51,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 -52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -54,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -55,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -56,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +49,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 +50,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 +51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) +52,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false +53,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 +54,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) +55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) +56,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- +57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* +58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ +59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% diff --git a/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol index a4c6c970..f4904fd4 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return res; + return 0; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol index 781e87b1..e702ba43 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; + /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return res; + return 1; } - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol index 7749a0cb..a4c6c970 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol @@ -25,9 +25,9 @@ contract C { return res; } - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); + assert(true); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol index a14e05da..781e87b1 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol @@ -25,14 +25,14 @@ contract C { return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol index 4887a934..7749a0cb 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol @@ -25,8 +25,9 @@ contract C { return res; } + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(c[1] == e); } function callmyself() external view { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c + d; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol index 7a0c07d0..a14e05da 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol index d73584b8..4887a934 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + assert(true); } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol index c226dcfd..7a0c07d0 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c - d; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol index c6022ee9..d73584b8 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c * d; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/58/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/58/MultipleContracts/C.sol new file mode 100644 index 00000000..c226dcfd --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/58/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/59/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/59/MultipleContracts/C.sol new file mode 100644 index 00000000..c6022ee9 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/59/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_no_export.json/gambit_results.json b/resources/regressions/test_no_export.json/gambit_results.json index 3f8d3784..3acbff95 100644 --- a/resources/regressions/test_no_export.json/gambit_results.json +++ b/resources/regressions/test_no_export.json/gambit_results.json @@ -4,195 +4,279 @@ "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "STD", + "orig": "return a + b", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "STD", + "orig": "return a - b", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "8", "name": "mutants/8/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "9", "name": "mutants/9/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "10", "name": "mutants/10/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "11", "name": "mutants/11/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "STD", + "orig": "return ((a)) * b", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "12", "name": "mutants/12/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "13", "name": "mutants/13/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "14", "name": "mutants/14/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "15", "name": "mutants/15/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "16", "name": "mutants/16/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "STD", + "orig": "return ((a)) * b", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "17", "name": "mutants/17/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "18", "name": "mutants/18/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "19", "name": "mutants/19/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "20", "name": "mutants/20/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "**" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "21", "name": "mutants/21/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ assert(true);\n }\n }\n", "id": "22", "name": "mutants/22/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "STD", + "orig": "return a ** b", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "23", "name": "mutants/23/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "24", "name": "mutants/24/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "25", "name": "mutants/25/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "26", "name": "mutants/26/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "27", "name": "mutants/27/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// StatementDeletion(`return a ^ b` |==> `assert(true)`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ assert(true);\n }\n }\n", "id": "28", "name": "mutants/28/BOR/BOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol" + "op": "STD", + "orig": "return a ^ b", + "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "repl": "assert(true)" } ] \ No newline at end of file diff --git a/resources/regressions/test_num_mutants.json/gambit_results.json b/resources/regressions/test_num_mutants.json/gambit_results.json index 503fc685..e16f5de7 100644 --- a/resources/regressions/test_num_mutants.json/gambit_results.json +++ b/resources/regressions/test_num_mutants.json/gambit_results.json @@ -4,34 +4,49 @@ "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "/" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "**" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" } ] \ No newline at end of file diff --git a/resources/regressions/test_seed.json/gambit_results.json b/resources/regressions/test_seed.json/gambit_results.json index 35715eaf..47adc18c 100644 --- a/resources/regressions/test_seed.json/gambit_results.json +++ b/resources/regressions/test_seed.json/gambit_results.json @@ -4,69 +4,99 @@ "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "1", "name": "mutants/1/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "*" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "2", "name": "mutants/2/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "-", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "3", "name": "mutants/3/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "4", "name": "mutants/4/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "5", "name": "mutants/5/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "6", "name": "mutants/6/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "7", "name": "mutants/7/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "STD", + "orig": "return a - b", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "assert(true)" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "8", "name": "mutants/8/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "%" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "9", "name": "mutants/9/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "*", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "-" }, { "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "10", "name": "mutants/10/AOR/AOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol" + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "repl": "+" } ] \ No newline at end of file diff --git a/resources/regressions/uor.json/gambit_results.json b/resources/regressions/uor.json/gambit_results.json index 735a1b4f..f4a69620 100644 --- a/resources/regressions/uor.json/gambit_results.json +++ b/resources/regressions/uor.json/gambit_results.json @@ -4,13 +4,19 @@ "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", "id": "1", "name": "mutants/1/Ops/UOR/UOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" + "op": "UOR", + "orig": "~", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "repl": " - " }, { "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", "id": "2", "name": "mutants/2/Ops/UOR/UOR.sol", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol" + "op": "UOR", + "orig": "~", + "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "repl": " ~ " } ] \ No newline at end of file diff --git a/src/cli.rs b/src/cli.rs index 4ab0df64..70075948 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -220,10 +220,17 @@ pub enum Command { pub struct SummaryParams { /// Print summaries of the specified mutant IDs (these IDs correspond to the /// "id" field in `gambit_results.json`). Multiple MIDs can be specified. - /// If `--all` is specified, this is ignored. - #[arg(long, default_value = None, num_args(0..))] + #[arg(long, default_value = None, num_args(0..), conflicts_with = "all_mids")] pub mids: Option>, + /// Print a summary of all MIDs + #[arg(long, conflicts_with = "mids")] + pub print_all_mids: bool, + + /// Print a short version of each mutant + #[arg(long, short = 's')] + pub short: bool, + /// Gambit results directory #[arg(long, default_value = crate::DEFAULT_GAMBIT_OUTPUT_DIRECTORY)] pub mutation_directory: String, diff --git a/src/mutant_writer.rs b/src/mutant_writer.rs index 96df855e..468cd14a 100644 --- a/src/mutant_writer.rs +++ b/src/mutant_writer.rs @@ -78,9 +78,12 @@ impl MutantWriter { json.push(serde_json::json!({ "name": Self::get_mutant_filename(&PathBuf::from("mutants"), mid, mutant), "description": mutant.op.to_string(), + "op": mutant.op.short_name(), "id": mid.to_string(), "diff": diff, "original": mutant.path(), + "orig": &mutant.orig, + "repl": &mutant.repl, })); } diff --git a/src/mutation.rs b/src/mutation.rs index a43cfedc..aa96f3f2 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -255,7 +255,7 @@ impl ToString for MutationType { MutationType::LogicalOperatorReplacement => "LogicalOperatorReplacement", MutationType::ShiftOperatorReplacement => "ShiftOperatorReplacement", MutationType::UnaryOperatorReplacement => "UnaryOperatorReplacement", - MutationType::ExpressionValueReplacement => "ExpressionOperatorReplacement", + MutationType::ExpressionValueReplacement => "ExpressionValueReplacement", MutationType::StatementDeletion => "StatementDeletion", MutationType::ElimDelegateCall => "ElimDelegateCall", @@ -276,7 +276,6 @@ impl Mutation for MutationType { let contents = resolver.get_contents_of_file_no(file_no).unwrap(); let loc = stmt.loc(); if let None = loc.try_file_no() { - println!("No file"); return vec![]; } match self { @@ -336,6 +335,9 @@ impl MutationType { .to_string() } + /// Perform actual mutation. Expects a `mutator` and and `expr`, as well + /// as a `bool` telling us if we should be performing fallback mutations + /// or regular mutations fn _mutate_expression_helper( &self, mutator: &Mutator, @@ -1027,7 +1029,6 @@ fn expression_value_replacement( source: &Arc, ) -> Vec { // TODO: implement - println!("Running EVR on {:?} ", expr); let replacements = match expr { Expression::Add { ty, .. } | Expression::Subtract { ty, .. } @@ -1048,10 +1049,7 @@ fn expression_value_replacement( | Expression::Negate { ty, .. } | Expression::ConditionalOperator { ty, .. } | Expression::StorageLoad { ty, .. } => defaults_by_type(ty), - Expression::Variable { ty, .. } => { - println!("Visiting variable {:?}", expr); - defaults_by_type(ty) - } + Expression::Variable { ty, .. } => defaults_by_type(ty), Expression::ZeroExt { to, .. } | Expression::Cast { to, .. } diff --git a/src/mutator.rs b/src/mutator.rs index 75f5c155..27a17fe7 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -332,9 +332,7 @@ impl Mutator { pub fn apply_fallback_operators_to_expression(&mut self, expr: &Expression) { if let Some(_) = expr.loc().try_file_no() { let mut mutants = vec![]; - println!("YOYOYO "); for op in self.fallback_mutation_operators() { - println!("Fallback op: {:?}", op); mutants.append(&mut op.mutate_expression_fallback(self, expr)); } self.mutants.append(&mut mutants); @@ -380,13 +378,7 @@ pub fn mutate_statement(statement: &Statement, mutator: &mut Mutator) -> bool { } Statement::While(_, _, c, _) => { c.recurse(mutator, mutate_expression); - println!( - "While: {}, {}", - num_mutants_before_expr_mutate, - mutator.mutants.len() - ); if mutator.mutants.len() == num_mutants_before_expr_mutate { - println!("HELLO"); perform_fallback_mutations(c, mutator); } true diff --git a/src/summary.rs b/src/summary.rs index acf32a79..11f51ddb 100644 --- a/src/summary.rs +++ b/src/summary.rs @@ -1,9 +1,31 @@ -use std::{collections::HashSet, error, path::PathBuf}; +use std::{ + collections::{HashMap, HashSet}, + error, + path::PathBuf, +}; use serde_json::Value; use crate::SummaryParams; +struct MutantSummaryEntry { + mid: String, + name: String, + diff: String, + op_long: String, + op_short: String, +} + +/// How should summary operate? +pub enum SummaryMode { + /// Print high level stats and exit + PrintStatistics, + /// Print MIDs specified by `--mids` flag + PrintSomeMids(Vec), + /// Print All MIDs + PrintAllMids, +} + /// Summarize an existing mutation run (see the [SummaryParams][SummaryParams] /// struct for detailed documentation) /// @@ -11,6 +33,14 @@ use crate::SummaryParams; pub fn summarize(params: SummaryParams) -> Result<(), Box> { let mutation_dir = PathBuf::from(params.mutation_directory); let gambit_results_json_path = mutation_dir.join("gambit_results.json"); + let short = params.short; + let summary_mode = if let Some(mids) = params.mids { + SummaryMode::PrintSomeMids(mids.clone()) + } else if params.print_all_mids { + SummaryMode::PrintAllMids + } else { + SummaryMode::PrintStatistics + }; if !&mutation_dir.is_dir() { log::error!("Missing mutation directory: `{}`", mutation_dir.display()); @@ -51,27 +81,28 @@ pub fn summarize(params: SummaryParams) -> Result<(), Box> { std::process::exit(1); } let v = v.as_array().unwrap(); - match params.mids { - Some(mids) => { + let mutant_summary_entries = v + .iter() + .enumerate() + .map(|(i, m)| get_mutant_summary(i, m)) + .collect::>>(); + match summary_mode { + SummaryMode::PrintStatistics => print_statistics(&mutant_summary_entries), + SummaryMode::PrintSomeMids(mids) => { + // Make as a set for fast lookup let mids: HashSet = HashSet::from_iter(mids.iter().cloned()); - for (i, value) in v.iter().enumerate() { - let mid = value - .as_object() - .expect("Expected an object") - .get("id") - .expect("Expected mutant to have `id` field") - .as_str() - .expect("Expected `id` field to be a string") - .to_string(); - if mids.contains(&mid) { - print_mutant_summary(i, value); + for (_, m) in mutant_summary_entries.iter().enumerate() { + if let Some(e) = m { + if mids.contains(&e.mid) { + print_mutant_summary(&m, short); + } } } } - None => { - v.iter().enumerate().for_each(|(i, m)| { - print_mutant_summary(i, m); - }); + SummaryMode::PrintAllMids => { + for m in mutant_summary_entries { + print_mutant_summary(&m, short) + } } } } @@ -80,19 +111,8 @@ pub fn summarize(params: SummaryParams) -> Result<(), Box> { Ok(()) } -/// Print a mutant summary, or a warning if a value is poorly formed. -/// -/// # Arguments -/// -/// * `i` - the index of the mutated JSON in the `gambit_results.json`. This is -/// used for debug purposes -/// * `mutant_json` - the JSON object from `gambit_results.json` that we are -/// going to summarize. This must have the following keys: -/// - `"id"`: this must map to an integer value -/// - `"diff"`: this must map to a string value -/// - `"name"`: this must map to a string value -/// - `"description"`: this must map to a string value -fn print_mutant_summary(i: usize, mutant_json: &Value) { +/// Get the `MutantSummary` associated with id `i` +fn get_mutant_summary(i: usize, mutant_json: &Value) -> Option { let missing_field_msg = |field_name: &str, i: usize, json: &Value| { format!( "Missing `\"{}\"` field in entry {} of JSON: {}", @@ -115,29 +135,93 @@ fn print_mutant_summary(i: usize, mutant_json: &Value) { .unwrap_or_else(|| panic!("{}", missing_field_msg("name", i, mutant_json))) .as_str() .expect("`name` field should be a string"); - let desc = m + let op_long = m .get("description") .unwrap_or_else(|| panic!("{}", missing_field_msg("description", i, mutant_json))) .as_str() .expect("`description` field should be as string"); + let op_short = m + .get("op") + .unwrap_or_else(|| panic!("{}", missing_field_msg("description", i, mutant_json))) + .as_str() + .expect("`description` field should be as string"); + return Some(MutantSummaryEntry { + mid: mid.to_string(), + name: name.to_string(), + diff: diff.to_string(), + op_long: op_long.to_string(), + op_short: op_short.to_string(), + }); + } else { + log::warn!( + "Expected an object at entry {} but found {}", + i, + mutant_json + ); + } + return None; +} +/// Print a mutant summary, or a warning if a value is poorly formed. +/// +/// # Arguments +/// +/// * `i` - the index of the mutated JSON in the `gambit_results.json`. This is +/// used for debug purposes +/// * `mutant_json` - the JSON object from `gambit_results.json` that we are +/// going to summarize. This must have the following keys: +/// - `"id"`: this must map to an integer value +/// - `"diff"`: this must map to a string value +/// - `"name"`: this must map to a string value +/// - `"description"`: this must map to a string value +fn print_mutant_summary(mutant_summary: &Option, short: bool) { + if short { + print_short_mutant_summary(mutant_summary); + } else { + print_long_mutant_summary(mutant_summary); + } +} + +fn print_short_mutant_summary(mutant_summary: &Option) { + if let Some(summary) = mutant_summary { + println!("{}: {}: {}", summary.mid, summary.name, summary.op_long) + } +} + +fn print_long_mutant_summary(mutant_summary: &Option) { + if let Some(s) = mutant_summary { println!( "\n\n === {}: {} [{}] ===\n", ansi_term::Color::Blue.bold().paint("Mutant ID"), - ansi_term::Style::new().bold().paint(mid.to_string()), - ansi_term::Style::new().paint(desc) + ansi_term::Style::new().bold().paint(&s.mid), + ansi_term::Style::new().paint(&s.op_long) ); - crate::util::print_colorized_unified_diff(diff.to_string()); + crate::util::print_colorized_unified_diff(s.diff.clone()); println!( "\n{}: {}", ansi_term::Style::new().bold().paint("Path"), - name + s.name ); - } else { - log::warn!( - "Expected an object at entry {} but found {}", - i, - mutant_json + } +} + +fn print_statistics(summaries: &Vec>) { + let mut op_freq: HashMap = HashMap::new(); + let total_mutants = summaries.iter().filter(|s| s.is_some()).count(); + for summary in summaries { + if let Some(summary) = summary { + let op = summary.op_short.clone(); + op_freq.insert(op.clone(), op_freq.get(&op).unwrap_or(&0) + 1); + } + } + for (op, freq) in op_freq.iter() { + println!( + "{}: {:6} ({:>6.2}%)", + op, + freq, + 100.0 * (*freq as f64) / (total_mutants as f64) ); } + println!("---------------------"); + println!("TOT: {:6} (100.00%)", total_mutants,); } From fd110fd953a8558d0cbba76cce9b6a7027b1e011 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 5 Aug 2023 15:34:59 -0700 Subject: [PATCH 086/200] Improvements to summary --- src/cli.rs | 6 +++--- src/summary.rs | 35 +++++++++++++++++++++++++++++------ 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 70075948..59db751e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -220,11 +220,11 @@ pub enum Command { pub struct SummaryParams { /// Print summaries of the specified mutant IDs (these IDs correspond to the /// "id" field in `gambit_results.json`). Multiple MIDs can be specified. - #[arg(long, default_value = None, num_args(0..), conflicts_with = "all_mids")] + #[arg(long, short='M', default_value = None, num_args(0..), conflicts_with = "all_mids")] pub mids: Option>, /// Print a summary of all MIDs - #[arg(long, conflicts_with = "mids")] + #[arg(long = "all", short = 'a', conflicts_with = "mids")] pub print_all_mids: bool, /// Print a short version of each mutant @@ -232,6 +232,6 @@ pub struct SummaryParams { pub short: bool, /// Gambit results directory - #[arg(long, default_value = crate::DEFAULT_GAMBIT_OUTPUT_DIRECTORY)] + #[arg(long, short='D', default_value = crate::DEFAULT_GAMBIT_OUTPUT_DIRECTORY)] pub mutation_directory: String, } diff --git a/src/summary.rs b/src/summary.rs index 11f51ddb..20738ff9 100644 --- a/src/summary.rs +++ b/src/summary.rs @@ -10,10 +10,12 @@ use crate::SummaryParams; struct MutantSummaryEntry { mid: String, - name: String, + mutant_export_location: String, diff: String, op_long: String, op_short: String, + orig: String, + repl: String, } /// How should summary operate? @@ -142,15 +144,27 @@ fn get_mutant_summary(i: usize, mutant_json: &Value) -> Option, short: bool fn print_short_mutant_summary(mutant_summary: &Option) { if let Some(summary) = mutant_summary { - println!("{}: {}: {}", summary.mid, summary.name, summary.op_long) + println!( + "({}) {} ({}) {} -> {}", + ansi_term::Style::new().bold().paint(&summary.mid), + ansi_term::Color::Blue.bold().paint(&summary.op_short), + ansi_term::Style::new() + .italic() + .paint(&summary.mutant_export_location), + ansi_term::Color::Green.paint(&summary.orig), + ansi_term::Color::Red.bold().paint(&summary.repl), + ) } } @@ -200,7 +223,7 @@ fn print_long_mutant_summary(mutant_summary: &Option) { println!( "\n{}: {}", ansi_term::Style::new().bold().paint("Path"), - s.name + s.mutant_export_location ); } } From 76f934ddb849de5a6682935287da3a99ee12603a Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 5 Aug 2023 16:42:29 -0700 Subject: [PATCH 087/200] Fix line/col bug and report in gambit_results.json --- src/mutant_writer.rs | 4 +++- src/mutation.rs | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/mutant_writer.rs b/src/mutant_writer.rs index 468cd14a..1ac94e37 100644 --- a/src/mutant_writer.rs +++ b/src/mutant_writer.rs @@ -51,7 +51,7 @@ impl MutantWriter { for (i, (mutant, _)) in mutants.iter().enumerate() { let mid = i + 1; let (lineno, colno) = mutant.get_line_column(); - let line_col = format!("{}:{}", lineno, colno); + let line_col = format!("{}:{}", lineno + 1, colno + 1); w.write_record([ mid.to_string().as_str(), mutant.op.short_name().as_str(), @@ -84,6 +84,8 @@ impl MutantWriter { "original": mutant.path(), "orig": &mutant.orig, "repl": &mutant.repl, + "line": &mutant.get_line_column().0 + 1, + "col": &mutant.get_line_column().1 + 1 })); } diff --git a/src/mutation.rs b/src/mutation.rs index aa96f3f2..0ba52af2 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -23,9 +23,9 @@ use std::{ pub struct MutantLoc { /// The location of the node that is mutated pub loc: Loc, - /// The (starting) line number of the mode being mutated + /// The (starting) line number of the mode being mutated 0-indexed pub line_no: usize, - /// The column number of the node being mutated + /// The column number of the node being mutated 0-indexed pub col_no: usize, /// The full path to the original source file pub path: PathBuf, @@ -48,7 +48,7 @@ impl Debug for MutantLoc { impl MutantLoc { pub fn new(loc: Loc, resolver: &FileResolver, namespace: Rc) -> MutantLoc { let file = namespace.files.get(loc.file_no()).unwrap(); - let (_, line_no, col_no, _) = resolver.get_line_and_offset_from_loc(file, &loc); + let (line_no, col_no) = file.offset_to_line_column(loc.start()); let path = file.path.clone(); let import_path = get_import_path( resolver, @@ -69,8 +69,8 @@ impl MutantLoc { MutantLoc { loc, - line_no, - col_no, + line_no: line_no, + col_no: col_no, path, sol_path: Some(sol_path), } From 6d76c025f0403ed89c7b6d4fcc2217b9265ea9e2 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 5 Aug 2023 16:42:39 -0700 Subject: [PATCH 088/200] Regenerate regressions --- .../all_ops.json/gambit_results.json | 178 ++++++++++++++++++ .../regressions/all_ops.json/mutants.log | 178 +++++++++--------- .../regressions/aor.json/gambit_results.json | 44 +++++ resources/regressions/aor.json/mutants.log | 44 ++--- .../regressions/bor.json/gambit_results.json | 6 + resources/regressions/bor.json/mutants.log | 6 +- .../regressions/edc.json/gambit_results.json | 6 + resources/regressions/edc.json/mutants.log | 6 +- .../regressions/evr.json/gambit_results.json | 28 +++ resources/regressions/evr.json/mutants.log | 28 +-- .../regressions/lor.json/gambit_results.json | 18 ++ resources/regressions/lor.json/mutants.log | 18 +- .../regressions/lvr.json/gambit_results.json | 48 +++++ resources/regressions/lvr.json/mutants.log | 48 ++--- .../regressions/ror.json/gambit_results.json | 52 +++++ resources/regressions/ror.json/mutants.log | 52 ++--- .../test_import_map.json/gambit_results.json | 8 + .../test_import_map.json/mutants.log | 8 +- .../test_log_invalid.json/gambit_results.json | 178 ++++++++++++++++++ .../test_log_invalid.json/invalid.log | 2 +- .../test_log_invalid.json/mutants.log | 178 +++++++++--------- .../gambit_results.json | 128 +++++++++++++ .../mutants.log | 128 ++++++------- .../gambit_results.json | 128 +++++++++++++ .../mutants.log | 128 ++++++------- .../gambit_results.json | 128 +++++++++++++ .../mutants.log | 128 ++++++------- .../gambit_results.json | 76 ++++++++ .../mutants.log | 76 ++++---- .../gambit_results.json | 118 ++++++++++++ .../test_multiple_files_1.json/mutants.log | 118 ++++++------ .../test_no_export.json/gambit_results.json | 56 ++++++ .../test_no_export.json/mutants.log | 56 +++--- .../test_num_mutants.json/gambit_results.json | 10 + .../test_num_mutants.json/mutants.log | 10 +- .../test_seed.json/gambit_results.json | 20 ++ .../regressions/test_seed.json/mutants.log | 20 +- .../regressions/uor.json/gambit_results.json | 4 + resources/regressions/uor.json/mutants.log | 4 +- 39 files changed, 1852 insertions(+), 618 deletions(-) diff --git a/resources/regressions/all_ops.json/gambit_results.json b/resources/regressions/all_ops.json/gambit_results.json index 6ab76978..d7ba80a7 100644 --- a/resources/regressions/all_ops.json/gambit_results.json +++ b/resources/regressions/all_ops.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", + "line": 13, "name": "mutants/1/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -10,9 +12,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "2", + "line": 13, "name": "mutants/2/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -20,9 +24,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "3", + "line": 13, "name": "mutants/3/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -30,9 +36,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "4", + "line": 13, "name": "mutants/4/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -40,9 +48,11 @@ "repl": "%" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "5", + "line": 22, "name": "mutants/5/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -50,9 +60,11 @@ "repl": "+" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "6", + "line": 22, "name": "mutants/6/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -60,9 +72,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "7", + "line": 22, "name": "mutants/7/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -70,9 +84,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "8", + "line": 22, "name": "mutants/8/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -80,9 +96,11 @@ "repl": "%" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "9", + "line": 34, "name": "mutants/9/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -90,9 +108,11 @@ "repl": "+" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "10", + "line": 34, "name": "mutants/10/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -100,9 +120,11 @@ "repl": "-" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "11", + "line": 34, "name": "mutants/11/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -110,9 +132,11 @@ "repl": "/" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "12", + "line": 34, "name": "mutants/12/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -120,9 +144,11 @@ "repl": "%" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "13", + "line": 47, "name": "mutants/13/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -130,9 +156,11 @@ "repl": "+" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "14", + "line": 47, "name": "mutants/14/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -140,9 +168,11 @@ "repl": "-" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "15", + "line": 47, "name": "mutants/15/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -150,9 +180,11 @@ "repl": "/" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "16", + "line": 47, "name": "mutants/16/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -160,9 +192,11 @@ "repl": "**" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "17", + "line": 47, "name": "mutants/17/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -170,9 +204,11 @@ "repl": "%" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "18", + "line": 58, "name": "mutants/18/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -180,9 +216,11 @@ "repl": "+" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "19", + "line": 58, "name": "mutants/19/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -190,9 +228,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "20", + "line": 58, "name": "mutants/20/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -200,9 +240,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "21", + "line": 58, "name": "mutants/21/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -210,9 +252,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "22", + "line": 58, "name": "mutants/22/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -220,9 +264,11 @@ "repl": "%" }, { + "col": 18, "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", "id": "23", + "line": 10, "name": "mutants/23/BOR/BOR.sol", "op": "BOR", "orig": "|", @@ -230,9 +276,11 @@ "repl": "&" }, { + "col": 18, "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", "id": "24", + "line": 16, "name": "mutants/24/BOR/BOR.sol", "op": "BOR", "orig": "&", @@ -240,9 +288,11 @@ "repl": "|" }, { + "col": 18, "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", "id": "25", + "line": 22, "name": "mutants/25/BOR/BOR.sol", "op": "BOR", "orig": "^", @@ -250,9 +300,11 @@ "repl": "&" }, { + "col": 38, "description": "ElimDelegateCall", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", "id": "26", + "line": 16, "name": "mutants/26/EDC/EDC.sol", "op": "EDC", "orig": "delegatecall", @@ -260,9 +312,11 @@ "repl": "call" }, { + "col": 17, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(true, \"Delegatecall failed\");\n }\n }\n", "id": "27", + "line": 19, "name": "mutants/27/EDC/EDC.sol", "op": "EVR", "orig": "success", @@ -270,9 +324,11 @@ "repl": "true" }, { + "col": 17, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(false, \"Delegatecall failed\");\n }\n }\n", "id": "28", + "line": 19, "name": "mutants/28/EDC/EDC.sol", "op": "EVR", "orig": "success", @@ -280,9 +336,11 @@ "repl": "false" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", "id": "29", + "line": 9, "name": "mutants/29/LOR/LOR.sol", "op": "LOR", "orig": "a && b", @@ -290,9 +348,11 @@ "repl": "a" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", "id": "30", + "line": 9, "name": "mutants/30/LOR/LOR.sol", "op": "LOR", "orig": "a && b", @@ -300,9 +360,11 @@ "repl": "b" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", "id": "31", + "line": 9, "name": "mutants/31/LOR/LOR.sol", "op": "LOR", "orig": "a && b", @@ -310,9 +372,11 @@ "repl": "false" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "32", + "line": 14, "name": "mutants/32/LOR/LOR.sol", "op": "LOR", "orig": "a || b", @@ -320,9 +384,11 @@ "repl": "a" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "33", + "line": 14, "name": "mutants/33/LOR/LOR.sol", "op": "LOR", "orig": "a || b", @@ -330,9 +396,11 @@ "repl": "b" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "34", + "line": 14, "name": "mutants/34/LOR/LOR.sol", "op": "LOR", "orig": "a || b", @@ -340,9 +408,11 @@ "repl": "true" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", "id": "35", + "line": 19, "name": "mutants/35/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", @@ -350,9 +420,11 @@ "repl": "x < y" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", "id": "36", + "line": 19, "name": "mutants/36/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", @@ -360,9 +432,11 @@ "repl": "a != (x >= y)" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", "id": "37", + "line": 19, "name": "mutants/37/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", @@ -370,9 +444,11 @@ "repl": "true" }, { + "col": 24, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", "id": "38", + "line": 15, "name": "mutants/38/LVR/LVR.sol", "op": "LVR", "orig": "0", @@ -380,9 +456,11 @@ "repl": "1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 0;\n }\n \n // Expect 2 mutant: 0, 2\n", "id": "39", + "line": 16, "name": "mutants/39/LVR/LVR.sol", "op": "EVR", "orig": "zero", @@ -390,9 +468,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 1;\n }\n \n // Expect 2 mutant: 0, 2\n", "id": "40", + "line": 16, "name": "mutants/40/LVR/LVR.sol", "op": "EVR", "orig": "zero", @@ -400,9 +480,11 @@ "repl": "1" }, { + "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", "id": "41", + "line": 21, "name": "mutants/41/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -410,9 +492,11 @@ "repl": "0" }, { + "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", "id": "42", + "line": 21, "name": "mutants/42/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -420,9 +504,11 @@ "repl": "2" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 0;\n }\n \n // Expect 2 mutants: 0, 1\n", "id": "43", + "line": 22, "name": "mutants/43/LVR/LVR.sol", "op": "EVR", "orig": "one", @@ -430,9 +516,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 1;\n }\n \n // Expect 2 mutants: 0, 1\n", "id": "44", + "line": 22, "name": "mutants/44/LVR/LVR.sol", "op": "EVR", "orig": "one", @@ -440,9 +528,11 @@ "repl": "1" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "45", + "line": 27, "name": "mutants/45/LVR/LVR.sol", "op": "LVR", "orig": "-1", @@ -450,9 +540,11 @@ "repl": "0" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", "id": "46", + "line": 27, "name": "mutants/46/LVR/LVR.sol", "op": "LVR", "orig": "-1", @@ -460,9 +552,11 @@ "repl": "1" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", "id": "47", + "line": 27, "name": "mutants/47/LVR/LVR.sol", "op": "LVR", "orig": "-1", @@ -470,9 +564,11 @@ "repl": "-2" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 0\n", "id": "48", + "line": 28, "name": "mutants/48/LVR/LVR.sol", "op": "EVR", "orig": "neg_one", @@ -480,9 +576,11 @@ "repl": "-1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 0\n", "id": "49", + "line": 28, "name": "mutants/49/LVR/LVR.sol", "op": "EVR", "orig": "neg_one", @@ -490,9 +588,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 0\n", "id": "50", + "line": 28, "name": "mutants/50/LVR/LVR.sol", "op": "EVR", "orig": "neg_one", @@ -500,9 +600,11 @@ "repl": "1" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", "id": "51", + "line": 33, "name": "mutants/51/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -510,9 +612,11 @@ "repl": "0" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", "id": "52", + "line": 33, "name": "mutants/52/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -520,9 +624,11 @@ "repl": "-1" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", "id": "53", + "line": 33, "name": "mutants/53/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -530,9 +636,11 @@ "repl": "2" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 1\n", "id": "54", + "line": 34, "name": "mutants/54/LVR/LVR.sol", "op": "EVR", "orig": "pos_one", @@ -540,9 +648,11 @@ "repl": "-1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 1\n", "id": "55", + "line": 34, "name": "mutants/55/LVR/LVR.sol", "op": "EVR", "orig": "pos_one", @@ -550,9 +660,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 1\n", "id": "56", + "line": 34, "name": "mutants/56/LVR/LVR.sol", "op": "EVR", "orig": "pos_one", @@ -560,9 +672,11 @@ "repl": "1" }, { + "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", "id": "57", + "line": 39, "name": "mutants/57/LVR/LVR.sol", "op": "LVR", "orig": "0", @@ -570,9 +684,11 @@ "repl": "-1" }, { + "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", "id": "58", + "line": 39, "name": "mutants/58/LVR/LVR.sol", "op": "LVR", "orig": "0", @@ -580,9 +696,11 @@ "repl": "1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return -1;\n }\n }\n", "id": "59", + "line": 40, "name": "mutants/59/LVR/LVR.sol", "op": "EVR", "orig": "zero", @@ -590,9 +708,11 @@ "repl": "-1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 0;\n }\n }\n", "id": "60", + "line": 40, "name": "mutants/60/LVR/LVR.sol", "op": "EVR", "orig": "zero", @@ -600,9 +720,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 1;\n }\n }\n", "id": "61", + "line": 40, "name": "mutants/61/LVR/LVR.sol", "op": "EVR", "orig": "zero", @@ -610,9 +732,11 @@ "repl": "1" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "62", + "line": 9, "name": "mutants/62/ROR/ROR.sol", "op": "ROR", "orig": "<", @@ -620,9 +744,11 @@ "repl": "<=" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "63", + "line": 9, "name": "mutants/63/ROR/ROR.sol", "op": "ROR", "orig": "<", @@ -630,9 +756,11 @@ "repl": "!=" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "64", + "line": 9, "name": "mutants/64/ROR/ROR.sol", "op": "ROR", "orig": "x < y", @@ -640,9 +768,11 @@ "repl": "false" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "65", + "line": 14, "name": "mutants/65/ROR/ROR.sol", "op": "ROR", "orig": "<=", @@ -650,9 +780,11 @@ "repl": "<" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "66", + "line": 14, "name": "mutants/66/ROR/ROR.sol", "op": "ROR", "orig": "<=", @@ -660,9 +792,11 @@ "repl": "==" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "67", + "line": 14, "name": "mutants/67/ROR/ROR.sol", "op": "ROR", "orig": "x <= y", @@ -670,9 +804,11 @@ "repl": "true" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "68", + "line": 19, "name": "mutants/68/ROR/ROR.sol", "op": "ROR", "orig": ">", @@ -680,9 +816,11 @@ "repl": ">=" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "69", + "line": 19, "name": "mutants/69/ROR/ROR.sol", "op": "ROR", "orig": ">", @@ -690,9 +828,11 @@ "repl": "!=" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "70", + "line": 19, "name": "mutants/70/ROR/ROR.sol", "op": "ROR", "orig": "x > y", @@ -700,9 +840,11 @@ "repl": "false" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "71", + "line": 24, "name": "mutants/71/ROR/ROR.sol", "op": "ROR", "orig": ">=", @@ -710,9 +852,11 @@ "repl": ">" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "72", + "line": 24, "name": "mutants/72/ROR/ROR.sol", "op": "ROR", "orig": ">=", @@ -720,9 +864,11 @@ "repl": "==" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "73", + "line": 24, "name": "mutants/73/ROR/ROR.sol", "op": "ROR", "orig": "x >= y", @@ -730,9 +876,11 @@ "repl": "true" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "74", + "line": 29, "name": "mutants/74/ROR/ROR.sol", "op": "ROR", "orig": "==", @@ -740,9 +888,11 @@ "repl": "<=" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "75", + "line": 29, "name": "mutants/75/ROR/ROR.sol", "op": "ROR", "orig": "==", @@ -750,9 +900,11 @@ "repl": ">=" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", "id": "76", + "line": 29, "name": "mutants/76/ROR/ROR.sol", "op": "ROR", "orig": "x == y", @@ -760,9 +912,11 @@ "repl": "false" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "77", + "line": 34, "name": "mutants/77/ROR/ROR.sol", "op": "ROR", "orig": "x == y", @@ -770,9 +924,11 @@ "repl": "false" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "78", + "line": 39, "name": "mutants/78/ROR/ROR.sol", "op": "ROR", "orig": "!=", @@ -780,9 +936,11 @@ "repl": "<" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "79", + "line": 39, "name": "mutants/79/ROR/ROR.sol", "op": "ROR", "orig": "!=", @@ -790,9 +948,11 @@ "repl": ">" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", "id": "80", + "line": 39, "name": "mutants/80/ROR/ROR.sol", "op": "ROR", "orig": "x != y", @@ -800,9 +960,11 @@ "repl": "true" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "81", + "line": 44, "name": "mutants/81/ROR/ROR.sol", "op": "ROR", "orig": "x != y", @@ -810,9 +972,11 @@ "repl": "true" }, { + "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "82", + "line": 53, "name": "mutants/82/ROR/ROR.sol", "op": "ROR", "orig": ">=", @@ -820,9 +984,11 @@ "repl": ">" }, { + "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "83", + "line": 53, "name": "mutants/83/ROR/ROR.sol", "op": "ROR", "orig": ">=", @@ -830,9 +996,11 @@ "repl": "==" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "84", + "line": 53, "name": "mutants/84/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) >= z", @@ -840,9 +1008,11 @@ "repl": "true" }, { + "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", "id": "85", + "line": 62, "name": "mutants/85/ROR/ROR.sol", "op": "ROR", "orig": "!=", @@ -850,9 +1020,11 @@ "repl": "<" }, { + "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", "id": "86", + "line": 62, "name": "mutants/86/ROR/ROR.sol", "op": "ROR", "orig": "!=", @@ -860,9 +1032,11 @@ "repl": ">" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", "id": "87", + "line": 62, "name": "mutants/87/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) != z", @@ -870,9 +1044,11 @@ "repl": "true" }, { + "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", "id": "88", + "line": 14, "name": "mutants/88/UOR/UOR.sol", "op": "UOR", "orig": "~", @@ -880,9 +1056,11 @@ "repl": " - " }, { + "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", "id": "89", + "line": 19, "name": "mutants/89/UOR/UOR.sol", "op": "UOR", "orig": "~", diff --git a/resources/regressions/all_ops.json/mutants.log b/resources/regressions/all_ops.json/mutants.log index 874f7998..98a98f96 100644 --- a/resources/regressions/all_ops.json/mutants.log +++ b/resources/regressions/all_ops.json/mutants.log @@ -1,89 +1,89 @@ -1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,- -2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,* -3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,/ -4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,% -5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,+ -6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,* -7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,/ -8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,% -9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,+ -10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,- -11,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,/ -12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,% -13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,+ -14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,- -15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,/ -16,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,** -17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,% -18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,+ -19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,- -20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,* -21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,/ -22,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,% -23,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,9:9,|,& -24,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,15:9,&,| -25,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,21:9,^,& -26,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,15:29,delegatecall,call -27,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,18:8,success,true -28,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,18:8,success,false -29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,a -30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,b -31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,false -32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,a -33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,b -34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,true -35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),x < y -36,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),a != (x >= y) -37,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),true -38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,14:15,0,1 -39,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:7,zero,0 -40,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:7,zero,1 -41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,0 -42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 -43,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:7,one,0 -44,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:7,one,1 -45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 -46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 -47,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,-2 -48,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,-1 -49,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,0 -50,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,1 -51,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 -52,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 -53,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 -54,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,-1 -55,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,0 -56,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,1 -57,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,-1 -58,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,1 -59,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,-1 -60,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,0 -61,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,1 -62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,<= -63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,!= -64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:7,x < y,false -65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,< -66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,== -67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:7,x <= y,true -68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,>= -69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,!= -70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:7,x > y,false -71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,> -72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,== -73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:7,x >= y,true -74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,<= -75,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,>= -76,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:7,x == y,false -77,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false -78,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< -79,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> -80,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true -81,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true -82,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> -83,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== -84,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true -85,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< -86,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> -87,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true -88,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,13:7,~, - -89,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,18:7,~, ~ +1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,- +2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,* +3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,/ +4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,% +5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,+ +6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,* +7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,/ +8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,% +9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,+ +10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,- +11,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,/ +12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,% +13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,+ +14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,- +15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,/ +16,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,** +17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,% +18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,+ +19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,- +20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,* +21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,/ +22,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,% +23,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,10:18,|,& +24,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,16:18,&,| +25,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,22:18,^,& +26,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,16:38,delegatecall,call +27,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,19:17,success,true +28,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,19:17,success,false +29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,a +30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,b +31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,false +32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,a +33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,b +34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,true +35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y +36,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) +37,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true +38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 +39,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,16:16,zero,0 +40,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,16:16,zero,1 +41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 +42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 +43,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,22:16,one,0 +44,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,22:16,one,1 +45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 +46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 +47,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 +48,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,-1 +49,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,0 +50,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,1 +51,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 +52,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 +53,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 +54,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,-1 +55,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,0 +56,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,1 +57,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 +58,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 +59,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,-1 +60,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,0 +61,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,1 +62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,<= +63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,!= +64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:16,x < y,false +65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,< +66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,== +67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:16,x <= y,true +68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,>= +69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,!= +70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:16,x > y,false +71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,> +72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,== +73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:16,x >= y,true +74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,<= +75,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,>= +76,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:16,x == y,false +77,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,34:16,x == y,false +78,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,< +79,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,> +80,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:16,x != y,true +81,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,44:16,x != y,true +82,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,> +83,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,== +84,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:16,(x + y) >= z,true +85,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,< +86,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,> +87,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:16,(x + y) != z,true +88,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~, - +89,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,~, ~ diff --git a/resources/regressions/aor.json/gambit_results.json b/resources/regressions/aor.json/gambit_results.json index 5f5305ea..dc1f2187 100644 --- a/resources/regressions/aor.json/gambit_results.json +++ b/resources/regressions/aor.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", + "line": 13, "name": "mutants/1/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -10,9 +12,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "2", + "line": 13, "name": "mutants/2/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -20,9 +24,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "3", + "line": 13, "name": "mutants/3/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -30,9 +36,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "4", + "line": 13, "name": "mutants/4/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -40,9 +48,11 @@ "repl": "%" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "5", + "line": 22, "name": "mutants/5/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -50,9 +60,11 @@ "repl": "+" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "6", + "line": 22, "name": "mutants/6/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -60,9 +72,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "7", + "line": 22, "name": "mutants/7/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -70,9 +84,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "8", + "line": 22, "name": "mutants/8/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -80,9 +96,11 @@ "repl": "%" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "9", + "line": 34, "name": "mutants/9/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -90,9 +108,11 @@ "repl": "+" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "10", + "line": 34, "name": "mutants/10/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -100,9 +120,11 @@ "repl": "-" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "11", + "line": 34, "name": "mutants/11/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -110,9 +132,11 @@ "repl": "/" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "12", + "line": 34, "name": "mutants/12/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -120,9 +144,11 @@ "repl": "%" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "13", + "line": 47, "name": "mutants/13/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -130,9 +156,11 @@ "repl": "+" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "14", + "line": 47, "name": "mutants/14/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -140,9 +168,11 @@ "repl": "-" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "15", + "line": 47, "name": "mutants/15/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -150,9 +180,11 @@ "repl": "/" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "16", + "line": 47, "name": "mutants/16/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -160,9 +192,11 @@ "repl": "**" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "17", + "line": 47, "name": "mutants/17/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -170,9 +204,11 @@ "repl": "%" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "18", + "line": 58, "name": "mutants/18/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -180,9 +216,11 @@ "repl": "+" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "19", + "line": 58, "name": "mutants/19/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -190,9 +228,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "20", + "line": 58, "name": "mutants/20/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -200,9 +240,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "21", + "line": 58, "name": "mutants/21/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -210,9 +252,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "22", + "line": 58, "name": "mutants/22/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", diff --git a/resources/regressions/aor.json/mutants.log b/resources/regressions/aor.json/mutants.log index ebb486f6..e0189e4f 100644 --- a/resources/regressions/aor.json/mutants.log +++ b/resources/regressions/aor.json/mutants.log @@ -1,22 +1,22 @@ -1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,- -2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,* -3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,/ -4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,% -5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,+ -6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,* -7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,/ -8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,% -9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,+ -10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,- -11,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,/ -12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,% -13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,+ -14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,- -15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,/ -16,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,** -17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,% -18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,+ -19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,- -20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,* -21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,/ -22,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,% +1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,- +2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,* +3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,/ +4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,% +5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,+ +6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,* +7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,/ +8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,% +9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,+ +10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,- +11,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,/ +12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,% +13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,+ +14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,- +15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,/ +16,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,** +17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,% +18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,+ +19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,- +20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,* +21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,/ +22,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,% diff --git a/resources/regressions/bor.json/gambit_results.json b/resources/regressions/bor.json/gambit_results.json index 355b3a0e..5819d92c 100644 --- a/resources/regressions/bor.json/gambit_results.json +++ b/resources/regressions/bor.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 18, "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", "id": "1", + "line": 10, "name": "mutants/1/Ops/BOR/BOR.sol", "op": "BOR", "orig": "|", @@ -10,9 +12,11 @@ "repl": "&" }, { + "col": 18, "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", "id": "2", + "line": 16, "name": "mutants/2/Ops/BOR/BOR.sol", "op": "BOR", "orig": "&", @@ -20,9 +24,11 @@ "repl": "|" }, { + "col": 18, "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", "id": "3", + "line": 22, "name": "mutants/3/Ops/BOR/BOR.sol", "op": "BOR", "orig": "^", diff --git a/resources/regressions/bor.json/mutants.log b/resources/regressions/bor.json/mutants.log index 7c82aad0..2dd23c44 100644 --- a/resources/regressions/bor.json/mutants.log +++ b/resources/regressions/bor.json/mutants.log @@ -1,3 +1,3 @@ -1,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,9:9,|,& -2,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,15:9,&,| -3,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,21:9,^,& +1,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,10:18,|,& +2,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,16:18,&,| +3,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,22:18,^,& diff --git a/resources/regressions/edc.json/gambit_results.json b/resources/regressions/edc.json/gambit_results.json index 5f4e24ca..4a48f116 100644 --- a/resources/regressions/edc.json/gambit_results.json +++ b/resources/regressions/edc.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 38, "description": "ElimDelegateCall", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", "id": "1", + "line": 16, "name": "mutants/1/Ops/EDC/EDC.sol", "op": "EDC", "orig": "delegatecall", @@ -10,9 +12,11 @@ "repl": "call" }, { + "col": 17, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(true, \"Delegatecall failed\");\n }\n }\n", "id": "2", + "line": 19, "name": "mutants/2/Ops/EDC/EDC.sol", "op": "EVR", "orig": "success", @@ -20,9 +24,11 @@ "repl": "true" }, { + "col": 17, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(false, \"Delegatecall failed\");\n }\n }\n", "id": "3", + "line": 19, "name": "mutants/3/Ops/EDC/EDC.sol", "op": "EVR", "orig": "success", diff --git a/resources/regressions/edc.json/mutants.log b/resources/regressions/edc.json/mutants.log index 7ee729a1..8a510a3b 100644 --- a/resources/regressions/edc.json/mutants.log +++ b/resources/regressions/edc.json/mutants.log @@ -1,3 +1,3 @@ -1,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,15:29,delegatecall,call -2,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,18:8,success,true -3,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,18:8,success,false +1,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,16:38,delegatecall,call +2,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,19:17,success,true +3,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,19:17,success,false diff --git a/resources/regressions/evr.json/gambit_results.json b/resources/regressions/evr.json/gambit_results.json index a66a801a..6f9e702d 100644 --- a/resources/regressions/evr.json/gambit_results.json +++ b/resources/regressions/evr.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -4,8 +4,9 @@\n \n // This contract provides test functions for relational operator replacement (ROR)\n contract EVR {\n+ /// ExpressionValueReplacement(`a + b` |==> `0`) of: `return a + b;`\n function add(uint256 a, uint256 b) public pure returns (uint256) {\n- return a + b;\n+ return 0;\n }\n \n function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) {\n", "id": "1", + "line": 8, "name": "mutants/1/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a + b", @@ -10,9 +12,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -4,8 +4,9 @@\n \n // This contract provides test functions for relational operator replacement (ROR)\n contract EVR {\n+ /// ExpressionValueReplacement(`a + b` |==> `1`) of: `return a + b;`\n function add(uint256 a, uint256 b) public pure returns (uint256) {\n- return a + b;\n+ return 1;\n }\n \n function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) {\n", "id": "2", + "line": 8, "name": "mutants/2/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a + b", @@ -20,9 +24,11 @@ "repl": "1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n }\n \n function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`result` |==> `0`) of: `return result;`\n uint256 result = add(a, b);\n- return result;\n+ return 0;\n }\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n", "id": "3", + "line": 13, "name": "mutants/3/Ops/EVR/EVR.sol", "op": "EVR", "orig": "result", @@ -30,9 +36,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n }\n \n function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`result` |==> `1`) of: `return result;`\n uint256 result = add(a, b);\n- return result;\n+ return 1;\n }\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n", "id": "4", + "line": 13, "name": "mutants/4/Ops/EVR/EVR.sol", "op": "EVR", "orig": "result", @@ -40,9 +48,11 @@ "repl": "1" }, { + "col": 18, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n return result;\n }\n \n+ /// ExpressionValueReplacement(`a < b` |==> `true`) of: `bool c = a < b;`\n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n- bool c = a < b;\n+ bool c = true;\n while (c) {\n b = b - a;\n c = a < b;\n", "id": "5", + "line": 17, "name": "mutants/5/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a < b", @@ -50,9 +60,11 @@ "repl": "true" }, { + "col": 18, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n return result;\n }\n \n+ /// ExpressionValueReplacement(`a < b` |==> `false`) of: `bool c = a < b;`\n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n- bool c = a < b;\n+ bool c = false;\n while (c) {\n b = b - a;\n c = a < b;\n", "id": "6", + "line": 17, "name": "mutants/6/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a < b", @@ -60,9 +72,11 @@ "repl": "false" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n }\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`c` |==> `true`) of: `while (c) {`\n bool c = a < b;\n- while (c) {\n+ while (true) {\n b = b - a;\n c = a < b;\n }\n", "id": "7", + "line": 18, "name": "mutants/7/Ops/EVR/EVR.sol", "op": "EVR", "orig": "c", @@ -70,9 +84,11 @@ "repl": "true" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n }\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`c` |==> `false`) of: `while (c) {`\n bool c = a < b;\n- while (c) {\n+ while (false) {\n b = b - a;\n c = a < b;\n }\n", "id": "8", + "line": 18, "name": "mutants/8/Ops/EVR/EVR.sol", "op": "EVR", "orig": "c", @@ -80,9 +96,11 @@ "repl": "false" }, { + "col": 17, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n bool c = a < b;\n+ /// ExpressionValueReplacement(`b - a` |==> `0`) of: `b = b - a;`\n while (c) {\n- b = b - a;\n+ b = 0;\n c = a < b;\n }\n return a - b;\n", "id": "9", + "line": 19, "name": "mutants/9/Ops/EVR/EVR.sol", "op": "EVR", "orig": "b - a", @@ -90,9 +108,11 @@ "repl": "0" }, { + "col": 17, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n bool c = a < b;\n+ /// ExpressionValueReplacement(`b - a` |==> `1`) of: `b = b - a;`\n while (c) {\n- b = b - a;\n+ b = 1;\n c = a < b;\n }\n return a - b;\n", "id": "10", + "line": 19, "name": "mutants/10/Ops/EVR/EVR.sol", "op": "EVR", "orig": "b - a", @@ -100,9 +120,11 @@ "repl": "1" }, { + "col": 17, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -16,8 +16,9 @@\n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n bool c = a < b;\n while (c) {\n+ /// ExpressionValueReplacement(`a < b` |==> `true`) of: `c = a < b;`\n b = b - a;\n- c = a < b;\n+ c = true;\n }\n return a - b;\n }\n", "id": "11", + "line": 20, "name": "mutants/11/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a < b", @@ -110,9 +132,11 @@ "repl": "true" }, { + "col": 17, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -16,8 +16,9 @@\n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n bool c = a < b;\n while (c) {\n+ /// ExpressionValueReplacement(`a < b` |==> `false`) of: `c = a < b;`\n b = b - a;\n- c = a < b;\n+ c = false;\n }\n return a - b;\n }\n", "id": "12", + "line": 20, "name": "mutants/12/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a < b", @@ -120,9 +144,11 @@ "repl": "false" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n while (c) {\n b = b - a;\n c = a < b;\n+ /// ExpressionValueReplacement(`a - b` |==> `0`) of: `return a - b;`\n }\n- return a - b;\n+ return 0;\n }\n }\n", "id": "13", + "line": 22, "name": "mutants/13/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a - b", @@ -130,9 +156,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n while (c) {\n b = b - a;\n c = a < b;\n+ /// ExpressionValueReplacement(`a - b` |==> `1`) of: `return a - b;`\n }\n- return a - b;\n+ return 1;\n }\n }\n", "id": "14", + "line": 22, "name": "mutants/14/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a - b", diff --git a/resources/regressions/evr.json/mutants.log b/resources/regressions/evr.json/mutants.log index 459ec989..e3601c96 100644 --- a/resources/regressions/evr.json/mutants.log +++ b/resources/regressions/evr.json/mutants.log @@ -1,14 +1,14 @@ -1,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,7:7,a + b,0 -2,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,7:7,a + b,1 -3,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,12:7,result,0 -4,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,12:7,result,1 -5,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,16:9,a < b,true -6,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,16:9,a < b,false -7,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,17:7,c,true -8,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,17:7,c,false -9,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,18:4,b - a,0 -10,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,18:4,b - a,1 -11,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,19:4,a < b,true -12,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,19:4,a < b,false -13,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,21:7,a - b,0 -14,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,21:7,a - b,1 +1,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,8:16,a + b,0 +2,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,8:16,a + b,1 +3,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,13:16,result,0 +4,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,13:16,result,1 +5,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,17:18,a < b,true +6,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,17:18,a < b,false +7,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,18:16,c,true +8,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,18:16,c,false +9,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,19:17,b - a,0 +10,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,19:17,b - a,1 +11,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,20:17,a < b,true +12,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,20:17,a < b,false +13,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,22:16,a - b,0 +14,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,22:16,a - b,1 diff --git a/resources/regressions/lor.json/gambit_results.json b/resources/regressions/lor.json/gambit_results.json index c5e75538..56abd64a 100644 --- a/resources/regressions/lor.json/gambit_results.json +++ b/resources/regressions/lor.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", "id": "1", + "line": 9, "name": "mutants/1/Ops/LOR/LOR.sol", "op": "LOR", "orig": "a && b", @@ -10,9 +12,11 @@ "repl": "a" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", "id": "2", + "line": 9, "name": "mutants/2/Ops/LOR/LOR.sol", "op": "LOR", "orig": "a && b", @@ -20,9 +24,11 @@ "repl": "b" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", "id": "3", + "line": 9, "name": "mutants/3/Ops/LOR/LOR.sol", "op": "LOR", "orig": "a && b", @@ -30,9 +36,11 @@ "repl": "false" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "4", + "line": 14, "name": "mutants/4/Ops/LOR/LOR.sol", "op": "LOR", "orig": "a || b", @@ -40,9 +48,11 @@ "repl": "a" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "5", + "line": 14, "name": "mutants/5/Ops/LOR/LOR.sol", "op": "LOR", "orig": "a || b", @@ -50,9 +60,11 @@ "repl": "b" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "6", + "line": 14, "name": "mutants/6/Ops/LOR/LOR.sol", "op": "LOR", "orig": "a || b", @@ -60,9 +72,11 @@ "repl": "true" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", "id": "7", + "line": 19, "name": "mutants/7/Ops/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", @@ -70,9 +84,11 @@ "repl": "x < y" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", "id": "8", + "line": 19, "name": "mutants/8/Ops/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", @@ -80,9 +96,11 @@ "repl": "a != (x >= y)" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", "id": "9", + "line": 19, "name": "mutants/9/Ops/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", diff --git a/resources/regressions/lor.json/mutants.log b/resources/regressions/lor.json/mutants.log index 1a5626b1..792279c0 100644 --- a/resources/regressions/lor.json/mutants.log +++ b/resources/regressions/lor.json/mutants.log @@ -1,9 +1,9 @@ -1,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,a -2,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,b -3,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,false -4,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,a -5,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,b -6,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,true -7,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),x < y -8,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),a != (x >= y) -9,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),true +1,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,a +2,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,b +3,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,false +4,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,a +5,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,b +6,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,true +7,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y +8,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) +9,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true diff --git a/resources/regressions/lvr.json/gambit_results.json b/resources/regressions/lvr.json/gambit_results.json index d5b51f82..58f88b93 100644 --- a/resources/regressions/lvr.json/gambit_results.json +++ b/resources/regressions/lvr.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 24, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", "id": "1", + "line": 15, "name": "mutants/1/Ops/LVR/LVR.sol", "op": "LVR", "orig": "0", @@ -10,9 +12,11 @@ "repl": "1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 0;\n }\n \n // Expect 2 mutant: 0, 2\n", "id": "2", + "line": 16, "name": "mutants/2/Ops/LVR/LVR.sol", "op": "EVR", "orig": "zero", @@ -20,9 +24,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 1;\n }\n \n // Expect 2 mutant: 0, 2\n", "id": "3", + "line": 16, "name": "mutants/3/Ops/LVR/LVR.sol", "op": "EVR", "orig": "zero", @@ -30,9 +36,11 @@ "repl": "1" }, { + "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", "id": "4", + "line": 21, "name": "mutants/4/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -40,9 +48,11 @@ "repl": "0" }, { + "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", "id": "5", + "line": 21, "name": "mutants/5/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -50,9 +60,11 @@ "repl": "2" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 0;\n }\n \n // Expect 2 mutants: 0, 1\n", "id": "6", + "line": 22, "name": "mutants/6/Ops/LVR/LVR.sol", "op": "EVR", "orig": "one", @@ -60,9 +72,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 1;\n }\n \n // Expect 2 mutants: 0, 1\n", "id": "7", + "line": 22, "name": "mutants/7/Ops/LVR/LVR.sol", "op": "EVR", "orig": "one", @@ -70,9 +84,11 @@ "repl": "1" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "8", + "line": 27, "name": "mutants/8/Ops/LVR/LVR.sol", "op": "LVR", "orig": "-1", @@ -80,9 +96,11 @@ "repl": "0" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", "id": "9", + "line": 27, "name": "mutants/9/Ops/LVR/LVR.sol", "op": "LVR", "orig": "-1", @@ -90,9 +108,11 @@ "repl": "1" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", "id": "10", + "line": 27, "name": "mutants/10/Ops/LVR/LVR.sol", "op": "LVR", "orig": "-1", @@ -100,9 +120,11 @@ "repl": "-2" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 0\n", "id": "11", + "line": 28, "name": "mutants/11/Ops/LVR/LVR.sol", "op": "EVR", "orig": "neg_one", @@ -110,9 +132,11 @@ "repl": "-1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 0\n", "id": "12", + "line": 28, "name": "mutants/12/Ops/LVR/LVR.sol", "op": "EVR", "orig": "neg_one", @@ -120,9 +144,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 0\n", "id": "13", + "line": 28, "name": "mutants/13/Ops/LVR/LVR.sol", "op": "EVR", "orig": "neg_one", @@ -130,9 +156,11 @@ "repl": "1" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", "id": "14", + "line": 33, "name": "mutants/14/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -140,9 +168,11 @@ "repl": "0" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", "id": "15", + "line": 33, "name": "mutants/15/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -150,9 +180,11 @@ "repl": "-1" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", "id": "16", + "line": 33, "name": "mutants/16/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -160,9 +192,11 @@ "repl": "2" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 1\n", "id": "17", + "line": 34, "name": "mutants/17/Ops/LVR/LVR.sol", "op": "EVR", "orig": "pos_one", @@ -170,9 +204,11 @@ "repl": "-1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 1\n", "id": "18", + "line": 34, "name": "mutants/18/Ops/LVR/LVR.sol", "op": "EVR", "orig": "pos_one", @@ -180,9 +216,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 1\n", "id": "19", + "line": 34, "name": "mutants/19/Ops/LVR/LVR.sol", "op": "EVR", "orig": "pos_one", @@ -190,9 +228,11 @@ "repl": "1" }, { + "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", "id": "20", + "line": 39, "name": "mutants/20/Ops/LVR/LVR.sol", "op": "LVR", "orig": "0", @@ -200,9 +240,11 @@ "repl": "-1" }, { + "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", "id": "21", + "line": 39, "name": "mutants/21/Ops/LVR/LVR.sol", "op": "LVR", "orig": "0", @@ -210,9 +252,11 @@ "repl": "1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return -1;\n }\n }\n", "id": "22", + "line": 40, "name": "mutants/22/Ops/LVR/LVR.sol", "op": "EVR", "orig": "zero", @@ -220,9 +264,11 @@ "repl": "-1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 0;\n }\n }\n", "id": "23", + "line": 40, "name": "mutants/23/Ops/LVR/LVR.sol", "op": "EVR", "orig": "zero", @@ -230,9 +276,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 1;\n }\n }\n", "id": "24", + "line": 40, "name": "mutants/24/Ops/LVR/LVR.sol", "op": "EVR", "orig": "zero", diff --git a/resources/regressions/lvr.json/mutants.log b/resources/regressions/lvr.json/mutants.log index ae7ae700..c6d63732 100644 --- a/resources/regressions/lvr.json/mutants.log +++ b/resources/regressions/lvr.json/mutants.log @@ -1,24 +1,24 @@ -1,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,14:15,0,1 -2,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:7,zero,0 -3,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:7,zero,1 -4,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,0 -5,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 -6,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:7,one,0 -7,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:7,one,1 -8,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 -9,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 -10,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,-2 -11,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,-1 -12,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,0 -13,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,1 -14,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 -15,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 -16,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 -17,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,-1 -18,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,0 -19,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,1 -20,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,-1 -21,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,1 -22,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,-1 -23,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,0 -24,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,1 +1,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 +2,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,16:16,zero,0 +3,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,16:16,zero,1 +4,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 +5,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 +6,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,22:16,one,0 +7,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,22:16,one,1 +8,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 +9,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 +10,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 +11,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,-1 +12,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,0 +13,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,1 +14,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 +15,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 +16,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 +17,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,-1 +18,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,0 +19,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,1 +20,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 +21,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 +22,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,-1 +23,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,0 +24,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,1 diff --git a/resources/regressions/ror.json/gambit_results.json b/resources/regressions/ror.json/gambit_results.json index 32645ef4..fe2c34c6 100644 --- a/resources/regressions/ror.json/gambit_results.json +++ b/resources/regressions/ror.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "1", + "line": 9, "name": "mutants/1/Ops/ROR/ROR.sol", "op": "ROR", "orig": "<", @@ -10,9 +12,11 @@ "repl": "<=" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "2", + "line": 9, "name": "mutants/2/Ops/ROR/ROR.sol", "op": "ROR", "orig": "<", @@ -20,9 +24,11 @@ "repl": "!=" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "3", + "line": 9, "name": "mutants/3/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x < y", @@ -30,9 +36,11 @@ "repl": "false" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "4", + "line": 14, "name": "mutants/4/Ops/ROR/ROR.sol", "op": "ROR", "orig": "<=", @@ -40,9 +48,11 @@ "repl": "<" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "5", + "line": 14, "name": "mutants/5/Ops/ROR/ROR.sol", "op": "ROR", "orig": "<=", @@ -50,9 +60,11 @@ "repl": "==" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "6", + "line": 14, "name": "mutants/6/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x <= y", @@ -60,9 +72,11 @@ "repl": "true" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "7", + "line": 19, "name": "mutants/7/Ops/ROR/ROR.sol", "op": "ROR", "orig": ">", @@ -70,9 +84,11 @@ "repl": ">=" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "8", + "line": 19, "name": "mutants/8/Ops/ROR/ROR.sol", "op": "ROR", "orig": ">", @@ -80,9 +96,11 @@ "repl": "!=" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "9", + "line": 19, "name": "mutants/9/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x > y", @@ -90,9 +108,11 @@ "repl": "false" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "10", + "line": 24, "name": "mutants/10/Ops/ROR/ROR.sol", "op": "ROR", "orig": ">=", @@ -100,9 +120,11 @@ "repl": ">" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "11", + "line": 24, "name": "mutants/11/Ops/ROR/ROR.sol", "op": "ROR", "orig": ">=", @@ -110,9 +132,11 @@ "repl": "==" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "12", + "line": 24, "name": "mutants/12/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x >= y", @@ -120,9 +144,11 @@ "repl": "true" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "13", + "line": 29, "name": "mutants/13/Ops/ROR/ROR.sol", "op": "ROR", "orig": "==", @@ -130,9 +156,11 @@ "repl": "<=" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "14", + "line": 29, "name": "mutants/14/Ops/ROR/ROR.sol", "op": "ROR", "orig": "==", @@ -140,9 +168,11 @@ "repl": ">=" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", "id": "15", + "line": 29, "name": "mutants/15/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x == y", @@ -150,9 +180,11 @@ "repl": "false" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "16", + "line": 34, "name": "mutants/16/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x == y", @@ -160,9 +192,11 @@ "repl": "false" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "17", + "line": 39, "name": "mutants/17/Ops/ROR/ROR.sol", "op": "ROR", "orig": "!=", @@ -170,9 +204,11 @@ "repl": "<" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "18", + "line": 39, "name": "mutants/18/Ops/ROR/ROR.sol", "op": "ROR", "orig": "!=", @@ -180,9 +216,11 @@ "repl": ">" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", "id": "19", + "line": 39, "name": "mutants/19/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x != y", @@ -190,9 +228,11 @@ "repl": "true" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "20", + "line": 44, "name": "mutants/20/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x != y", @@ -200,9 +240,11 @@ "repl": "true" }, { + "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "21", + "line": 53, "name": "mutants/21/Ops/ROR/ROR.sol", "op": "ROR", "orig": ">=", @@ -210,9 +252,11 @@ "repl": ">" }, { + "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "22", + "line": 53, "name": "mutants/22/Ops/ROR/ROR.sol", "op": "ROR", "orig": ">=", @@ -220,9 +264,11 @@ "repl": "==" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "23", + "line": 53, "name": "mutants/23/Ops/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) >= z", @@ -230,9 +276,11 @@ "repl": "true" }, { + "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", "id": "24", + "line": 62, "name": "mutants/24/Ops/ROR/ROR.sol", "op": "ROR", "orig": "!=", @@ -240,9 +288,11 @@ "repl": "<" }, { + "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", "id": "25", + "line": 62, "name": "mutants/25/Ops/ROR/ROR.sol", "op": "ROR", "orig": "!=", @@ -250,9 +300,11 @@ "repl": ">" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", "id": "26", + "line": 62, "name": "mutants/26/Ops/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) != z", diff --git a/resources/regressions/ror.json/mutants.log b/resources/regressions/ror.json/mutants.log index ac6e5ab0..5cbde0e6 100644 --- a/resources/regressions/ror.json/mutants.log +++ b/resources/regressions/ror.json/mutants.log @@ -1,26 +1,26 @@ -1,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,<= -2,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,!= -3,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:7,x < y,false -4,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,< -5,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,== -6,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:7,x <= y,true -7,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,>= -8,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,!= -9,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:7,x > y,false -10,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,> -11,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,== -12,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:7,x >= y,true -13,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,<= -14,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,>= -15,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:7,x == y,false -16,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false -17,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< -18,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> -19,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true -20,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true -21,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> -22,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== -23,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true -24,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< -25,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> -26,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true +1,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,<= +2,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,!= +3,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:16,x < y,false +4,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,< +5,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,== +6,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:16,x <= y,true +7,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,>= +8,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,!= +9,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:16,x > y,false +10,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,> +11,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,== +12,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:16,x >= y,true +13,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,<= +14,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,>= +15,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:16,x == y,false +16,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,34:16,x == y,false +17,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,< +18,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,> +19,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:16,x != y,true +20,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,44:16,x != y,true +21,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,> +22,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,== +23,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:16,(x + y) >= z,true +24,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,< +25,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,> +26,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:16,(x + y) != z,true diff --git a/resources/regressions/test_import_map.json/gambit_results.json b/resources/regressions/test_import_map.json/gambit_results.json index 3b4fafe3..524509cb 100644 --- a/resources/regressions/test_import_map.json/gambit_results.json +++ b/resources/regressions/test_import_map.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n }\n", "id": "1", + "line": 9, "name": "mutants/1/contracts/Contract.sol", "op": "AOR", "orig": "+", @@ -10,9 +12,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n }\n", "id": "2", + "line": 9, "name": "mutants/2/contracts/Contract.sol", "op": "AOR", "orig": "+", @@ -20,9 +24,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n }\n", "id": "3", + "line": 9, "name": "mutants/3/contracts/Contract.sol", "op": "AOR", "orig": "+", @@ -30,9 +36,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,7 +5,8 @@\n import \"contracts/B.sol\";\n \n contract Contract {\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n }\n", "id": "4", + "line": 9, "name": "mutants/4/contracts/Contract.sol", "op": "AOR", "orig": "+", diff --git a/resources/regressions/test_import_map.json/mutants.log b/resources/regressions/test_import_map.json/mutants.log index fe0a116b..d78db16a 100644 --- a/resources/regressions/test_import_map.json/mutants.log +++ b/resources/regressions/test_import_map.json/mutants.log @@ -1,4 +1,4 @@ -1,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,8:9,+,- -2,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,8:9,+,* -3,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,8:9,+,/ -4,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,8:9,+,% +1,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,9:18,+,- +2,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,9:18,+,* +3,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,9:18,+,/ +4,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,9:18,+,% diff --git a/resources/regressions/test_log_invalid.json/gambit_results.json b/resources/regressions/test_log_invalid.json/gambit_results.json index 6ab76978..d7ba80a7 100644 --- a/resources/regressions/test_log_invalid.json/gambit_results.json +++ b/resources/regressions/test_log_invalid.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", + "line": 13, "name": "mutants/1/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -10,9 +12,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "2", + "line": 13, "name": "mutants/2/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -20,9 +24,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "3", + "line": 13, "name": "mutants/3/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -30,9 +36,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "4", + "line": 13, "name": "mutants/4/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -40,9 +48,11 @@ "repl": "%" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "5", + "line": 22, "name": "mutants/5/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -50,9 +60,11 @@ "repl": "+" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "6", + "line": 22, "name": "mutants/6/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -60,9 +72,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "7", + "line": 22, "name": "mutants/7/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -70,9 +84,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "8", + "line": 22, "name": "mutants/8/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -80,9 +96,11 @@ "repl": "%" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "9", + "line": 34, "name": "mutants/9/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -90,9 +108,11 @@ "repl": "+" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "10", + "line": 34, "name": "mutants/10/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -100,9 +120,11 @@ "repl": "-" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "11", + "line": 34, "name": "mutants/11/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -110,9 +132,11 @@ "repl": "/" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "12", + "line": 34, "name": "mutants/12/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -120,9 +144,11 @@ "repl": "%" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "13", + "line": 47, "name": "mutants/13/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -130,9 +156,11 @@ "repl": "+" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "14", + "line": 47, "name": "mutants/14/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -140,9 +168,11 @@ "repl": "-" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "15", + "line": 47, "name": "mutants/15/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -150,9 +180,11 @@ "repl": "/" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "16", + "line": 47, "name": "mutants/16/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -160,9 +192,11 @@ "repl": "**" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "17", + "line": 47, "name": "mutants/17/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -170,9 +204,11 @@ "repl": "%" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "18", + "line": 58, "name": "mutants/18/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -180,9 +216,11 @@ "repl": "+" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "19", + "line": 58, "name": "mutants/19/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -190,9 +228,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "20", + "line": 58, "name": "mutants/20/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -200,9 +240,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "21", + "line": 58, "name": "mutants/21/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -210,9 +252,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "22", + "line": 58, "name": "mutants/22/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -220,9 +264,11 @@ "repl": "%" }, { + "col": 18, "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -6,8 +6,9 @@\n contract BOR {\n // Expect 1 mutants:\n // a & b;\n+ /// ConditionalOperatorReplacement(`|` |==> `&`) of: `return a | b;`\n function bw_or(int256 a, int256 b) public pure returns (int256) {\n- return a | b;\n+ return a & b;\n }\n \n // Expect 1 mutants:\n", "id": "23", + "line": 10, "name": "mutants/23/BOR/BOR.sol", "op": "BOR", "orig": "|", @@ -230,9 +276,11 @@ "repl": "&" }, { + "col": 18, "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`&` |==> `|`) of: `return a & b;`\n function bw_and(int256 a, int256 b) public pure returns (int256) {\n- return a & b;\n+ return a | b;\n }\n \n // Expect 1 mutants:\n", "id": "24", + "line": 16, "name": "mutants/24/BOR/BOR.sol", "op": "BOR", "orig": "&", @@ -240,9 +288,11 @@ "repl": "|" }, { + "col": 18, "description": "ConditionalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// ConditionalOperatorReplacement(`^` |==> `&`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ return a & b;\n }\n }\n", "id": "25", + "line": 22, "name": "mutants/25/BOR/BOR.sol", "op": "BOR", "orig": "^", @@ -250,9 +300,11 @@ "repl": "&" }, { + "col": 38, "description": "ElimDelegateCall", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", "id": "26", + "line": 16, "name": "mutants/26/EDC/EDC.sol", "op": "EDC", "orig": "delegatecall", @@ -260,9 +312,11 @@ "repl": "call" }, { + "col": 17, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(true, \"Delegatecall failed\");\n }\n }\n", "id": "27", + "line": 19, "name": "mutants/27/EDC/EDC.sol", "op": "EVR", "orig": "success", @@ -270,9 +324,11 @@ "repl": "true" }, { + "col": 17, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(false, \"Delegatecall failed\");\n }\n }\n", "id": "28", + "line": 19, "name": "mutants/28/EDC/EDC.sol", "op": "EVR", "orig": "success", @@ -280,9 +336,11 @@ "repl": "false" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", "id": "29", + "line": 9, "name": "mutants/29/LOR/LOR.sol", "op": "LOR", "orig": "a && b", @@ -290,9 +348,11 @@ "repl": "a" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", "id": "30", + "line": 9, "name": "mutants/30/LOR/LOR.sol", "op": "LOR", "orig": "a && b", @@ -300,9 +360,11 @@ "repl": "b" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", "id": "31", + "line": 9, "name": "mutants/31/LOR/LOR.sol", "op": "LOR", "orig": "a && b", @@ -310,9 +372,11 @@ "repl": "false" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "32", + "line": 14, "name": "mutants/32/LOR/LOR.sol", "op": "LOR", "orig": "a || b", @@ -320,9 +384,11 @@ "repl": "a" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "33", + "line": 14, "name": "mutants/33/LOR/LOR.sol", "op": "LOR", "orig": "a || b", @@ -330,9 +396,11 @@ "repl": "b" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", "id": "34", + "line": 14, "name": "mutants/34/LOR/LOR.sol", "op": "LOR", "orig": "a || b", @@ -340,9 +408,11 @@ "repl": "true" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", "id": "35", + "line": 19, "name": "mutants/35/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", @@ -350,9 +420,11 @@ "repl": "x < y" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", "id": "36", + "line": 19, "name": "mutants/36/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", @@ -360,9 +432,11 @@ "repl": "a != (x >= y)" }, { + "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", "id": "37", + "line": 19, "name": "mutants/37/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", @@ -370,9 +444,11 @@ "repl": "true" }, { + "col": 24, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", "id": "38", + "line": 15, "name": "mutants/38/LVR/LVR.sol", "op": "LVR", "orig": "0", @@ -380,9 +456,11 @@ "repl": "1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 0;\n }\n \n // Expect 2 mutant: 0, 2\n", "id": "39", + "line": 16, "name": "mutants/39/LVR/LVR.sol", "op": "EVR", "orig": "zero", @@ -390,9 +468,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 1;\n }\n \n // Expect 2 mutant: 0, 2\n", "id": "40", + "line": 16, "name": "mutants/40/LVR/LVR.sol", "op": "EVR", "orig": "zero", @@ -400,9 +480,11 @@ "repl": "1" }, { + "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", "id": "41", + "line": 21, "name": "mutants/41/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -410,9 +492,11 @@ "repl": "0" }, { + "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", "id": "42", + "line": 21, "name": "mutants/42/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -420,9 +504,11 @@ "repl": "2" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 0;\n }\n \n // Expect 2 mutants: 0, 1\n", "id": "43", + "line": 22, "name": "mutants/43/LVR/LVR.sol", "op": "EVR", "orig": "one", @@ -430,9 +516,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 1;\n }\n \n // Expect 2 mutants: 0, 1\n", "id": "44", + "line": 22, "name": "mutants/44/LVR/LVR.sol", "op": "EVR", "orig": "one", @@ -440,9 +528,11 @@ "repl": "1" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", "id": "45", + "line": 27, "name": "mutants/45/LVR/LVR.sol", "op": "LVR", "orig": "-1", @@ -450,9 +540,11 @@ "repl": "0" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", "id": "46", + "line": 27, "name": "mutants/46/LVR/LVR.sol", "op": "LVR", "orig": "-1", @@ -460,9 +552,11 @@ "repl": "1" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", "id": "47", + "line": 27, "name": "mutants/47/LVR/LVR.sol", "op": "LVR", "orig": "-1", @@ -470,9 +564,11 @@ "repl": "-2" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 0\n", "id": "48", + "line": 28, "name": "mutants/48/LVR/LVR.sol", "op": "EVR", "orig": "neg_one", @@ -480,9 +576,11 @@ "repl": "-1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 0\n", "id": "49", + "line": 28, "name": "mutants/49/LVR/LVR.sol", "op": "EVR", "orig": "neg_one", @@ -490,9 +588,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 0\n", "id": "50", + "line": 28, "name": "mutants/50/LVR/LVR.sol", "op": "EVR", "orig": "neg_one", @@ -500,9 +600,11 @@ "repl": "1" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", "id": "51", + "line": 33, "name": "mutants/51/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -510,9 +612,11 @@ "repl": "0" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", "id": "52", + "line": 33, "name": "mutants/52/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -520,9 +624,11 @@ "repl": "-1" }, { + "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", "id": "53", + "line": 33, "name": "mutants/53/LVR/LVR.sol", "op": "LVR", "orig": "1", @@ -530,9 +636,11 @@ "repl": "2" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 1\n", "id": "54", + "line": 34, "name": "mutants/54/LVR/LVR.sol", "op": "EVR", "orig": "pos_one", @@ -540,9 +648,11 @@ "repl": "-1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 1\n", "id": "55", + "line": 34, "name": "mutants/55/LVR/LVR.sol", "op": "EVR", "orig": "pos_one", @@ -550,9 +660,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 1\n", "id": "56", + "line": 34, "name": "mutants/56/LVR/LVR.sol", "op": "EVR", "orig": "pos_one", @@ -560,9 +672,11 @@ "repl": "1" }, { + "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", "id": "57", + "line": 39, "name": "mutants/57/LVR/LVR.sol", "op": "LVR", "orig": "0", @@ -570,9 +684,11 @@ "repl": "-1" }, { + "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", "id": "58", + "line": 39, "name": "mutants/58/LVR/LVR.sol", "op": "LVR", "orig": "0", @@ -580,9 +696,11 @@ "repl": "1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return -1;\n }\n }\n", "id": "59", + "line": 40, "name": "mutants/59/LVR/LVR.sol", "op": "EVR", "orig": "zero", @@ -590,9 +708,11 @@ "repl": "-1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 0;\n }\n }\n", "id": "60", + "line": 40, "name": "mutants/60/LVR/LVR.sol", "op": "EVR", "orig": "zero", @@ -600,9 +720,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 1;\n }\n }\n", "id": "61", + "line": 40, "name": "mutants/61/LVR/LVR.sol", "op": "EVR", "orig": "zero", @@ -610,9 +732,11 @@ "repl": "1" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "62", + "line": 9, "name": "mutants/62/ROR/ROR.sol", "op": "ROR", "orig": "<", @@ -620,9 +744,11 @@ "repl": "<=" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "63", + "line": 9, "name": "mutants/63/ROR/ROR.sol", "op": "ROR", "orig": "<", @@ -630,9 +756,11 @@ "repl": "!=" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", "id": "64", + "line": 9, "name": "mutants/64/ROR/ROR.sol", "op": "ROR", "orig": "x < y", @@ -640,9 +768,11 @@ "repl": "false" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "65", + "line": 14, "name": "mutants/65/ROR/ROR.sol", "op": "ROR", "orig": "<=", @@ -650,9 +780,11 @@ "repl": "<" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "66", + "line": 14, "name": "mutants/66/ROR/ROR.sol", "op": "ROR", "orig": "<=", @@ -660,9 +792,11 @@ "repl": "==" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", "id": "67", + "line": 14, "name": "mutants/67/ROR/ROR.sol", "op": "ROR", "orig": "x <= y", @@ -670,9 +804,11 @@ "repl": "true" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "68", + "line": 19, "name": "mutants/68/ROR/ROR.sol", "op": "ROR", "orig": ">", @@ -680,9 +816,11 @@ "repl": ">=" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "69", + "line": 19, "name": "mutants/69/ROR/ROR.sol", "op": "ROR", "orig": ">", @@ -690,9 +828,11 @@ "repl": "!=" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", "id": "70", + "line": 19, "name": "mutants/70/ROR/ROR.sol", "op": "ROR", "orig": "x > y", @@ -700,9 +840,11 @@ "repl": "false" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "71", + "line": 24, "name": "mutants/71/ROR/ROR.sol", "op": "ROR", "orig": ">=", @@ -710,9 +852,11 @@ "repl": ">" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "72", + "line": 24, "name": "mutants/72/ROR/ROR.sol", "op": "ROR", "orig": ">=", @@ -720,9 +864,11 @@ "repl": "==" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", "id": "73", + "line": 24, "name": "mutants/73/ROR/ROR.sol", "op": "ROR", "orig": "x >= y", @@ -730,9 +876,11 @@ "repl": "true" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "74", + "line": 29, "name": "mutants/74/ROR/ROR.sol", "op": "ROR", "orig": "==", @@ -740,9 +888,11 @@ "repl": "<=" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "75", + "line": 29, "name": "mutants/75/ROR/ROR.sol", "op": "ROR", "orig": "==", @@ -750,9 +900,11 @@ "repl": ">=" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", "id": "76", + "line": 29, "name": "mutants/76/ROR/ROR.sol", "op": "ROR", "orig": "x == y", @@ -760,9 +912,11 @@ "repl": "false" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", "id": "77", + "line": 34, "name": "mutants/77/ROR/ROR.sol", "op": "ROR", "orig": "x == y", @@ -770,9 +924,11 @@ "repl": "false" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "78", + "line": 39, "name": "mutants/78/ROR/ROR.sol", "op": "ROR", "orig": "!=", @@ -780,9 +936,11 @@ "repl": "<" }, { + "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", "id": "79", + "line": 39, "name": "mutants/79/ROR/ROR.sol", "op": "ROR", "orig": "!=", @@ -790,9 +948,11 @@ "repl": ">" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", "id": "80", + "line": 39, "name": "mutants/80/ROR/ROR.sol", "op": "ROR", "orig": "x != y", @@ -800,9 +960,11 @@ "repl": "true" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", "id": "81", + "line": 44, "name": "mutants/81/ROR/ROR.sol", "op": "ROR", "orig": "x != y", @@ -810,9 +972,11 @@ "repl": "true" }, { + "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "82", + "line": 53, "name": "mutants/82/ROR/ROR.sol", "op": "ROR", "orig": ">=", @@ -820,9 +984,11 @@ "repl": ">" }, { + "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "83", + "line": 53, "name": "mutants/83/ROR/ROR.sol", "op": "ROR", "orig": ">=", @@ -830,9 +996,11 @@ "repl": "==" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", "id": "84", + "line": 53, "name": "mutants/84/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) >= z", @@ -840,9 +1008,11 @@ "repl": "true" }, { + "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", "id": "85", + "line": 62, "name": "mutants/85/ROR/ROR.sol", "op": "ROR", "orig": "!=", @@ -850,9 +1020,11 @@ "repl": "<" }, { + "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", "id": "86", + "line": 62, "name": "mutants/86/ROR/ROR.sol", "op": "ROR", "orig": "!=", @@ -860,9 +1032,11 @@ "repl": ">" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", "id": "87", + "line": 62, "name": "mutants/87/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) != z", @@ -870,9 +1044,11 @@ "repl": "true" }, { + "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", "id": "88", + "line": 14, "name": "mutants/88/UOR/UOR.sol", "op": "UOR", "orig": "~", @@ -880,9 +1056,11 @@ "repl": " - " }, { + "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", "id": "89", + "line": 19, "name": "mutants/89/UOR/UOR.sol", "op": "UOR", "orig": "~", diff --git a/resources/regressions/test_log_invalid.json/invalid.log b/resources/regressions/test_log_invalid.json/invalid.log index c49ff370..28d86ae5 100644 --- a/resources/regressions/test_log_invalid.json/invalid.log +++ b/resources/regressions/test_log_invalid.json/invalid.log @@ -1 +1 @@ -1,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,8:7,~, - +1,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,8:15,~, - diff --git a/resources/regressions/test_log_invalid.json/mutants.log b/resources/regressions/test_log_invalid.json/mutants.log index 874f7998..98a98f96 100644 --- a/resources/regressions/test_log_invalid.json/mutants.log +++ b/resources/regressions/test_log_invalid.json/mutants.log @@ -1,89 +1,89 @@ -1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,- -2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,* -3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,/ -4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,% -5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,+ -6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,* -7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,/ -8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,% -9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,+ -10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,- -11,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,/ -12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,% -13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,+ -14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,- -15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,/ -16,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,** -17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,% -18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,+ -19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,- -20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,* -21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,/ -22,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,% -23,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,9:9,|,& -24,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,15:9,&,| -25,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,21:9,^,& -26,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,15:29,delegatecall,call -27,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,18:8,success,true -28,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,18:8,success,false -29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,a -30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,b -31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,8:7,a && b,false -32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,a -33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,b -34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,13:7,a || b,true -35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),x < y -36,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),a != (x >= y) -37,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,18:7,(x < y) || (a != (x >= y)),true -38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,14:15,0,1 -39,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:7,zero,0 -40,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:7,zero,1 -41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,0 -42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,20:14,1,2 -43,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:7,one,0 -44,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:7,one,1 -45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,0 -46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,1 -47,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,26:17,-1,-2 -48,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,-1 -49,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,0 -50,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:7,neg_one,1 -51,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,0 -52,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,-1 -53,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,32:17,1,2 -54,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,-1 -55,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,0 -56,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:7,pos_one,1 -57,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,-1 -58,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,38:14,0,1 -59,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,-1 -60,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,0 -61,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:7,zero,1 -62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,<= -63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:9,<,!= -64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,8:7,x < y,false -65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,< -66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:9,<=,== -67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,13:7,x <= y,true -68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,>= -69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:9,>,!= -70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,18:7,x > y,false -71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,> -72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:9,>=,== -73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,23:7,x >= y,true -74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,<= -75,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:9,==,>= -76,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,28:7,x == y,false -77,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,33:7,x == y,false -78,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,< -79,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:9,!=,> -80,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,38:7,x != y,true -81,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,43:7,x != y,true -82,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,> -83,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:15,>=,== -84,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,52:7,(x + y) >= z,true -85,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,< -86,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:15,!=,> -87,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,61:7,(x + y) != z,true -88,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,13:7,~, - -89,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,18:7,~, ~ +1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,- +2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,* +3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,/ +4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,% +5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,+ +6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,* +7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,/ +8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,% +9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,+ +10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,- +11,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,/ +12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,% +13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,+ +14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,- +15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,/ +16,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,** +17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,% +18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,+ +19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,- +20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,* +21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,/ +22,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,% +23,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,10:18,|,& +24,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,16:18,&,| +25,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,22:18,^,& +26,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,16:38,delegatecall,call +27,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,19:17,success,true +28,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,19:17,success,false +29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,a +30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,b +31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,false +32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,a +33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,b +34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,true +35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y +36,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) +37,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true +38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 +39,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,16:16,zero,0 +40,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,16:16,zero,1 +41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 +42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 +43,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,22:16,one,0 +44,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,22:16,one,1 +45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 +46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 +47,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 +48,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,-1 +49,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,0 +50,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,1 +51,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 +52,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 +53,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 +54,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,-1 +55,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,0 +56,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,1 +57,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 +58,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 +59,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,-1 +60,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,0 +61,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,1 +62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,<= +63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,!= +64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:16,x < y,false +65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,< +66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,== +67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:16,x <= y,true +68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,>= +69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,!= +70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:16,x > y,false +71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,> +72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,== +73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:16,x >= y,true +74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,<= +75,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,>= +76,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:16,x == y,false +77,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,34:16,x == y,false +78,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,< +79,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,> +80,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:16,x != y,true +81,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,44:16,x != y,true +82,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,> +83,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,== +84,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:16,(x + y) >= z,true +85,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,< +86,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,> +87,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:16,(x + y) != z,true +88,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~, - +89,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,~, ~ diff --git a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json index a6e11d59..40fcd965 100644 --- a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "1", + "line": 7, "name": "mutants/1/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", @@ -10,9 +12,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "2", + "line": 7, "name": "mutants/2/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", @@ -20,9 +24,11 @@ "repl": "false" }, { + "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "3", + "line": 7, "name": "mutants/3/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -30,9 +36,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "4", + "line": 11, "name": "mutants/4/MultipleContracts/C.sol", "op": "STD", "orig": "return a + b", @@ -40,9 +48,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "5", + "line": 11, "name": "mutants/5/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -50,9 +60,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "6", + "line": 11, "name": "mutants/6/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -60,9 +72,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "7", + "line": 11, "name": "mutants/7/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -70,9 +84,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "8", + "line": 11, "name": "mutants/8/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -80,9 +96,11 @@ "repl": "%" }, { + "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "9", + "line": 17, "name": "mutants/9/MultipleContracts/C.sol", "op": "LVR", "orig": "1", @@ -90,9 +108,11 @@ "repl": "0" }, { + "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "10", + "line": 17, "name": "mutants/10/MultipleContracts/C.sol", "op": "LVR", "orig": "1", @@ -100,9 +120,11 @@ "repl": "2" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "11", + "line": 18, "name": "mutants/11/MultipleContracts/C.sol", "op": "STD", "orig": "a[0] = msg.sender", @@ -110,9 +132,11 @@ "repl": "assert(true)" }, { + "col": 11, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "12", + "line": 18, "name": "mutants/12/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -120,9 +144,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "13", + "line": 19, "name": "mutants/13/MultipleContracts/C.sol", "op": "STD", "orig": "return a", @@ -130,9 +156,11 @@ "repl": "assert(true)" }, { + "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "14", + "line": 23, "name": "mutants/14/MultipleContracts/C.sol", "op": "LVR", "orig": "10", @@ -140,9 +168,11 @@ "repl": "0" }, { + "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "15", + "line": 23, "name": "mutants/15/MultipleContracts/C.sol", "op": "LVR", "orig": "10", @@ -150,9 +180,11 @@ "repl": "11" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "16", + "line": 24, "name": "mutants/16/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -160,9 +192,11 @@ "repl": "+" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "17", + "line": 24, "name": "mutants/17/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -170,9 +204,11 @@ "repl": "-" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "18", + "line": 24, "name": "mutants/18/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -180,9 +216,11 @@ "repl": "*" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "19", + "line": 24, "name": "mutants/19/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -190,9 +228,11 @@ "repl": "/" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "20", + "line": 24, "name": "mutants/20/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -200,9 +240,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "21", + "line": 25, "name": "mutants/21/MultipleContracts/C.sol", "op": "STD", "orig": "return res", @@ -210,9 +252,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "22", + "line": 25, "name": "mutants/22/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -220,9 +264,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "23", + "line": 25, "name": "mutants/23/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -230,9 +276,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "24", + "line": 29, "name": "mutants/24/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", @@ -240,9 +288,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "25", + "line": 29, "name": "mutants/25/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", @@ -250,9 +300,11 @@ "repl": "false" }, { + "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "26", + "line": 29, "name": "mutants/26/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -260,9 +312,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "27", + "line": 34, "name": "mutants/27/MultipleContracts/C.sol", "op": "STD", "orig": "Utils.getarray(b, address(this))", @@ -270,9 +324,11 @@ "repl": "assert(true)" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "28", + "line": 38, "name": "mutants/28/MultipleContracts/C.sol", "op": "STD", "orig": "return c + d", @@ -280,9 +336,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "29", + "line": 38, "name": "mutants/29/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -290,9 +348,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "30", + "line": 38, "name": "mutants/30/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -300,9 +360,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "31", + "line": 38, "name": "mutants/31/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -310,9 +372,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "32", + "line": 38, "name": "mutants/32/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -320,9 +384,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "33", + "line": 7, "name": "mutants/33/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", @@ -330,9 +396,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "34", + "line": 7, "name": "mutants/34/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", @@ -340,9 +408,11 @@ "repl": "false" }, { + "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "35", + "line": 7, "name": "mutants/35/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -350,9 +420,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "36", + "line": 11, "name": "mutants/36/MultipleContracts/C.sol", "op": "STD", "orig": "return a + b", @@ -360,9 +432,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "37", + "line": 11, "name": "mutants/37/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -370,9 +444,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "38", + "line": 11, "name": "mutants/38/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -380,9 +456,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "39", + "line": 11, "name": "mutants/39/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -390,9 +468,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "40", + "line": 11, "name": "mutants/40/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -400,9 +480,11 @@ "repl": "%" }, { + "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "41", + "line": 17, "name": "mutants/41/MultipleContracts/C.sol", "op": "LVR", "orig": "1", @@ -410,9 +492,11 @@ "repl": "0" }, { + "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "42", + "line": 17, "name": "mutants/42/MultipleContracts/C.sol", "op": "LVR", "orig": "1", @@ -420,9 +504,11 @@ "repl": "2" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "43", + "line": 18, "name": "mutants/43/MultipleContracts/C.sol", "op": "STD", "orig": "a[0] = msg.sender", @@ -430,9 +516,11 @@ "repl": "assert(true)" }, { + "col": 11, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "44", + "line": 18, "name": "mutants/44/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -440,9 +528,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "45", + "line": 19, "name": "mutants/45/MultipleContracts/C.sol", "op": "STD", "orig": "return a", @@ -450,9 +540,11 @@ "repl": "assert(true)" }, { + "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "46", + "line": 23, "name": "mutants/46/MultipleContracts/C.sol", "op": "LVR", "orig": "10", @@ -460,9 +552,11 @@ "repl": "0" }, { + "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "47", + "line": 23, "name": "mutants/47/MultipleContracts/C.sol", "op": "LVR", "orig": "10", @@ -470,9 +564,11 @@ "repl": "11" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "48", + "line": 24, "name": "mutants/48/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -480,9 +576,11 @@ "repl": "+" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "49", + "line": 24, "name": "mutants/49/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -490,9 +588,11 @@ "repl": "-" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "50", + "line": 24, "name": "mutants/50/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -500,9 +600,11 @@ "repl": "*" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "51", + "line": 24, "name": "mutants/51/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -510,9 +612,11 @@ "repl": "/" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "52", + "line": 24, "name": "mutants/52/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -520,9 +624,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "53", + "line": 25, "name": "mutants/53/MultipleContracts/C.sol", "op": "STD", "orig": "return res", @@ -530,9 +636,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "54", + "line": 25, "name": "mutants/54/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -540,9 +648,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "55", + "line": 25, "name": "mutants/55/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -550,9 +660,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "56", + "line": 29, "name": "mutants/56/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", @@ -560,9 +672,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "57", + "line": 29, "name": "mutants/57/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", @@ -570,9 +684,11 @@ "repl": "false" }, { + "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "58", + "line": 29, "name": "mutants/58/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -580,9 +696,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "59", + "line": 34, "name": "mutants/59/MultipleContracts/C.sol", "op": "STD", "orig": "Utils.getarray(b, address(this))", @@ -590,9 +708,11 @@ "repl": "assert(true)" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "60", + "line": 38, "name": "mutants/60/MultipleContracts/C.sol", "op": "STD", "orig": "return c + d", @@ -600,9 +720,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "61", + "line": 38, "name": "mutants/61/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -610,9 +732,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "62", + "line": 38, "name": "mutants/62/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -620,9 +744,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "63", + "line": 38, "name": "mutants/63/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -630,9 +756,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "64", + "line": 38, "name": "mutants/64/MultipleContracts/C.sol", "op": "AOR", "orig": "+", diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants.log b/resources/regressions/test_multiple_contracts_1.json/mutants.log index 34c109e1..a102393f 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_1.json/mutants.log @@ -1,64 +1,64 @@ -1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -2,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false -3,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 -4,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -9,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -10,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -11,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 -13,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -14,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -15,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -22,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 -23,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 -24,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -25,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -26,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 -27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% -33,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -34,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false -35,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 -36,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 -45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -46,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -47,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -51,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -52,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -54,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 -55,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 -56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -57,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -58,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 -59,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -60,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -61,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -62,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -63,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -64,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) +2,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false +3,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 +4,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) +5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- +6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* +7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ +8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% +9,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 +10,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 +11,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) +12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 +13,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) +14,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 +15,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 +16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ +17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- +18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* +19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ +20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% +21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) +22,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 +23,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 +24,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +25,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +26,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 +27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% +33,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) +34,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false +35,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 +36,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) +37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* +39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ +40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% +41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 +42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) +44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 +45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) +46,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 +47,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* +51,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ +52,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% +53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) +54,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 +55,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 +56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +57,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +58,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 +59,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +60,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) +61,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +62,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +63,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +64,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json index a6e11d59..40fcd965 100644 --- a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "1", + "line": 7, "name": "mutants/1/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", @@ -10,9 +12,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "2", + "line": 7, "name": "mutants/2/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", @@ -20,9 +24,11 @@ "repl": "false" }, { + "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "3", + "line": 7, "name": "mutants/3/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -30,9 +36,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "4", + "line": 11, "name": "mutants/4/MultipleContracts/C.sol", "op": "STD", "orig": "return a + b", @@ -40,9 +48,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "5", + "line": 11, "name": "mutants/5/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -50,9 +60,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "6", + "line": 11, "name": "mutants/6/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -60,9 +72,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "7", + "line": 11, "name": "mutants/7/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -70,9 +84,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "8", + "line": 11, "name": "mutants/8/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -80,9 +96,11 @@ "repl": "%" }, { + "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "9", + "line": 17, "name": "mutants/9/MultipleContracts/C.sol", "op": "LVR", "orig": "1", @@ -90,9 +108,11 @@ "repl": "0" }, { + "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "10", + "line": 17, "name": "mutants/10/MultipleContracts/C.sol", "op": "LVR", "orig": "1", @@ -100,9 +120,11 @@ "repl": "2" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "11", + "line": 18, "name": "mutants/11/MultipleContracts/C.sol", "op": "STD", "orig": "a[0] = msg.sender", @@ -110,9 +132,11 @@ "repl": "assert(true)" }, { + "col": 11, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "12", + "line": 18, "name": "mutants/12/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -120,9 +144,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "13", + "line": 19, "name": "mutants/13/MultipleContracts/C.sol", "op": "STD", "orig": "return a", @@ -130,9 +156,11 @@ "repl": "assert(true)" }, { + "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "14", + "line": 23, "name": "mutants/14/MultipleContracts/C.sol", "op": "LVR", "orig": "10", @@ -140,9 +168,11 @@ "repl": "0" }, { + "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "15", + "line": 23, "name": "mutants/15/MultipleContracts/C.sol", "op": "LVR", "orig": "10", @@ -150,9 +180,11 @@ "repl": "11" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "16", + "line": 24, "name": "mutants/16/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -160,9 +192,11 @@ "repl": "+" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "17", + "line": 24, "name": "mutants/17/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -170,9 +204,11 @@ "repl": "-" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "18", + "line": 24, "name": "mutants/18/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -180,9 +216,11 @@ "repl": "*" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "19", + "line": 24, "name": "mutants/19/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -190,9 +228,11 @@ "repl": "/" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "20", + "line": 24, "name": "mutants/20/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -200,9 +240,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "21", + "line": 25, "name": "mutants/21/MultipleContracts/C.sol", "op": "STD", "orig": "return res", @@ -210,9 +252,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "22", + "line": 25, "name": "mutants/22/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -220,9 +264,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "23", + "line": 25, "name": "mutants/23/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -230,9 +276,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "24", + "line": 29, "name": "mutants/24/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", @@ -240,9 +288,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "25", + "line": 29, "name": "mutants/25/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", @@ -250,9 +300,11 @@ "repl": "false" }, { + "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "26", + "line": 29, "name": "mutants/26/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -260,9 +312,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "27", + "line": 34, "name": "mutants/27/MultipleContracts/C.sol", "op": "STD", "orig": "Utils.getarray(b, address(this))", @@ -270,9 +324,11 @@ "repl": "assert(true)" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "28", + "line": 38, "name": "mutants/28/MultipleContracts/C.sol", "op": "STD", "orig": "return c + d", @@ -280,9 +336,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "29", + "line": 38, "name": "mutants/29/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -290,9 +348,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "30", + "line": 38, "name": "mutants/30/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -300,9 +360,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "31", + "line": 38, "name": "mutants/31/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -310,9 +372,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "32", + "line": 38, "name": "mutants/32/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -320,9 +384,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "33", + "line": 7, "name": "mutants/33/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", @@ -330,9 +396,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "34", + "line": 7, "name": "mutants/34/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", @@ -340,9 +408,11 @@ "repl": "false" }, { + "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "35", + "line": 7, "name": "mutants/35/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -350,9 +420,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "36", + "line": 11, "name": "mutants/36/MultipleContracts/C.sol", "op": "STD", "orig": "return a + b", @@ -360,9 +432,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "37", + "line": 11, "name": "mutants/37/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -370,9 +444,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "38", + "line": 11, "name": "mutants/38/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -380,9 +456,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "39", + "line": 11, "name": "mutants/39/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -390,9 +468,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "40", + "line": 11, "name": "mutants/40/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -400,9 +480,11 @@ "repl": "%" }, { + "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "41", + "line": 17, "name": "mutants/41/MultipleContracts/C.sol", "op": "LVR", "orig": "1", @@ -410,9 +492,11 @@ "repl": "0" }, { + "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "42", + "line": 17, "name": "mutants/42/MultipleContracts/C.sol", "op": "LVR", "orig": "1", @@ -420,9 +504,11 @@ "repl": "2" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "43", + "line": 18, "name": "mutants/43/MultipleContracts/C.sol", "op": "STD", "orig": "a[0] = msg.sender", @@ -430,9 +516,11 @@ "repl": "assert(true)" }, { + "col": 11, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "44", + "line": 18, "name": "mutants/44/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -440,9 +528,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "45", + "line": 19, "name": "mutants/45/MultipleContracts/C.sol", "op": "STD", "orig": "return a", @@ -450,9 +540,11 @@ "repl": "assert(true)" }, { + "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "46", + "line": 23, "name": "mutants/46/MultipleContracts/C.sol", "op": "LVR", "orig": "10", @@ -460,9 +552,11 @@ "repl": "0" }, { + "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "47", + "line": 23, "name": "mutants/47/MultipleContracts/C.sol", "op": "LVR", "orig": "10", @@ -470,9 +564,11 @@ "repl": "11" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "48", + "line": 24, "name": "mutants/48/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -480,9 +576,11 @@ "repl": "+" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "49", + "line": 24, "name": "mutants/49/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -490,9 +588,11 @@ "repl": "-" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "50", + "line": 24, "name": "mutants/50/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -500,9 +600,11 @@ "repl": "*" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "51", + "line": 24, "name": "mutants/51/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -510,9 +612,11 @@ "repl": "/" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "52", + "line": 24, "name": "mutants/52/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -520,9 +624,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "53", + "line": 25, "name": "mutants/53/MultipleContracts/C.sol", "op": "STD", "orig": "return res", @@ -530,9 +636,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "54", + "line": 25, "name": "mutants/54/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -540,9 +648,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "55", + "line": 25, "name": "mutants/55/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -550,9 +660,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "56", + "line": 29, "name": "mutants/56/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", @@ -560,9 +672,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "57", + "line": 29, "name": "mutants/57/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", @@ -570,9 +684,11 @@ "repl": "false" }, { + "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "58", + "line": 29, "name": "mutants/58/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -580,9 +696,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "59", + "line": 34, "name": "mutants/59/MultipleContracts/C.sol", "op": "STD", "orig": "Utils.getarray(b, address(this))", @@ -590,9 +708,11 @@ "repl": "assert(true)" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "60", + "line": 38, "name": "mutants/60/MultipleContracts/C.sol", "op": "STD", "orig": "return c + d", @@ -600,9 +720,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "61", + "line": 38, "name": "mutants/61/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -610,9 +732,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "62", + "line": 38, "name": "mutants/62/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -620,9 +744,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "63", + "line": 38, "name": "mutants/63/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -630,9 +756,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "64", + "line": 38, "name": "mutants/64/MultipleContracts/C.sol", "op": "AOR", "orig": "+", diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants.log b/resources/regressions/test_multiple_contracts_2.json/mutants.log index 34c109e1..a102393f 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_2.json/mutants.log @@ -1,64 +1,64 @@ -1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -2,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false -3,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 -4,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -9,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -10,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -11,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 -13,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -14,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -15,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -22,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 -23,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 -24,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -25,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -26,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 -27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% -33,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -34,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false -35,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 -36,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 -45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -46,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -47,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -51,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -52,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -54,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 -55,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 -56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -57,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -58,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 -59,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -60,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -61,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -62,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -63,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -64,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) +2,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false +3,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 +4,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) +5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- +6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* +7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ +8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% +9,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 +10,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 +11,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) +12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 +13,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) +14,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 +15,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 +16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ +17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- +18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* +19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ +20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% +21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) +22,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 +23,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 +24,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +25,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +26,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 +27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% +33,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) +34,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false +35,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 +36,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) +37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* +39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ +40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% +41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 +42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) +44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 +45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) +46,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 +47,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* +51,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ +52,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% +53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) +54,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 +55,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 +56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +57,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +58,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 +59,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +60,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) +61,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +62,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +63,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +64,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json index a6e11d59..40fcd965 100644 --- a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "1", + "line": 7, "name": "mutants/1/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", @@ -10,9 +12,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "2", + "line": 7, "name": "mutants/2/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", @@ -20,9 +24,11 @@ "repl": "false" }, { + "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "3", + "line": 7, "name": "mutants/3/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -30,9 +36,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "4", + "line": 11, "name": "mutants/4/MultipleContracts/C.sol", "op": "STD", "orig": "return a + b", @@ -40,9 +48,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "5", + "line": 11, "name": "mutants/5/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -50,9 +60,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "6", + "line": 11, "name": "mutants/6/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -60,9 +72,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "7", + "line": 11, "name": "mutants/7/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -70,9 +84,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "8", + "line": 11, "name": "mutants/8/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -80,9 +96,11 @@ "repl": "%" }, { + "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "9", + "line": 17, "name": "mutants/9/MultipleContracts/C.sol", "op": "LVR", "orig": "1", @@ -90,9 +108,11 @@ "repl": "0" }, { + "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "10", + "line": 17, "name": "mutants/10/MultipleContracts/C.sol", "op": "LVR", "orig": "1", @@ -100,9 +120,11 @@ "repl": "2" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "11", + "line": 18, "name": "mutants/11/MultipleContracts/C.sol", "op": "STD", "orig": "a[0] = msg.sender", @@ -110,9 +132,11 @@ "repl": "assert(true)" }, { + "col": 11, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "12", + "line": 18, "name": "mutants/12/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -120,9 +144,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "13", + "line": 19, "name": "mutants/13/MultipleContracts/C.sol", "op": "STD", "orig": "return a", @@ -130,9 +156,11 @@ "repl": "assert(true)" }, { + "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "14", + "line": 23, "name": "mutants/14/MultipleContracts/C.sol", "op": "LVR", "orig": "10", @@ -140,9 +168,11 @@ "repl": "0" }, { + "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "15", + "line": 23, "name": "mutants/15/MultipleContracts/C.sol", "op": "LVR", "orig": "10", @@ -150,9 +180,11 @@ "repl": "11" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "16", + "line": 24, "name": "mutants/16/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -160,9 +192,11 @@ "repl": "+" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "17", + "line": 24, "name": "mutants/17/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -170,9 +204,11 @@ "repl": "-" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "18", + "line": 24, "name": "mutants/18/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -180,9 +216,11 @@ "repl": "*" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "19", + "line": 24, "name": "mutants/19/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -190,9 +228,11 @@ "repl": "/" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "20", + "line": 24, "name": "mutants/20/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -200,9 +240,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "21", + "line": 25, "name": "mutants/21/MultipleContracts/C.sol", "op": "STD", "orig": "return res", @@ -210,9 +252,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "22", + "line": 25, "name": "mutants/22/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -220,9 +264,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "23", + "line": 25, "name": "mutants/23/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -230,9 +276,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "24", + "line": 29, "name": "mutants/24/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", @@ -240,9 +288,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "25", + "line": 29, "name": "mutants/25/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", @@ -250,9 +300,11 @@ "repl": "false" }, { + "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "26", + "line": 29, "name": "mutants/26/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -260,9 +312,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "27", + "line": 34, "name": "mutants/27/MultipleContracts/C.sol", "op": "STD", "orig": "Utils.getarray(b, address(this))", @@ -270,9 +324,11 @@ "repl": "assert(true)" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "28", + "line": 38, "name": "mutants/28/MultipleContracts/C.sol", "op": "STD", "orig": "return c + d", @@ -280,9 +336,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "29", + "line": 38, "name": "mutants/29/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -290,9 +348,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "30", + "line": 38, "name": "mutants/30/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -300,9 +360,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "31", + "line": 38, "name": "mutants/31/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -310,9 +372,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "32", + "line": 38, "name": "mutants/32/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -320,9 +384,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "33", + "line": 7, "name": "mutants/33/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", @@ -330,9 +396,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "34", + "line": 7, "name": "mutants/34/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", @@ -340,9 +408,11 @@ "repl": "false" }, { + "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "35", + "line": 7, "name": "mutants/35/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -350,9 +420,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "36", + "line": 11, "name": "mutants/36/MultipleContracts/C.sol", "op": "STD", "orig": "return a + b", @@ -360,9 +432,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "37", + "line": 11, "name": "mutants/37/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -370,9 +444,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "38", + "line": 11, "name": "mutants/38/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -380,9 +456,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "39", + "line": 11, "name": "mutants/39/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -390,9 +468,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "40", + "line": 11, "name": "mutants/40/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -400,9 +480,11 @@ "repl": "%" }, { + "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "41", + "line": 17, "name": "mutants/41/MultipleContracts/C.sol", "op": "LVR", "orig": "1", @@ -410,9 +492,11 @@ "repl": "0" }, { + "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "42", + "line": 17, "name": "mutants/42/MultipleContracts/C.sol", "op": "LVR", "orig": "1", @@ -420,9 +504,11 @@ "repl": "2" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "43", + "line": 18, "name": "mutants/43/MultipleContracts/C.sol", "op": "STD", "orig": "a[0] = msg.sender", @@ -430,9 +516,11 @@ "repl": "assert(true)" }, { + "col": 11, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "44", + "line": 18, "name": "mutants/44/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -440,9 +528,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "45", + "line": 19, "name": "mutants/45/MultipleContracts/C.sol", "op": "STD", "orig": "return a", @@ -450,9 +540,11 @@ "repl": "assert(true)" }, { + "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "46", + "line": 23, "name": "mutants/46/MultipleContracts/C.sol", "op": "LVR", "orig": "10", @@ -460,9 +552,11 @@ "repl": "0" }, { + "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "47", + "line": 23, "name": "mutants/47/MultipleContracts/C.sol", "op": "LVR", "orig": "10", @@ -470,9 +564,11 @@ "repl": "11" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "48", + "line": 24, "name": "mutants/48/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -480,9 +576,11 @@ "repl": "+" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "49", + "line": 24, "name": "mutants/49/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -490,9 +588,11 @@ "repl": "-" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "50", + "line": 24, "name": "mutants/50/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -500,9 +600,11 @@ "repl": "*" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "51", + "line": 24, "name": "mutants/51/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -510,9 +612,11 @@ "repl": "/" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "52", + "line": 24, "name": "mutants/52/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -520,9 +624,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "53", + "line": 25, "name": "mutants/53/MultipleContracts/C.sol", "op": "STD", "orig": "return res", @@ -530,9 +636,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "54", + "line": 25, "name": "mutants/54/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -540,9 +648,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "55", + "line": 25, "name": "mutants/55/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -550,9 +660,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "56", + "line": 29, "name": "mutants/56/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", @@ -560,9 +672,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "57", + "line": 29, "name": "mutants/57/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", @@ -570,9 +684,11 @@ "repl": "false" }, { + "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "58", + "line": 29, "name": "mutants/58/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -580,9 +696,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "59", + "line": 34, "name": "mutants/59/MultipleContracts/C.sol", "op": "STD", "orig": "Utils.getarray(b, address(this))", @@ -590,9 +708,11 @@ "repl": "assert(true)" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "60", + "line": 38, "name": "mutants/60/MultipleContracts/C.sol", "op": "STD", "orig": "return c + d", @@ -600,9 +720,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "61", + "line": 38, "name": "mutants/61/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -610,9 +732,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "62", + "line": 38, "name": "mutants/62/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -620,9 +744,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "63", + "line": 38, "name": "mutants/63/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -630,9 +756,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "64", + "line": 38, "name": "mutants/64/MultipleContracts/C.sol", "op": "AOR", "orig": "+", diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants.log b/resources/regressions/test_multiple_contracts_3.json/mutants.log index 34c109e1..a102393f 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_3.json/mutants.log @@ -1,64 +1,64 @@ -1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -2,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false -3,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 -4,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -9,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -10,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -11,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 -13,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -14,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -15,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -22,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 -23,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 -24,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -25,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -26,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 -27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% -33,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -34,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false -35,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 -36,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 -45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -46,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -47,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -51,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -52,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -54,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 -55,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 -56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -57,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -58,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 -59,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -60,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -61,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -62,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -63,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -64,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) +2,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false +3,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 +4,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) +5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- +6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* +7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ +8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% +9,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 +10,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 +11,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) +12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 +13,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) +14,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 +15,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 +16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ +17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- +18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* +19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ +20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% +21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) +22,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 +23,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 +24,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +25,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +26,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 +27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% +33,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) +34,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false +35,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 +36,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) +37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* +39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ +40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% +41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 +42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) +44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 +45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) +46,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 +47,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* +51,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ +52,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% +53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) +54,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 +55,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 +56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +57,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +58,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 +59,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +60,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) +61,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +62,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +63,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +64,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json index df026e60..4da88457 100644 --- a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "1", + "line": 7, "name": "mutants/1/MultipleContracts/C.sol", "op": "EVR", "orig": "c[0] == e", @@ -10,9 +12,11 @@ "repl": "true" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "2", + "line": 7, "name": "mutants/2/MultipleContracts/C.sol", "op": "EVR", "orig": "c[0] == e", @@ -20,9 +24,11 @@ "repl": "false" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "3", + "line": 11, "name": "mutants/3/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -30,9 +36,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "4", + "line": 11, "name": "mutants/4/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -40,9 +48,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "5", + "line": 11, "name": "mutants/5/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -50,9 +60,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "6", + "line": 11, "name": "mutants/6/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -60,9 +72,11 @@ "repl": "%" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "7", + "line": 24, "name": "mutants/7/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -70,9 +84,11 @@ "repl": "+" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "8", + "line": 24, "name": "mutants/8/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -80,9 +96,11 @@ "repl": "-" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "9", + "line": 24, "name": "mutants/9/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -90,9 +108,11 @@ "repl": "*" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "10", + "line": 24, "name": "mutants/10/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -100,9 +120,11 @@ "repl": "/" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "11", + "line": 24, "name": "mutants/11/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -110,9 +132,11 @@ "repl": "%" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "12", + "line": 25, "name": "mutants/12/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -120,9 +144,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "13", + "line": 25, "name": "mutants/13/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -130,9 +156,11 @@ "repl": "1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "14", + "line": 29, "name": "mutants/14/MultipleContracts/C.sol", "op": "EVR", "orig": "c[0] == e", @@ -140,9 +168,11 @@ "repl": "true" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "15", + "line": 29, "name": "mutants/15/MultipleContracts/C.sol", "op": "EVR", "orig": "c[0] == e", @@ -150,9 +180,11 @@ "repl": "false" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "16", + "line": 38, "name": "mutants/16/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -160,9 +192,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "17", + "line": 38, "name": "mutants/17/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -170,9 +204,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "18", + "line": 38, "name": "mutants/18/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -180,9 +216,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "19", + "line": 38, "name": "mutants/19/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -190,9 +228,11 @@ "repl": "%" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "20", + "line": 7, "name": "mutants/20/MultipleContracts/C.sol", "op": "EVR", "orig": "c[0] == e", @@ -200,9 +240,11 @@ "repl": "true" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "21", + "line": 7, "name": "mutants/21/MultipleContracts/C.sol", "op": "EVR", "orig": "c[0] == e", @@ -210,9 +252,11 @@ "repl": "false" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "22", + "line": 11, "name": "mutants/22/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -220,9 +264,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "23", + "line": 11, "name": "mutants/23/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -230,9 +276,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "24", + "line": 11, "name": "mutants/24/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -240,9 +288,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "25", + "line": 11, "name": "mutants/25/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -250,9 +300,11 @@ "repl": "%" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "26", + "line": 24, "name": "mutants/26/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -260,9 +312,11 @@ "repl": "+" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "27", + "line": 24, "name": "mutants/27/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -270,9 +324,11 @@ "repl": "-" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "28", + "line": 24, "name": "mutants/28/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -280,9 +336,11 @@ "repl": "*" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "29", + "line": 24, "name": "mutants/29/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -290,9 +348,11 @@ "repl": "/" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "30", + "line": 24, "name": "mutants/30/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -300,9 +360,11 @@ "repl": "%" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "31", + "line": 25, "name": "mutants/31/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -310,9 +372,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "32", + "line": 25, "name": "mutants/32/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -320,9 +384,11 @@ "repl": "1" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "33", + "line": 29, "name": "mutants/33/MultipleContracts/C.sol", "op": "EVR", "orig": "c[0] == e", @@ -330,9 +396,11 @@ "repl": "true" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "34", + "line": 29, "name": "mutants/34/MultipleContracts/C.sol", "op": "EVR", "orig": "c[0] == e", @@ -340,9 +408,11 @@ "repl": "false" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "35", + "line": 38, "name": "mutants/35/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -350,9 +420,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "36", + "line": 38, "name": "mutants/36/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -360,9 +432,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "37", + "line": 38, "name": "mutants/37/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -370,9 +444,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "38", + "line": 38, "name": "mutants/38/MultipleContracts/C.sol", "op": "AOR", "orig": "+", diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants.log b/resources/regressions/test_multiple_contracts_4.json/mutants.log index 97c4751e..b1576d09 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_4.json/mutants.log @@ -1,38 +1,38 @@ -1,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,true -2,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false -3,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -4,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -9,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -10,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -11,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -12,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 -13,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 -14,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,true -15,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% -20,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,true -21,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false -22,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -23,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -24,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -25,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -26,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -31,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 -32,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 -33,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,true -34,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +1,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,true +2,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false +3,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- +4,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* +5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ +6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% +7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ +8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- +9,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* +10,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ +11,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% +12,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 +13,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 +14,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,true +15,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% +20,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,true +21,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false +22,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- +23,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* +24,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ +25,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% +26,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ +27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- +28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% +31,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 +32,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 +33,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,true +34,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_files_1.json/gambit_results.json b/resources/regressions/test_multiple_files_1.json/gambit_results.json index 05795c41..40546083 100644 --- a/resources/regressions/test_multiple_files_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_files_1.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "1", + "line": 13, "name": "mutants/1/Ops/AOR/AOR.sol", "op": "STD", "orig": "return a + b", @@ -10,9 +12,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "2", + "line": 13, "name": "mutants/2/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -20,9 +24,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "3", + "line": 13, "name": "mutants/3/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -30,9 +36,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "4", + "line": 13, "name": "mutants/4/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -40,9 +48,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "5", + "line": 13, "name": "mutants/5/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -50,9 +60,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "6", + "line": 22, "name": "mutants/6/Ops/AOR/AOR.sol", "op": "STD", "orig": "return a - b", @@ -60,9 +72,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "7", + "line": 22, "name": "mutants/7/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -70,9 +84,11 @@ "repl": "+" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "8", + "line": 22, "name": "mutants/8/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -80,9 +96,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "9", + "line": 22, "name": "mutants/9/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -90,9 +108,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "10", + "line": 22, "name": "mutants/10/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -100,9 +120,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "11", + "line": 34, "name": "mutants/11/Ops/AOR/AOR.sol", "op": "STD", "orig": "return ((a)) * b", @@ -110,9 +132,11 @@ "repl": "assert(true)" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "12", + "line": 34, "name": "mutants/12/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -120,9 +144,11 @@ "repl": "+" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "13", + "line": 34, "name": "mutants/13/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -130,9 +156,11 @@ "repl": "-" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "14", + "line": 34, "name": "mutants/14/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -140,9 +168,11 @@ "repl": "/" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "15", + "line": 34, "name": "mutants/15/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -150,9 +180,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "16", + "line": 47, "name": "mutants/16/Ops/AOR/AOR.sol", "op": "STD", "orig": "return ((a)) * b", @@ -160,9 +192,11 @@ "repl": "assert(true)" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "17", + "line": 47, "name": "mutants/17/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -170,9 +204,11 @@ "repl": "+" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "18", + "line": 47, "name": "mutants/18/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -180,9 +216,11 @@ "repl": "-" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "19", + "line": 47, "name": "mutants/19/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -190,9 +228,11 @@ "repl": "/" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "20", + "line": 47, "name": "mutants/20/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -200,9 +240,11 @@ "repl": "**" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "21", + "line": 47, "name": "mutants/21/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -210,9 +252,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ assert(true);\n }\n }\n", "id": "22", + "line": 58, "name": "mutants/22/Ops/AOR/AOR.sol", "op": "STD", "orig": "return a ** b", @@ -220,9 +264,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "23", + "line": 58, "name": "mutants/23/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -230,9 +276,11 @@ "repl": "+" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "24", + "line": 58, "name": "mutants/24/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -240,9 +288,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "25", + "line": 58, "name": "mutants/25/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -250,9 +300,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "26", + "line": 58, "name": "mutants/26/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -260,9 +312,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "27", + "line": 58, "name": "mutants/27/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -270,9 +324,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "28", + "line": 7, "name": "mutants/28/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", @@ -280,9 +336,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "29", + "line": 7, "name": "mutants/29/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", @@ -290,9 +348,11 @@ "repl": "false" }, { + "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", "id": "30", + "line": 7, "name": "mutants/30/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -300,9 +360,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", "id": "31", + "line": 11, "name": "mutants/31/MultipleContracts/C.sol", "op": "STD", "orig": "return a + b", @@ -310,9 +372,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", "id": "32", + "line": 11, "name": "mutants/32/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -320,9 +384,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", "id": "33", + "line": 11, "name": "mutants/33/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -330,9 +396,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", "id": "34", + "line": 11, "name": "mutants/34/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -340,9 +408,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", "id": "35", + "line": 11, "name": "mutants/35/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -350,9 +420,11 @@ "repl": "%" }, { + "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", "id": "36", + "line": 17, "name": "mutants/36/MultipleContracts/C.sol", "op": "LVR", "orig": "1", @@ -360,9 +432,11 @@ "repl": "0" }, { + "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", "id": "37", + "line": 17, "name": "mutants/37/MultipleContracts/C.sol", "op": "LVR", "orig": "1", @@ -370,9 +444,11 @@ "repl": "2" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", "id": "38", + "line": 18, "name": "mutants/38/MultipleContracts/C.sol", "op": "STD", "orig": "a[0] = msg.sender", @@ -380,9 +456,11 @@ "repl": "assert(true)" }, { + "col": 11, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", "id": "39", + "line": 18, "name": "mutants/39/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -390,9 +468,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", "id": "40", + "line": 19, "name": "mutants/40/MultipleContracts/C.sol", "op": "STD", "orig": "return a", @@ -400,9 +480,11 @@ "repl": "assert(true)" }, { + "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "41", + "line": 23, "name": "mutants/41/MultipleContracts/C.sol", "op": "LVR", "orig": "10", @@ -410,9 +492,11 @@ "repl": "0" }, { + "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", "id": "42", + "line": 23, "name": "mutants/42/MultipleContracts/C.sol", "op": "LVR", "orig": "10", @@ -420,9 +504,11 @@ "repl": "11" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", "id": "43", + "line": 24, "name": "mutants/43/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -430,9 +516,11 @@ "repl": "+" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", "id": "44", + "line": 24, "name": "mutants/44/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -440,9 +528,11 @@ "repl": "-" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", "id": "45", + "line": 24, "name": "mutants/45/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -450,9 +540,11 @@ "repl": "*" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", "id": "46", + "line": 24, "name": "mutants/46/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -460,9 +552,11 @@ "repl": "/" }, { + "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", "id": "47", + "line": 24, "name": "mutants/47/MultipleContracts/C.sol", "op": "AOR", "orig": "**", @@ -470,9 +564,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "48", + "line": 25, "name": "mutants/48/MultipleContracts/C.sol", "op": "STD", "orig": "return res", @@ -480,9 +576,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "49", + "line": 25, "name": "mutants/49/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -490,9 +588,11 @@ "repl": "0" }, { + "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", "id": "50", + "line": 25, "name": "mutants/50/MultipleContracts/C.sol", "op": "EVR", "orig": "res", @@ -500,9 +600,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", "id": "51", + "line": 29, "name": "mutants/51/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", @@ -510,9 +612,11 @@ "repl": "assert(true)" }, { + "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", "id": "52", + "line": 29, "name": "mutants/52/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", @@ -520,9 +624,11 @@ "repl": "false" }, { + "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", "id": "53", + "line": 29, "name": "mutants/53/MultipleContracts/C.sol", "op": "LVR", "orig": "0", @@ -530,9 +636,11 @@ "repl": "1" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "54", + "line": 34, "name": "mutants/54/MultipleContracts/C.sol", "op": "STD", "orig": "Utils.getarray(b, address(this))", @@ -540,9 +648,11 @@ "repl": "assert(true)" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", "id": "55", + "line": 38, "name": "mutants/55/MultipleContracts/C.sol", "op": "STD", "orig": "return c + d", @@ -550,9 +660,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", "id": "56", + "line": 38, "name": "mutants/56/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -560,9 +672,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", "id": "57", + "line": 38, "name": "mutants/57/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -570,9 +684,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", "id": "58", + "line": 38, "name": "mutants/58/MultipleContracts/C.sol", "op": "AOR", "orig": "+", @@ -580,9 +696,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", "id": "59", + "line": 38, "name": "mutants/59/MultipleContracts/C.sol", "op": "AOR", "orig": "+", diff --git a/resources/regressions/test_multiple_files_1.json/mutants.log b/resources/regressions/test_multiple_files_1.json/mutants.log index ff926312..3684a932 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants.log +++ b/resources/regressions/test_multiple_files_1.json/mutants.log @@ -1,59 +1,59 @@ -1,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:0,return a + b,assert(true) -2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,- -3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,* -4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,/ -5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,% -6,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:0,return a - b,assert(true) -7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,+ -8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,* -9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,/ -10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,% -11,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:0,return ((a)) * b,assert(true) -12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,+ -13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,- -14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,/ -15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,% -16,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:0,return ((a)) * b,assert(true) -17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,+ -18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,- -19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,/ -20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,** -21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,% -22,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:0,return a ** b,assert(true) -23,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,+ -24,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,- -25,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,* -26,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,/ -27,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,% -28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:0,assert(c[0] == e),assert(true) -29,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:7,c[0] == e,false -30,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,6:9,0,1 -31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:0,return a + b,assert(true) -32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,- -33,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,* -34,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,/ -35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,10:9,+,% -36,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,0 -37,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,16:35,1,2 -38,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:0,a[0] = msg.sender,assert(true) -39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:2,0,1 -40,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:0,return a,assert(true) -41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,0 -42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,22:12,10,11 -43,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,+ -44,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,- -45,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,* -46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,/ -47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:16,**,% -48,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:0,return res,assert(true) -49,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,0 -50,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:7,res,1 -51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:0,assert(c[0] == e),assert(true) -52,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:7,c[0] == e,false -53,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,28:9,0,1 -54,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,33:0,"Utils.getarray(b, address(this))",assert(true) -55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:0,return c + d,assert(true) -56,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,- -57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,* -58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,/ -59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,37:9,+,% +1,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:9,return a + b,assert(true) +2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,- +3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,* +4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,/ +5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,% +6,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:9,return a - b,assert(true) +7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,+ +8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,* +9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,/ +10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,% +11,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:9,return ((a)) * b,assert(true) +12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,+ +13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,- +14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,/ +15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,% +16,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:9,return ((a)) * b,assert(true) +17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,+ +18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,- +19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,/ +20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,** +21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,% +22,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:9,return a ** b,assert(true) +23,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,+ +24,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,- +25,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,* +26,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,/ +27,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,% +28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) +29,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false +30,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 +31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) +32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- +33,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* +34,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ +35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% +36,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 +37,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 +38,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) +39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 +40,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) +41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 +42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 +43,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ +44,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- +45,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* +46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ +47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% +48,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) +49,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 +50,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 +51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +52,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +53,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 +54,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) +56,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_no_export.json/gambit_results.json b/resources/regressions/test_no_export.json/gambit_results.json index 3acbff95..a4acd5d6 100644 --- a/resources/regressions/test_no_export.json/gambit_results.json +++ b/resources/regressions/test_no_export.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "1", + "line": 13, "name": "mutants/1/AOR/AOR.sol", "op": "STD", "orig": "return a + b", @@ -10,9 +12,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "2", + "line": 13, "name": "mutants/2/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -20,9 +24,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "3", + "line": 13, "name": "mutants/3/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -30,9 +36,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "4", + "line": 13, "name": "mutants/4/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -40,9 +48,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "5", + "line": 13, "name": "mutants/5/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -50,9 +60,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "6", + "line": 22, "name": "mutants/6/AOR/AOR.sol", "op": "STD", "orig": "return a - b", @@ -60,9 +72,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "7", + "line": 22, "name": "mutants/7/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -70,9 +84,11 @@ "repl": "+" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `*`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "8", + "line": 22, "name": "mutants/8/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -80,9 +96,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `/`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a / b;\n }\n \n // Expect 4 mutants:\n", "id": "9", + "line": 22, "name": "mutants/9/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -90,9 +108,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `%`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "10", + "line": 22, "name": "mutants/10/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -100,9 +120,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "11", + "line": 34, "name": "mutants/11/AOR/AOR.sol", "op": "STD", "orig": "return ((a)) * b", @@ -110,9 +132,11 @@ "repl": "assert(true)" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "12", + "line": 34, "name": "mutants/12/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -120,9 +144,11 @@ "repl": "+" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "13", + "line": 34, "name": "mutants/13/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -130,9 +156,11 @@ "repl": "-" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "14", + "line": 34, "name": "mutants/14/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -140,9 +168,11 @@ "repl": "/" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "15", + "line": 34, "name": "mutants/15/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -150,9 +180,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// StatementDeletion(`return ((a)) * b` |==> `assert(true)`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ assert(true);\n }\n \n // Expect 5 mutants:\n", "id": "16", + "line": 47, "name": "mutants/16/AOR/AOR.sol", "op": "STD", "orig": "return ((a)) * b", @@ -160,9 +192,11 @@ "repl": "assert(true)" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "17", + "line": 47, "name": "mutants/17/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -170,9 +204,11 @@ "repl": "+" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "18", + "line": 47, "name": "mutants/18/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -180,9 +216,11 @@ "repl": "-" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "19", + "line": 47, "name": "mutants/19/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -190,9 +228,11 @@ "repl": "/" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "20", + "line": 47, "name": "mutants/20/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -200,9 +240,11 @@ "repl": "**" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "21", + "line": 47, "name": "mutants/21/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -210,9 +252,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// StatementDeletion(`return a ** b` |==> `assert(true)`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ assert(true);\n }\n }\n", "id": "22", + "line": 58, "name": "mutants/22/AOR/AOR.sol", "op": "STD", "orig": "return a ** b", @@ -220,9 +264,11 @@ "repl": "assert(true)" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "23", + "line": 58, "name": "mutants/23/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -230,9 +276,11 @@ "repl": "+" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a - b;\n }\n }\n", "id": "24", + "line": 58, "name": "mutants/24/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -240,9 +288,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "25", + "line": 58, "name": "mutants/25/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -250,9 +300,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a / b;\n }\n }\n", "id": "26", + "line": 58, "name": "mutants/26/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -260,9 +312,11 @@ "repl": "/" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a % b;\n }\n }\n", "id": "27", + "line": 58, "name": "mutants/27/AOR/AOR.sol", "op": "AOR", "orig": "**", @@ -270,9 +324,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n \n // Expect 1 mutants:\n // a | b;\n+ /// StatementDeletion(`return a ^ b` |==> `assert(true)`) of: `return a ^ b;`\n function bw_xor(int256 a, int256 b) public pure returns (int256) {\n- return a ^ b;\n+ assert(true);\n }\n }\n", "id": "28", + "line": 22, "name": "mutants/28/BOR/BOR.sol", "op": "STD", "orig": "return a ^ b", diff --git a/resources/regressions/test_no_export.json/mutants.log b/resources/regressions/test_no_export.json/mutants.log index 5d00636d..264b99a8 100644 --- a/resources/regressions/test_no_export.json/mutants.log +++ b/resources/regressions/test_no_export.json/mutants.log @@ -1,28 +1,28 @@ -1,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:0,return a + b,assert(true) -2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,- -3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,* -4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,/ -5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,% -6,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:0,return a - b,assert(true) -7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,+ -8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,* -9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,/ -10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,% -11,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:0,return ((a)) * b,assert(true) -12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,+ -13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,- -14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,/ -15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,% -16,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:0,return ((a)) * b,assert(true) -17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,+ -18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,- -19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,/ -20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,** -21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,% -22,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:0,return a ** b,assert(true) -23,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,+ -24,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,- -25,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,* -26,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,/ -27,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,% -28,STD,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,21:0,return a ^ b,assert(true) +1,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:9,return a + b,assert(true) +2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,- +3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,* +4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,/ +5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,% +6,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:9,return a - b,assert(true) +7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,+ +8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,* +9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,/ +10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,% +11,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:9,return ((a)) * b,assert(true) +12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,+ +13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,- +14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,/ +15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,% +16,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:9,return ((a)) * b,assert(true) +17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,+ +18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,- +19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,/ +20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,** +21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,% +22,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:9,return a ** b,assert(true) +23,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,+ +24,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,- +25,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,* +26,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,/ +27,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,% +28,STD,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,22:9,return a ^ b,assert(true) diff --git a/resources/regressions/test_num_mutants.json/gambit_results.json b/resources/regressions/test_num_mutants.json/gambit_results.json index e16f5de7..5d00522d 100644 --- a/resources/regressions/test_num_mutants.json/gambit_results.json +++ b/resources/regressions/test_num_mutants.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a - b;\n }\n \n // Expect 4 mutants:\n", "id": "1", + "line": 13, "name": "mutants/1/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -10,9 +12,11 @@ "repl": "-" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "2", + "line": 34, "name": "mutants/2/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -20,9 +24,11 @@ "repl": "-" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `/`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) / b;\n }\n \n // Expect 5 mutants:\n", "id": "3", + "line": 47, "name": "mutants/3/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -30,9 +36,11 @@ "repl": "/" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `**`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) ** b;\n }\n \n // Expect 5 mutants:\n", "id": "4", + "line": 47, "name": "mutants/4/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -40,9 +48,11 @@ "repl": "**" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a * b;\n }\n }\n", "id": "5", + "line": 58, "name": "mutants/5/AOR/AOR.sol", "op": "AOR", "orig": "**", diff --git a/resources/regressions/test_num_mutants.json/mutants.log b/resources/regressions/test_num_mutants.json/mutants.log index 1be4cba1..afdab016 100644 --- a/resources/regressions/test_num_mutants.json/mutants.log +++ b/resources/regressions/test_num_mutants.json/mutants.log @@ -1,5 +1,5 @@ -1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,- -2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,- -3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,/ -4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,** -5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,* +1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,- +2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,- +3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,/ +4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,** +5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,* diff --git a/resources/regressions/test_seed.json/gambit_results.json b/resources/regressions/test_seed.json/gambit_results.json index 47adc18c..edec1668 100644 --- a/resources/regressions/test_seed.json/gambit_results.json +++ b/resources/regressions/test_seed.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a * b;\n }\n \n // Expect 4 mutants:\n", "id": "1", + "line": 13, "name": "mutants/1/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -10,9 +12,11 @@ "repl": "*" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`-` |==> `+`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ return a + b;\n }\n \n // Expect 4 mutants:\n", "id": "2", + "line": 22, "name": "mutants/2/AOR/AOR.sol", "op": "AOR", "orig": "-", @@ -20,9 +24,11 @@ "repl": "+" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "3", + "line": 34, "name": "mutants/3/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -30,9 +36,11 @@ "repl": "-" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `+`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) + b;\n }\n \n // Expect 5 mutants:\n", "id": "4", + "line": 47, "name": "mutants/4/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -40,9 +48,11 @@ "repl": "+" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "5", + "line": 47, "name": "mutants/5/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -50,9 +60,11 @@ "repl": "%" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n // a * b\n // a / b\n // a % b\n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function plus(int256 a, int256 b) public pure returns (int256) {\n- return a + b;\n+ return a % b;\n }\n \n // Expect 4 mutants:\n", "id": "6", + "line": 13, "name": "mutants/6/AOR/AOR.sol", "op": "AOR", "orig": "+", @@ -60,9 +72,11 @@ "repl": "%" }, { + "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n // a * b\n // a / b\n // a % b\n+ /// StatementDeletion(`return a - b` |==> `assert(true)`) of: `return a - b;`\n function minus(int256 a, int256 b) public pure returns (int256) {\n- return a - b;\n+ assert(true);\n }\n \n // Expect 4 mutants:\n", "id": "7", + "line": 22, "name": "mutants/7/AOR/AOR.sol", "op": "STD", "orig": "return a - b", @@ -70,9 +84,11 @@ "repl": "assert(true)" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n function times_with_parens(\n int256 a,\n int256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `%`) of: `return ((a)) * b;`\n ) public pure returns (int256) {\n- return ((a)) * b;\n+ return ((a)) % b;\n }\n \n // Expect 5 mutants:\n", "id": "8", + "line": 34, "name": "mutants/8/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -80,9 +96,11 @@ "repl": "%" }, { + "col": 22, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -43,8 +43,9 @@\n function unsigned_times_with_parens(\n uint256 a,\n uint256 b\n+ /// ArithmeticOperatorReplacement(`*` |==> `-`) of: `return ((a)) * b;`\n ) public pure returns (uint256) {\n- return ((a)) * b;\n+ return ((a)) - b;\n }\n \n // Expect 5 mutants:\n", "id": "9", + "line": 47, "name": "mutants/9/AOR/AOR.sol", "op": "AOR", "orig": "*", @@ -90,9 +108,11 @@ "repl": "-" }, { + "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -54,7 +54,8 @@\n // a * b\n // a % b\n \n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `return a ** b;`\n function power(uint256 a, uint256 b) public pure returns (uint256) {\n- return a ** b;\n+ return a + b;\n }\n }\n", "id": "10", + "line": 58, "name": "mutants/10/AOR/AOR.sol", "op": "AOR", "orig": "**", diff --git a/resources/regressions/test_seed.json/mutants.log b/resources/regressions/test_seed.json/mutants.log index 5d0ca5d6..a4cd224f 100644 --- a/resources/regressions/test_seed.json/mutants.log +++ b/resources/regressions/test_seed.json/mutants.log @@ -1,10 +1,10 @@ -1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,* -2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:9,-,+ -3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,- -4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,+ -5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,% -6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,12:9,+,% -7,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,21:0,return a - b,assert(true) -8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,33:13,*,% -9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,46:13,*,- -10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,57:9,**,+ +1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,* +2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,+ +3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,- +4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,+ +5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,% +6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,% +7,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:9,return a - b,assert(true) +8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,% +9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,- +10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,+ diff --git a/resources/regressions/uor.json/gambit_results.json b/resources/regressions/uor.json/gambit_results.json index f4a69620..b793a020 100644 --- a/resources/regressions/uor.json/gambit_results.json +++ b/resources/regressions/uor.json/gambit_results.json @@ -1,8 +1,10 @@ [ { + "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", "id": "1", + "line": 14, "name": "mutants/1/Ops/UOR/UOR.sol", "op": "UOR", "orig": "~", @@ -10,9 +12,11 @@ "repl": " - " }, { + "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", "id": "2", + "line": 19, "name": "mutants/2/Ops/UOR/UOR.sol", "op": "UOR", "orig": "~", diff --git a/resources/regressions/uor.json/mutants.log b/resources/regressions/uor.json/mutants.log index ac8f7394..e8f32017 100644 --- a/resources/regressions/uor.json/mutants.log +++ b/resources/regressions/uor.json/mutants.log @@ -1,2 +1,2 @@ -1,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,13:7,~, - -2,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,18:7,~, ~ +1,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~, - +2,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,~, ~ From 67d1008ac332a795298a8c21771ed594f9b0f6d5 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 5 Aug 2023 16:45:31 -0700 Subject: [PATCH 089/200] Print error message instead of log --- src/summary.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/summary.rs b/src/summary.rs index 20738ff9..056edb41 100644 --- a/src/summary.rs +++ b/src/summary.rs @@ -45,10 +45,10 @@ pub fn summarize(params: SummaryParams) -> Result<(), Box> { }; if !&mutation_dir.is_dir() { - log::error!("Missing mutation directory: `{}`", mutation_dir.display()); - log::error!("Suggestions:"); - log::error!(" [+] Run `gambit mutate` to generate mutants"); - log::error!(" [+] Use the `--mutation-directory` flag to specify a different location"); + println!("Missing mutation directory: `{}`", mutation_dir.display()); + println!("Suggestions:"); + println!(" [+] Run `gambit mutate` to generate mutants"); + println!(" [+] Use the `--mutation-directory` flag to specify a different location"); std::process::exit(1); } else if !&gambit_results_json_path.is_file() { log::error!( From 1ca08b65972e5b596a1c777be89f30d90dfd5802 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 5 Aug 2023 16:55:44 -0700 Subject: [PATCH 090/200] Updated summary --- src/summary.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/summary.rs b/src/summary.rs index 056edb41..3b79c03e 100644 --- a/src/summary.rs +++ b/src/summary.rs @@ -14,6 +14,8 @@ struct MutantSummaryEntry { diff: String, op_long: String, op_short: String, + line: String, + col: String, orig: String, repl: String, } @@ -157,12 +159,24 @@ fn get_mutant_summary(i: usize, mutant_json: &Value) -> Option, short: bool fn print_short_mutant_summary(mutant_summary: &Option) { if let Some(summary) = mutant_summary { println!( - "({}) {} ({}) {} -> {}", + "({}) {} [{}@{}:{}] {} -> {}", ansi_term::Style::new().bold().paint(&summary.mid), ansi_term::Color::Blue.bold().paint(&summary.op_short), ansi_term::Style::new() .italic() .paint(&summary.mutant_export_location), + &summary.line, + &summary.col, ansi_term::Color::Green.paint(&summary.orig), ansi_term::Color::Red.bold().paint(&summary.repl), ) From 51fef5b1c1c01b60ac5de8767251eabfaa128e59 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 8 Aug 2023 13:21:50 -0700 Subject: [PATCH 091/200] Updates --- src/cli.rs | 4 ++-- src/mutation.rs | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 59db751e..318ac299 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -114,7 +114,7 @@ pub struct MutateParams { pub sourceroot: Option, /// Specify the mutation operators - #[arg(long, num_args(1..), conflicts_with = "json")] + #[arg(long, num_args(0..), conflicts_with = "json")] pub mutations: Option>, /// Specify _fallback mutation operators_. These operators are not applied @@ -124,7 +124,7 @@ pub struct MutateParams { /// EVR will only be applied to the full expression, and not to any /// subexpressions, and only if no mutants were generated for `a + b + c` or /// its subexpressions - #[arg(long, num_args(1..), conflicts_with = "json")] + #[arg(long, num_args(0..), conflicts_with = "json")] pub fallback_mutations: Option>, /// Skip mutant export diff --git a/src/mutation.rs b/src/mutation.rs index 0ba52af2..273f8a9e 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -1067,6 +1067,13 @@ fn expression_value_replacement( | Expression::Not { .. } | Expression::Or { .. } | Expression::And { .. } => defaults_by_type(&Type::Bool), + + Expression::InternalFunctionCall { returns, .. } + | Expression::ExternalFunctionCall { returns, .. } => match &returns[..] { + [ty] => defaults_by_type(&ty), + _ => vec![], + }, + _ => vec![], }; let mut mutants = vec![]; From f00d8a18a682bfb0240734e7bc1cc49e478368c9 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 8 Aug 2023 13:22:31 -0700 Subject: [PATCH 092/200] Reran regressions with updates --- .../regressions/evr.json/gambit_results.json | 72 ++++++++++++------- resources/regressions/evr.json/mutants.log | 26 +++---- .../evr.json/mutants/10/Ops/EVR/EVR.sol | 6 +- .../evr.json/mutants/11/Ops/EVR/EVR.sol | 6 +- .../evr.json/mutants/12/Ops/EVR/EVR.sol | 6 +- .../evr.json/mutants/13/Ops/EVR/EVR.sol | 6 +- .../evr.json/mutants/14/Ops/EVR/EVR.sol | 6 +- .../evr.json/mutants/15/Ops/EVR/EVR.sol | 25 +++++++ .../evr.json/mutants/16/Ops/EVR/EVR.sol | 25 +++++++ .../evr.json/mutants/3/Ops/EVR/EVR.sol | 6 +- .../evr.json/mutants/4/Ops/EVR/EVR.sol | 6 +- .../evr.json/mutants/5/Ops/EVR/EVR.sol | 6 +- .../evr.json/mutants/6/Ops/EVR/EVR.sol | 6 +- .../evr.json/mutants/7/Ops/EVR/EVR.sol | 6 +- .../evr.json/mutants/8/Ops/EVR/EVR.sol | 6 +- .../evr.json/mutants/9/Ops/EVR/EVR.sol | 6 +- 16 files changed, 148 insertions(+), 72 deletions(-) create mode 100644 resources/regressions/evr.json/mutants/15/Ops/EVR/EVR.sol create mode 100644 resources/regressions/evr.json/mutants/16/Ops/EVR/EVR.sol diff --git a/resources/regressions/evr.json/gambit_results.json b/resources/regressions/evr.json/gambit_results.json index 6f9e702d..6e096b71 100644 --- a/resources/regressions/evr.json/gambit_results.json +++ b/resources/regressions/evr.json/gambit_results.json @@ -23,13 +23,37 @@ "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", "repl": "1" }, + { + "col": 26, + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -8,8 +8,9 @@\n return a + b;\n }\n \n+ /// ExpressionValueReplacement(`add(a, b)` |==> `0`) of: `uint256 result = add(a, b);`\n function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) {\n- uint256 result = add(a, b);\n+ uint256 result = 0;\n return result;\n }\n \n", + "id": "3", + "line": 12, + "name": "mutants/3/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "add(a, b)", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "0" + }, + { + "col": 26, + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -8,8 +8,9 @@\n return a + b;\n }\n \n+ /// ExpressionValueReplacement(`add(a, b)` |==> `1`) of: `uint256 result = add(a, b);`\n function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) {\n- uint256 result = add(a, b);\n+ uint256 result = 1;\n return result;\n }\n \n", + "id": "4", + "line": 12, + "name": "mutants/4/Ops/EVR/EVR.sol", + "op": "EVR", + "orig": "add(a, b)", + "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "repl": "1" + }, { "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n }\n \n function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`result` |==> `0`) of: `return result;`\n uint256 result = add(a, b);\n- return result;\n+ return 0;\n }\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n", - "id": "3", + "id": "5", "line": 13, - "name": "mutants/3/Ops/EVR/EVR.sol", + "name": "mutants/5/Ops/EVR/EVR.sol", "op": "EVR", "orig": "result", "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", @@ -39,9 +63,9 @@ "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n }\n \n function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`result` |==> `1`) of: `return result;`\n uint256 result = add(a, b);\n- return result;\n+ return 1;\n }\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n", - "id": "4", + "id": "6", "line": 13, - "name": "mutants/4/Ops/EVR/EVR.sol", + "name": "mutants/6/Ops/EVR/EVR.sol", "op": "EVR", "orig": "result", "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", @@ -51,9 +75,9 @@ "col": 18, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n return result;\n }\n \n+ /// ExpressionValueReplacement(`a < b` |==> `true`) of: `bool c = a < b;`\n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n- bool c = a < b;\n+ bool c = true;\n while (c) {\n b = b - a;\n c = a < b;\n", - "id": "5", + "id": "7", "line": 17, - "name": "mutants/5/Ops/EVR/EVR.sol", + "name": "mutants/7/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a < b", "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", @@ -63,9 +87,9 @@ "col": 18, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n return result;\n }\n \n+ /// ExpressionValueReplacement(`a < b` |==> `false`) of: `bool c = a < b;`\n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n- bool c = a < b;\n+ bool c = false;\n while (c) {\n b = b - a;\n c = a < b;\n", - "id": "6", + "id": "8", "line": 17, - "name": "mutants/6/Ops/EVR/EVR.sol", + "name": "mutants/8/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a < b", "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", @@ -75,9 +99,9 @@ "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n }\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`c` |==> `true`) of: `while (c) {`\n bool c = a < b;\n- while (c) {\n+ while (true) {\n b = b - a;\n c = a < b;\n }\n", - "id": "7", + "id": "9", "line": 18, - "name": "mutants/7/Ops/EVR/EVR.sol", + "name": "mutants/9/Ops/EVR/EVR.sol", "op": "EVR", "orig": "c", "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", @@ -87,9 +111,9 @@ "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n }\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`c` |==> `false`) of: `while (c) {`\n bool c = a < b;\n- while (c) {\n+ while (false) {\n b = b - a;\n c = a < b;\n }\n", - "id": "8", + "id": "10", "line": 18, - "name": "mutants/8/Ops/EVR/EVR.sol", + "name": "mutants/10/Ops/EVR/EVR.sol", "op": "EVR", "orig": "c", "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", @@ -99,9 +123,9 @@ "col": 17, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n bool c = a < b;\n+ /// ExpressionValueReplacement(`b - a` |==> `0`) of: `b = b - a;`\n while (c) {\n- b = b - a;\n+ b = 0;\n c = a < b;\n }\n return a - b;\n", - "id": "9", + "id": "11", "line": 19, - "name": "mutants/9/Ops/EVR/EVR.sol", + "name": "mutants/11/Ops/EVR/EVR.sol", "op": "EVR", "orig": "b - a", "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", @@ -111,9 +135,9 @@ "col": 17, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n \n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n bool c = a < b;\n+ /// ExpressionValueReplacement(`b - a` |==> `1`) of: `b = b - a;`\n while (c) {\n- b = b - a;\n+ b = 1;\n c = a < b;\n }\n return a - b;\n", - "id": "10", + "id": "12", "line": 19, - "name": "mutants/10/Ops/EVR/EVR.sol", + "name": "mutants/12/Ops/EVR/EVR.sol", "op": "EVR", "orig": "b - a", "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", @@ -123,9 +147,9 @@ "col": 17, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -16,8 +16,9 @@\n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n bool c = a < b;\n while (c) {\n+ /// ExpressionValueReplacement(`a < b` |==> `true`) of: `c = a < b;`\n b = b - a;\n- c = a < b;\n+ c = true;\n }\n return a - b;\n }\n", - "id": "11", + "id": "13", "line": 20, - "name": "mutants/11/Ops/EVR/EVR.sol", + "name": "mutants/13/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a < b", "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", @@ -135,9 +159,9 @@ "col": 17, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -16,8 +16,9 @@\n function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) {\n bool c = a < b;\n while (c) {\n+ /// ExpressionValueReplacement(`a < b` |==> `false`) of: `c = a < b;`\n b = b - a;\n- c = a < b;\n+ c = false;\n }\n return a - b;\n }\n", - "id": "12", + "id": "14", "line": 20, - "name": "mutants/12/Ops/EVR/EVR.sol", + "name": "mutants/14/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a < b", "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", @@ -147,9 +171,9 @@ "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n while (c) {\n b = b - a;\n c = a < b;\n+ /// ExpressionValueReplacement(`a - b` |==> `0`) of: `return a - b;`\n }\n- return a - b;\n+ return 0;\n }\n }\n", - "id": "13", + "id": "15", "line": 22, - "name": "mutants/13/Ops/EVR/EVR.sol", + "name": "mutants/15/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a - b", "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", @@ -159,9 +183,9 @@ "col": 16, "description": "ExpressionValueReplacement", "diff": "--- original\n+++ mutant\n@@ -18,7 +18,8 @@\n while (c) {\n b = b - a;\n c = a < b;\n+ /// ExpressionValueReplacement(`a - b` |==> `1`) of: `return a - b;`\n }\n- return a - b;\n+ return 1;\n }\n }\n", - "id": "14", + "id": "16", "line": 22, - "name": "mutants/14/Ops/EVR/EVR.sol", + "name": "mutants/16/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a - b", "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", diff --git a/resources/regressions/evr.json/mutants.log b/resources/regressions/evr.json/mutants.log index e3601c96..aa2304ea 100644 --- a/resources/regressions/evr.json/mutants.log +++ b/resources/regressions/evr.json/mutants.log @@ -1,14 +1,16 @@ 1,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,8:16,a + b,0 2,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,8:16,a + b,1 -3,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,13:16,result,0 -4,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,13:16,result,1 -5,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,17:18,a < b,true -6,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,17:18,a < b,false -7,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,18:16,c,true -8,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,18:16,c,false -9,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,19:17,b - a,0 -10,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,19:17,b - a,1 -11,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,20:17,a < b,true -12,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,20:17,a < b,false -13,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,22:16,a - b,0 -14,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,22:16,a - b,1 +3,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,12:26,"add(a, b)",0 +4,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,12:26,"add(a, b)",1 +5,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,13:16,result,0 +6,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,13:16,result,1 +7,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,17:18,a < b,true +8,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,17:18,a < b,false +9,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,18:16,c,true +10,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,18:16,c,false +11,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,19:17,b - a,0 +12,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,19:17,b - a,1 +13,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,20:17,a < b,true +14,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,20:17,a < b,false +15,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,22:16,a - b,0 +16,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,22:16,a - b,1 diff --git a/resources/regressions/evr.json/mutants/10/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/10/Ops/EVR/EVR.sol index ebe50b7f..b8a6e6de 100644 --- a/resources/regressions/evr.json/mutants/10/Ops/EVR/EVR.sol +++ b/resources/regressions/evr.json/mutants/10/Ops/EVR/EVR.sol @@ -14,10 +14,10 @@ contract EVR { } function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + /// ExpressionValueReplacement(`c` |==> `false`) of: `while (c) {` bool c = a < b; - /// ExpressionValueReplacement(`b - a` |==> `1`) of: `b = b - a;` - while (c) { - b = 1; + while (false) { + b = b - a; c = a < b; } return a - b; diff --git a/resources/regressions/evr.json/mutants/11/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/11/Ops/EVR/EVR.sol index 0ad35872..c4d10472 100644 --- a/resources/regressions/evr.json/mutants/11/Ops/EVR/EVR.sol +++ b/resources/regressions/evr.json/mutants/11/Ops/EVR/EVR.sol @@ -15,10 +15,10 @@ contract EVR { function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { bool c = a < b; + /// ExpressionValueReplacement(`b - a` |==> `0`) of: `b = b - a;` while (c) { - /// ExpressionValueReplacement(`a < b` |==> `true`) of: `c = a < b;` - b = b - a; - c = true; + b = 0; + c = a < b; } return a - b; } diff --git a/resources/regressions/evr.json/mutants/12/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/12/Ops/EVR/EVR.sol index 82bacee7..ebe50b7f 100644 --- a/resources/regressions/evr.json/mutants/12/Ops/EVR/EVR.sol +++ b/resources/regressions/evr.json/mutants/12/Ops/EVR/EVR.sol @@ -15,10 +15,10 @@ contract EVR { function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { bool c = a < b; + /// ExpressionValueReplacement(`b - a` |==> `1`) of: `b = b - a;` while (c) { - /// ExpressionValueReplacement(`a < b` |==> `false`) of: `c = a < b;` - b = b - a; - c = false; + b = 1; + c = a < b; } return a - b; } diff --git a/resources/regressions/evr.json/mutants/13/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/13/Ops/EVR/EVR.sol index 8518990e..0ad35872 100644 --- a/resources/regressions/evr.json/mutants/13/Ops/EVR/EVR.sol +++ b/resources/regressions/evr.json/mutants/13/Ops/EVR/EVR.sol @@ -16,10 +16,10 @@ contract EVR { function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { bool c = a < b; while (c) { + /// ExpressionValueReplacement(`a < b` |==> `true`) of: `c = a < b;` b = b - a; - c = a < b; - /// ExpressionValueReplacement(`a - b` |==> `0`) of: `return a - b;` + c = true; } - return 0; + return a - b; } } diff --git a/resources/regressions/evr.json/mutants/14/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/14/Ops/EVR/EVR.sol index 940f678b..82bacee7 100644 --- a/resources/regressions/evr.json/mutants/14/Ops/EVR/EVR.sol +++ b/resources/regressions/evr.json/mutants/14/Ops/EVR/EVR.sol @@ -16,10 +16,10 @@ contract EVR { function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { bool c = a < b; while (c) { + /// ExpressionValueReplacement(`a < b` |==> `false`) of: `c = a < b;` b = b - a; - c = a < b; - /// ExpressionValueReplacement(`a - b` |==> `1`) of: `return a - b;` + c = false; } - return 1; + return a - b; } } diff --git a/resources/regressions/evr.json/mutants/15/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/15/Ops/EVR/EVR.sol new file mode 100644 index 00000000..8518990e --- /dev/null +++ b/resources/regressions/evr.json/mutants/15/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = a < b; + while (c) { + b = b - a; + c = a < b; + /// ExpressionValueReplacement(`a - b` |==> `0`) of: `return a - b;` + } + return 0; + } +} diff --git a/resources/regressions/evr.json/mutants/16/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/16/Ops/EVR/EVR.sol new file mode 100644 index 00000000..940f678b --- /dev/null +++ b/resources/regressions/evr.json/mutants/16/Ops/EVR/EVR.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract EVR { + function add(uint256 a, uint256 b) public pure returns (uint256) { + return a + b; + } + + function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + uint256 result = add(a, b); + return result; + } + + function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + bool c = a < b; + while (c) { + b = b - a; + c = a < b; + /// ExpressionValueReplacement(`a - b` |==> `1`) of: `return a - b;` + } + return 1; + } +} diff --git a/resources/regressions/evr.json/mutants/3/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/3/Ops/EVR/EVR.sol index f9ec895e..164554af 100644 --- a/resources/regressions/evr.json/mutants/3/Ops/EVR/EVR.sol +++ b/resources/regressions/evr.json/mutants/3/Ops/EVR/EVR.sol @@ -8,10 +8,10 @@ contract EVR { return a + b; } + /// ExpressionValueReplacement(`add(a, b)` |==> `0`) of: `uint256 result = add(a, b);` function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { - /// ExpressionValueReplacement(`result` |==> `0`) of: `return result;` - uint256 result = add(a, b); - return 0; + uint256 result = 0; + return result; } function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { diff --git a/resources/regressions/evr.json/mutants/4/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/4/Ops/EVR/EVR.sol index 9bd1c212..4799dc9f 100644 --- a/resources/regressions/evr.json/mutants/4/Ops/EVR/EVR.sol +++ b/resources/regressions/evr.json/mutants/4/Ops/EVR/EVR.sol @@ -8,10 +8,10 @@ contract EVR { return a + b; } + /// ExpressionValueReplacement(`add(a, b)` |==> `1`) of: `uint256 result = add(a, b);` function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { - /// ExpressionValueReplacement(`result` |==> `1`) of: `return result;` - uint256 result = add(a, b); - return 1; + uint256 result = 1; + return result; } function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { diff --git a/resources/regressions/evr.json/mutants/5/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/5/Ops/EVR/EVR.sol index 69055912..f9ec895e 100644 --- a/resources/regressions/evr.json/mutants/5/Ops/EVR/EVR.sol +++ b/resources/regressions/evr.json/mutants/5/Ops/EVR/EVR.sol @@ -9,13 +9,13 @@ contract EVR { } function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + /// ExpressionValueReplacement(`result` |==> `0`) of: `return result;` uint256 result = add(a, b); - return result; + return 0; } - /// ExpressionValueReplacement(`a < b` |==> `true`) of: `bool c = a < b;` function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { - bool c = true; + bool c = a < b; while (c) { b = b - a; c = a < b; diff --git a/resources/regressions/evr.json/mutants/6/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/6/Ops/EVR/EVR.sol index 88b7d5e7..9bd1c212 100644 --- a/resources/regressions/evr.json/mutants/6/Ops/EVR/EVR.sol +++ b/resources/regressions/evr.json/mutants/6/Ops/EVR/EVR.sol @@ -9,13 +9,13 @@ contract EVR { } function evr_test_1(uint256 a, uint256 b) public pure returns (uint256) { + /// ExpressionValueReplacement(`result` |==> `1`) of: `return result;` uint256 result = add(a, b); - return result; + return 1; } - /// ExpressionValueReplacement(`a < b` |==> `false`) of: `bool c = a < b;` function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { - bool c = false; + bool c = a < b; while (c) { b = b - a; c = a < b; diff --git a/resources/regressions/evr.json/mutants/7/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/7/Ops/EVR/EVR.sol index bf2cfc8c..69055912 100644 --- a/resources/regressions/evr.json/mutants/7/Ops/EVR/EVR.sol +++ b/resources/regressions/evr.json/mutants/7/Ops/EVR/EVR.sol @@ -13,10 +13,10 @@ contract EVR { return result; } + /// ExpressionValueReplacement(`a < b` |==> `true`) of: `bool c = a < b;` function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { - /// ExpressionValueReplacement(`c` |==> `true`) of: `while (c) {` - bool c = a < b; - while (true) { + bool c = true; + while (c) { b = b - a; c = a < b; } diff --git a/resources/regressions/evr.json/mutants/8/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/8/Ops/EVR/EVR.sol index b8a6e6de..88b7d5e7 100644 --- a/resources/regressions/evr.json/mutants/8/Ops/EVR/EVR.sol +++ b/resources/regressions/evr.json/mutants/8/Ops/EVR/EVR.sol @@ -13,10 +13,10 @@ contract EVR { return result; } + /// ExpressionValueReplacement(`a < b` |==> `false`) of: `bool c = a < b;` function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { - /// ExpressionValueReplacement(`c` |==> `false`) of: `while (c) {` - bool c = a < b; - while (false) { + bool c = false; + while (c) { b = b - a; c = a < b; } diff --git a/resources/regressions/evr.json/mutants/9/Ops/EVR/EVR.sol b/resources/regressions/evr.json/mutants/9/Ops/EVR/EVR.sol index c4d10472..bf2cfc8c 100644 --- a/resources/regressions/evr.json/mutants/9/Ops/EVR/EVR.sol +++ b/resources/regressions/evr.json/mutants/9/Ops/EVR/EVR.sol @@ -14,10 +14,10 @@ contract EVR { } function evr_test_2(uint256 a, uint256 b) public pure returns (uint256) { + /// ExpressionValueReplacement(`c` |==> `true`) of: `while (c) {` bool c = a < b; - /// ExpressionValueReplacement(`b - a` |==> `0`) of: `b = b - a;` - while (c) { - b = 0; + while (true) { + b = b - a; c = a < b; } return a - b; From cdd5a2af1c73f36deead6de86d989fb02f4b8d1c Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 8 Aug 2023 14:16:56 -0700 Subject: [PATCH 093/200] Added evr and mutation ops as an experimental feature, and improved deprecation warning printing --- src/main.rs | 59 +++++++++++++++++++++++++++++++++++++++++++++++-- src/mutation.rs | 2 +- src/util.rs | 38 ++++++++++++++++++++++++++----- 3 files changed, 91 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index d1dc901b..7ac360d5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,8 +2,9 @@ use std::path::{Path, PathBuf}; use clap::Parser; use gambit::{ - default_gambit_output_directory, normalize_path, print_deprecation_warning, print_version, - run_mutate, run_summary, Command, MutateParams, + default_gambit_output_directory, normalize_mutation_operator_name, normalize_path, + print_deprecation_warning, print_experimental_feature_warning, print_version, run_mutate, + run_summary, Command, MutateParams, }; fn main() -> Result<(), Box> { @@ -136,6 +137,34 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box) -> Result<(), Box) -> Result<(), Box> { log::info!("Running CLI MutateParams: {:#?}", ¶ms); + // Check for experimental arguments + if params.fallback_mutations.is_some() { + print_experimental_feature_warning("--fallback_mutations", "1.0.0"); + } + if let Some(ref mutations) = params.mutations { + let evr = normalize_mutation_operator_name(&"evr".to_string()); + for mutation in mutations { + if normalize_mutation_operator_name(&mutation) == evr { + print_experimental_feature_warning( + "MutationType::ExpressionValueReplacement", + "1.0.0", + ); + } + } + } + if let Some(ref mutations) = params.fallback_mutations { + let evr = normalize_mutation_operator_name(&"evr".to_string()); + for mutation in mutations { + if normalize_mutation_operator_name(&mutation) == evr { + print_experimental_feature_warning( + "MutationType::ExpressionValueReplacement", + "1.0.0", + ); + } + } + } // # Path Resolution for CLI Provided Parameters log::info!(" Performing File Resolution"); // let filename = params.filename.expect("No provided filename"); diff --git a/src/mutation.rs b/src/mutation.rs index 273f8a9e..cf14629e 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -316,7 +316,7 @@ impl MutationType { } pub fn default_fallback_mutation_operators() -> Vec { - vec![MutationType::ExpressionValueReplacement] + vec![] } pub fn short_name(&self) -> String { diff --git a/src/util.rs b/src/util.rs index ade176b1..d2421bb0 100644 --- a/src/util.rs +++ b/src/util.rs @@ -412,9 +412,37 @@ pub fn get_import_path(resolver: &FileResolver, import_no: usize) -> Option Date: Tue, 8 Aug 2023 14:23:23 -0700 Subject: [PATCH 094/200] Updated regressions --- .../all_ops.json/gambit_results.json | 372 +++++------------- .../regressions/all_ops.json/mutants.log | 111 +++--- .../all_ops.json/mutants/27/EDC/EDC.sol | 22 -- .../mutants/27}/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/28/EDC/EDC.sol | 22 -- .../mutants/{37 => 28}/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/29/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/30/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/31/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/32/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/33/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/34/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/35/LOR/LOR.sol | 4 +- .../mutants/{57 => 36}/LVR/LVR.sol | 6 +- .../mutants/{61 => 37}/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/38/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/39/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/40/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/41/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/42/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/43/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/44/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/45/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/46/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/47/LVR/LVR.sol | 43 -- .../mutants/{79 => 47}/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/48/LVR/LVR.sol | 43 -- .../mutants/48}/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/49/LVR/LVR.sol | 43 -- .../mutants/{77 => 49}/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/50/LVR/LVR.sol | 43 -- .../mutants/50}/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/51/LVR/LVR.sol | 43 -- .../all_ops.json/mutants/51/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/52/LVR/LVR.sol | 43 -- .../mutants/{81 => 52}/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/53/LVR/LVR.sol | 43 -- .../all_ops.json/mutants/53/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/54/LVR/LVR.sol | 43 -- .../all_ops.json/mutants/54/ROR/ROR.sol | 65 +++ .../all_ops.json/mutants/55/LVR/LVR.sol | 43 -- .../mutants/55}/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/56/LVR/LVR.sol | 43 -- .../mutants/{82 => 56}/ROR/ROR.sol | 6 +- .../mutants/{83 => 57}/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/58/LVR/LVR.sol | 43 -- .../mutants/{73 => 58}/ROR/ROR.sol | 0 .../all_ops.json/mutants/59/LVR/LVR.sol | 43 -- .../mutants/{74 => 59}/ROR/ROR.sol | 0 .../all_ops.json/mutants/60/LVR/LVR.sol | 43 -- .../mutants/{75 => 60}/ROR/ROR.sol | 0 .../mutants/{76 => 61}/ROR/ROR.sol | 0 .../all_ops.json/mutants/62/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/63/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/64/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/65/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/66/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/67/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/68/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/69/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/70/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/71/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/72/ROR/ROR.sol | 6 +- .../mutants/{88 => 73}/UOR/UOR.sol | 0 .../mutants/{89 => 74}/UOR/UOR.sol | 0 .../all_ops.json/mutants/84/ROR/ROR.sol | 65 --- .../all_ops.json/mutants/85/ROR/ROR.sol | 65 --- .../all_ops.json/mutants/86/ROR/ROR.sol | 65 --- .../all_ops.json/mutants/87/ROR/ROR.sol | 65 --- .../regressions/edc.json/gambit_results.json | 24 -- resources/regressions/edc.json/mutants.log | 2 - .../edc.json/mutants/2/Ops/EDC/EDC.sol | 22 -- .../edc.json/mutants/3/Ops/EDC/EDC.sol | 22 -- .../regressions/lvr.json/gambit_results.json | 196 +-------- resources/regressions/lvr.json/mutants.log | 33 +- .../lvr.json/mutants/10/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/11/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/12/Ops/LVR/LVR.sol | 43 -- .../lvr.json/mutants/13/Ops/LVR/LVR.sol | 43 -- .../lvr.json/mutants/14/Ops/LVR/LVR.sol | 43 -- .../lvr.json/mutants/15/Ops/LVR/LVR.sol | 43 -- .../lvr.json/mutants/16/Ops/LVR/LVR.sol | 43 -- .../lvr.json/mutants/17/Ops/LVR/LVR.sol | 43 -- .../lvr.json/mutants/18/Ops/LVR/LVR.sol | 43 -- .../lvr.json/mutants/19/Ops/LVR/LVR.sol | 43 -- .../lvr.json/mutants/2/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/20/Ops/LVR/LVR.sol | 43 -- .../lvr.json/mutants/21/Ops/LVR/LVR.sol | 43 -- .../lvr.json/mutants/22/Ops/LVR/LVR.sol | 43 -- .../lvr.json/mutants/24/Ops/LVR/LVR.sol | 43 -- .../lvr.json/mutants/3/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/4/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/5/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/6/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/7/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/8/Ops/LVR/LVR.sol | 6 +- .../lvr.json/mutants/9/Ops/LVR/LVR.sol | 6 +- .../test_log_invalid.json/gambit_results.json | 372 +++++------------- .../test_log_invalid.json/mutants.log | 111 +++--- .../mutants/27/EDC/EDC.sol | 22 -- .../mutants/{36 => 27}/LOR/LOR.sol | 6 +- .../mutants/28/EDC/EDC.sol | 22 -- .../mutants/28}/LOR/LOR.sol | 6 +- .../mutants/29/LOR/LOR.sol | 4 +- .../mutants/30/LOR/LOR.sol | 6 +- .../mutants/31/LOR/LOR.sol | 6 +- .../mutants/32/LOR/LOR.sol | 4 +- .../mutants/33/LOR/LOR.sol | 6 +- .../mutants/34/LOR/LOR.sol | 6 +- .../mutants/35/LOR/LOR.sol | 4 +- .../mutants/{57 => 36}/LVR/LVR.sol | 6 +- .../mutants/37}/LVR/LVR.sol | 6 +- .../mutants/38/LVR/LVR.sol | 6 +- .../mutants/39/LVR/LVR.sol | 6 +- .../mutants/40/LVR/LVR.sol | 6 +- .../mutants/41/LVR/LVR.sol | 6 +- .../mutants/42/LVR/LVR.sol | 6 +- .../mutants/43/LVR/LVR.sol | 6 +- .../mutants/44/LVR/LVR.sol | 6 +- .../mutants/45/LVR/LVR.sol | 6 +- .../mutants/46/LVR/LVR.sol | 6 +- .../mutants/47/LVR/LVR.sol | 43 -- .../mutants/47/ROR/ROR.sol | 65 +++ .../mutants/48/LVR/LVR.sol | 43 -- .../mutants/48/ROR/ROR.sol | 65 +++ .../mutants/49/LVR/LVR.sol | 43 -- .../mutants/49}/ROR/ROR.sol | 6 +- .../mutants/50/LVR/LVR.sol | 43 -- .../mutants/50}/ROR/ROR.sol | 6 +- .../mutants/51/LVR/LVR.sol | 43 -- .../mutants/51/ROR/ROR.sol | 65 +++ .../mutants/52/LVR/LVR.sol | 43 -- .../mutants/{80 => 52}/ROR/ROR.sol | 6 +- .../mutants/53/LVR/LVR.sol | 43 -- .../mutants/53/ROR/ROR.sol | 65 +++ .../mutants/54/LVR/LVR.sol | 43 -- .../mutants/54/ROR/ROR.sol | 65 +++ .../mutants/55/LVR/LVR.sol | 43 -- .../mutants/55/ROR/ROR.sol | 65 +++ .../mutants/56/LVR/LVR.sol | 43 -- .../mutants/{82 => 56}/ROR/ROR.sol | 6 +- .../mutants/{83 => 57}/ROR/ROR.sol | 6 +- .../mutants/58/LVR/LVR.sol | 43 -- .../mutants/{73 => 58}/ROR/ROR.sol | 0 .../mutants/59/LVR/LVR.sol | 43 -- .../mutants/{74 => 59}/ROR/ROR.sol | 0 .../mutants/60/LVR/LVR.sol | 43 -- .../mutants/{75 => 60}/ROR/ROR.sol | 0 .../mutants/61/LVR/LVR.sol | 43 -- .../mutants/{76 => 61}/ROR/ROR.sol | 0 .../mutants/62/ROR/ROR.sol | 6 +- .../mutants/63/ROR/ROR.sol | 6 +- .../mutants/64/ROR/ROR.sol | 6 +- .../mutants/65/ROR/ROR.sol | 6 +- .../mutants/66/ROR/ROR.sol | 6 +- .../mutants/67/ROR/ROR.sol | 6 +- .../mutants/68/ROR/ROR.sol | 6 +- .../mutants/69/ROR/ROR.sol | 6 +- .../mutants/70/ROR/ROR.sol | 6 +- .../mutants/71/ROR/ROR.sol | 6 +- .../mutants/72/ROR/ROR.sol | 6 +- .../mutants/{88 => 73}/UOR/UOR.sol | 0 .../mutants/{89 => 74}/UOR/UOR.sol | 0 .../mutants/81/ROR/ROR.sol | 65 --- .../mutants/84/ROR/ROR.sol | 65 --- .../mutants/85/ROR/ROR.sol | 65 --- .../mutants/86/ROR/ROR.sol | 65 --- .../mutants/87/ROR/ROR.sol | 65 --- .../gambit_results.json | 204 ++++------ .../mutants.log | 82 ++-- .../mutants/22/MultipleContracts/C.sol | 6 +- .../mutants/23/MultipleContracts/C.sol | 6 +- .../mutants/24/MultipleContracts/C.sol | 4 +- .../mutants/25/MultipleContracts/C.sol | 6 +- .../mutants/26/MultipleContracts/C.sol | 6 +- .../mutants/27/MultipleContracts/C.sol | 6 +- .../mutants/28/MultipleContracts/C.sol | 4 +- .../mutants/29/MultipleContracts/C.sol | 4 +- .../mutants/30/MultipleContracts/C.sol | 4 +- .../mutants/31/MultipleContracts/C.sol | 6 +- .../mutants/32/MultipleContracts/C.sol | 6 +- .../mutants/33/MultipleContracts/C.sol | 4 +- .../mutants/34/MultipleContracts/C.sol | 6 +- .../mutants/35/MultipleContracts/C.sol | 6 +- .../mutants/36/MultipleContracts/C.sol | 4 +- .../mutants/37/MultipleContracts/C.sol | 4 +- .../mutants/38/MultipleContracts/C.sol | 4 +- .../mutants/39/MultipleContracts/C.sol | 6 +- .../mutants/40/MultipleContracts/C.sol | 6 +- .../mutants/41/MultipleContracts/C.sol | 6 +- .../mutants/42/MultipleContracts/C.sol | 6 +- .../mutants/43/MultipleContracts/C.sol | 4 +- .../mutants/44/MultipleContracts/C.sol | 6 +- .../mutants/45/MultipleContracts/C.sol | 6 +- .../mutants/46/MultipleContracts/C.sol | 6 +- .../mutants/47/MultipleContracts/C.sol | 6 +- .../mutants/48/MultipleContracts/C.sol | 4 +- .../mutants/49/MultipleContracts/C.sol | 4 +- .../mutants/50/MultipleContracts/C.sol | 4 +- .../mutants/51/MultipleContracts/C.sol | 6 +- .../mutants/52/MultipleContracts/C.sol | 6 +- .../mutants/53/MultipleContracts/C.sol | 6 +- .../mutants/54/MultipleContracts/C.sol | 6 +- .../mutants/55/MultipleContracts/C.sol | 6 +- .../mutants/56/MultipleContracts/C.sol | 6 +- .../mutants/57/MultipleContracts/C.sol | 6 +- .../mutants/58/MultipleContracts/C.sol | 6 +- .../mutants/59/MultipleContracts/C.sol | 6 +- .../mutants/60/MultipleContracts/C.sol | 4 +- .../mutants/61/MultipleContracts/C.sol | 41 -- .../mutants/62/MultipleContracts/C.sol | 41 -- .../mutants/63/MultipleContracts/C.sol | 41 -- .../mutants/64/MultipleContracts/C.sol | 41 -- .../gambit_results.json | 204 ++++------ .../mutants.log | 82 ++-- .../mutants/22/MultipleContracts/C.sol | 6 +- .../mutants/23/MultipleContracts/C.sol | 6 +- .../mutants/24/MultipleContracts/C.sol | 4 +- .../mutants/25/MultipleContracts/C.sol | 6 +- .../mutants/26/MultipleContracts/C.sol | 6 +- .../mutants/27/MultipleContracts/C.sol | 6 +- .../mutants/28/MultipleContracts/C.sol | 4 +- .../mutants/29/MultipleContracts/C.sol | 4 +- .../mutants/30/MultipleContracts/C.sol | 4 +- .../mutants/31/MultipleContracts/C.sol | 6 +- .../mutants/32/MultipleContracts/C.sol | 6 +- .../mutants/33/MultipleContracts/C.sol | 4 +- .../mutants/34/MultipleContracts/C.sol | 6 +- .../mutants/35/MultipleContracts/C.sol | 6 +- .../mutants/36/MultipleContracts/C.sol | 4 +- .../mutants/37/MultipleContracts/C.sol | 4 +- .../mutants/38/MultipleContracts/C.sol | 4 +- .../mutants/39/MultipleContracts/C.sol | 6 +- .../mutants/40/MultipleContracts/C.sol | 6 +- .../mutants/41/MultipleContracts/C.sol | 6 +- .../mutants/42/MultipleContracts/C.sol | 6 +- .../mutants/43/MultipleContracts/C.sol | 4 +- .../mutants/44/MultipleContracts/C.sol | 6 +- .../mutants/45/MultipleContracts/C.sol | 6 +- .../mutants/46/MultipleContracts/C.sol | 6 +- .../mutants/47/MultipleContracts/C.sol | 6 +- .../mutants/48/MultipleContracts/C.sol | 4 +- .../mutants/49/MultipleContracts/C.sol | 4 +- .../mutants/50/MultipleContracts/C.sol | 4 +- .../mutants/51/MultipleContracts/C.sol | 6 +- .../mutants/52/MultipleContracts/C.sol | 6 +- .../mutants/53/MultipleContracts/C.sol | 6 +- .../mutants/54/MultipleContracts/C.sol | 6 +- .../mutants/55/MultipleContracts/C.sol | 6 +- .../mutants/56/MultipleContracts/C.sol | 6 +- .../mutants/57/MultipleContracts/C.sol | 6 +- .../mutants/58/MultipleContracts/C.sol | 6 +- .../mutants/59/MultipleContracts/C.sol | 6 +- .../mutants/60/MultipleContracts/C.sol | 4 +- .../mutants/61/MultipleContracts/C.sol | 41 -- .../mutants/62/MultipleContracts/C.sol | 41 -- .../mutants/63/MultipleContracts/C.sol | 41 -- .../mutants/64/MultipleContracts/C.sol | 41 -- .../gambit_results.json | 204 ++++------ .../mutants.log | 82 ++-- .../mutants/22/MultipleContracts/C.sol | 6 +- .../mutants/23/MultipleContracts/C.sol | 6 +- .../mutants/24/MultipleContracts/C.sol | 4 +- .../mutants/25/MultipleContracts/C.sol | 6 +- .../mutants/26/MultipleContracts/C.sol | 6 +- .../mutants/27/MultipleContracts/C.sol | 6 +- .../mutants/28/MultipleContracts/C.sol | 4 +- .../mutants/29/MultipleContracts/C.sol | 4 +- .../mutants/30/MultipleContracts/C.sol | 4 +- .../mutants/31/MultipleContracts/C.sol | 6 +- .../mutants/32/MultipleContracts/C.sol | 6 +- .../mutants/33/MultipleContracts/C.sol | 4 +- .../mutants/34/MultipleContracts/C.sol | 6 +- .../mutants/35/MultipleContracts/C.sol | 6 +- .../mutants/36/MultipleContracts/C.sol | 4 +- .../mutants/37/MultipleContracts/C.sol | 4 +- .../mutants/38/MultipleContracts/C.sol | 4 +- .../mutants/39/MultipleContracts/C.sol | 6 +- .../mutants/40/MultipleContracts/C.sol | 6 +- .../mutants/41/MultipleContracts/C.sol | 6 +- .../mutants/42/MultipleContracts/C.sol | 6 +- .../mutants/43/MultipleContracts/C.sol | 4 +- .../mutants/44/MultipleContracts/C.sol | 6 +- .../mutants/45/MultipleContracts/C.sol | 6 +- .../mutants/46/MultipleContracts/C.sol | 6 +- .../mutants/47/MultipleContracts/C.sol | 6 +- .../mutants/48/MultipleContracts/C.sol | 4 +- .../mutants/49/MultipleContracts/C.sol | 4 +- .../mutants/50/MultipleContracts/C.sol | 4 +- .../mutants/51/MultipleContracts/C.sol | 6 +- .../mutants/52/MultipleContracts/C.sol | 6 +- .../mutants/53/MultipleContracts/C.sol | 6 +- .../mutants/54/MultipleContracts/C.sol | 6 +- .../mutants/55/MultipleContracts/C.sol | 6 +- .../mutants/56/MultipleContracts/C.sol | 6 +- .../mutants/57/MultipleContracts/C.sol | 6 +- .../mutants/58/MultipleContracts/C.sol | 6 +- .../mutants/59/MultipleContracts/C.sol | 6 +- .../mutants/60/MultipleContracts/C.sol | 4 +- .../mutants/61/MultipleContracts/C.sol | 41 -- .../mutants/62/MultipleContracts/C.sol | 41 -- .../mutants/63/MultipleContracts/C.sol | 41 -- .../mutants/64/MultipleContracts/C.sol | 41 -- .../gambit_results.json | 248 +++--------- .../mutants.log | 64 ++- .../mutants/1/MultipleContracts/C.sol | 6 +- .../mutants/10/MultipleContracts/C.sol | 6 +- .../mutants/11/MultipleContracts/C.sol | 6 +- .../mutants/12/MultipleContracts/C.sol | 6 +- .../mutants/13/MultipleContracts/C.sol | 6 +- .../mutants/14/MultipleContracts/C.sol | 6 +- .../mutants/15/MultipleContracts/C.sol | 6 +- .../mutants/16/MultipleContracts/C.sol | 6 +- .../mutants/17/MultipleContracts/C.sol | 6 +- .../mutants/18/MultipleContracts/C.sol | 6 +- .../mutants/19/MultipleContracts/C.sol | 6 +- .../mutants/2/MultipleContracts/C.sol | 6 +- .../mutants/20/MultipleContracts/C.sol | 6 +- .../mutants/21/MultipleContracts/C.sol | 6 +- .../mutants/22/MultipleContracts/C.sol | 6 +- .../mutants/23/MultipleContracts/C.sol | 6 +- .../mutants/24/MultipleContracts/C.sol | 6 +- .../mutants/25/MultipleContracts/C.sol | 6 +- .../mutants/26/MultipleContracts/C.sol | 6 +- .../mutants/27/MultipleContracts/C.sol | 41 -- .../mutants/28/MultipleContracts/C.sol | 41 -- .../mutants/29/MultipleContracts/C.sol | 41 -- .../mutants/3/MultipleContracts/C.sol | 4 +- .../mutants/30/MultipleContracts/C.sol | 41 -- .../mutants/31/MultipleContracts/C.sol | 41 -- .../mutants/32/MultipleContracts/C.sol | 41 -- .../mutants/33/MultipleContracts/C.sol | 41 -- .../mutants/34/MultipleContracts/C.sol | 41 -- .../mutants/35/MultipleContracts/C.sol | 41 -- .../mutants/36/MultipleContracts/C.sol | 41 -- .../mutants/37/MultipleContracts/C.sol | 41 -- .../mutants/38/MultipleContracts/C.sol | 41 -- .../mutants/4/MultipleContracts/C.sol | 4 +- .../mutants/5/MultipleContracts/C.sol | 6 +- .../mutants/6/MultipleContracts/C.sol | 6 +- .../mutants/7/MultipleContracts/C.sol | 4 +- .../mutants/8/MultipleContracts/C.sol | 4 +- .../mutants/9/MultipleContracts/C.sol | 4 +- .../gambit_results.json | 60 +-- .../test_multiple_files_1.json/mutants.log | 20 +- .../mutants/49/MultipleContracts/C.sol | 6 +- .../mutants/50/MultipleContracts/C.sol | 6 +- .../mutants/51/MultipleContracts/C.sol | 4 +- .../mutants/52/MultipleContracts/C.sol | 6 +- .../mutants/53/MultipleContracts/C.sol | 6 +- .../mutants/54/MultipleContracts/C.sol | 6 +- .../mutants/55/MultipleContracts/C.sol | 4 +- .../mutants/56/MultipleContracts/C.sol | 4 +- .../mutants/57/MultipleContracts/C.sol | 4 +- .../mutants/58/MultipleContracts/C.sol | 41 -- .../mutants/59/MultipleContracts/C.sol | 41 -- 356 files changed, 2016 insertions(+), 5814 deletions(-) delete mode 100644 resources/regressions/all_ops.json/mutants/27/EDC/EDC.sol rename resources/regressions/{test_log_invalid.json/mutants/37 => all_ops.json/mutants/27}/LOR/LOR.sol (78%) delete mode 100644 resources/regressions/all_ops.json/mutants/28/EDC/EDC.sol rename resources/regressions/all_ops.json/mutants/{37 => 28}/LOR/LOR.sol (78%) rename resources/regressions/all_ops.json/mutants/{57 => 36}/LVR/LVR.sol (89%) rename resources/regressions/all_ops.json/mutants/{61 => 37}/LVR/LVR.sol (89%) delete mode 100644 resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol rename resources/regressions/all_ops.json/mutants/{79 => 47}/ROR/ROR.sol (93%) delete mode 100644 resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol rename resources/regressions/{test_log_invalid.json/mutants/79 => all_ops.json/mutants/48}/ROR/ROR.sol (93%) delete mode 100644 resources/regressions/all_ops.json/mutants/49/LVR/LVR.sol rename resources/regressions/all_ops.json/mutants/{77 => 49}/ROR/ROR.sol (94%) delete mode 100644 resources/regressions/all_ops.json/mutants/50/LVR/LVR.sol rename resources/regressions/{test_log_invalid.json/mutants/78 => all_ops.json/mutants/50}/ROR/ROR.sol (94%) delete mode 100644 resources/regressions/all_ops.json/mutants/51/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol delete mode 100644 resources/regressions/all_ops.json/mutants/52/LVR/LVR.sol rename resources/regressions/all_ops.json/mutants/{81 => 52}/ROR/ROR.sol (94%) delete mode 100644 resources/regressions/all_ops.json/mutants/53/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol delete mode 100644 resources/regressions/all_ops.json/mutants/54/LVR/LVR.sol create mode 100644 resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol delete mode 100644 resources/regressions/all_ops.json/mutants/55/LVR/LVR.sol rename resources/regressions/{test_log_invalid.json/mutants/77 => all_ops.json/mutants/55}/ROR/ROR.sol (94%) delete mode 100644 resources/regressions/all_ops.json/mutants/56/LVR/LVR.sol rename resources/regressions/all_ops.json/mutants/{82 => 56}/ROR/ROR.sol (96%) rename resources/regressions/all_ops.json/mutants/{83 => 57}/ROR/ROR.sol (96%) delete mode 100644 resources/regressions/all_ops.json/mutants/58/LVR/LVR.sol rename resources/regressions/all_ops.json/mutants/{73 => 58}/ROR/ROR.sol (100%) delete mode 100644 resources/regressions/all_ops.json/mutants/59/LVR/LVR.sol rename resources/regressions/all_ops.json/mutants/{74 => 59}/ROR/ROR.sol (100%) delete mode 100644 resources/regressions/all_ops.json/mutants/60/LVR/LVR.sol rename resources/regressions/all_ops.json/mutants/{75 => 60}/ROR/ROR.sol (100%) rename resources/regressions/all_ops.json/mutants/{76 => 61}/ROR/ROR.sol (100%) rename resources/regressions/all_ops.json/mutants/{88 => 73}/UOR/UOR.sol (100%) rename resources/regressions/all_ops.json/mutants/{89 => 74}/UOR/UOR.sol (100%) delete mode 100644 resources/regressions/all_ops.json/mutants/84/ROR/ROR.sol delete mode 100644 resources/regressions/all_ops.json/mutants/85/ROR/ROR.sol delete mode 100644 resources/regressions/all_ops.json/mutants/86/ROR/ROR.sol delete mode 100644 resources/regressions/all_ops.json/mutants/87/ROR/ROR.sol delete mode 100644 resources/regressions/edc.json/mutants/2/Ops/EDC/EDC.sol delete mode 100644 resources/regressions/edc.json/mutants/3/Ops/EDC/EDC.sol delete mode 100644 resources/regressions/lvr.json/mutants/12/Ops/LVR/LVR.sol delete mode 100644 resources/regressions/lvr.json/mutants/13/Ops/LVR/LVR.sol delete mode 100644 resources/regressions/lvr.json/mutants/14/Ops/LVR/LVR.sol delete mode 100644 resources/regressions/lvr.json/mutants/15/Ops/LVR/LVR.sol delete mode 100644 resources/regressions/lvr.json/mutants/16/Ops/LVR/LVR.sol delete mode 100644 resources/regressions/lvr.json/mutants/17/Ops/LVR/LVR.sol delete mode 100644 resources/regressions/lvr.json/mutants/18/Ops/LVR/LVR.sol delete mode 100644 resources/regressions/lvr.json/mutants/19/Ops/LVR/LVR.sol delete mode 100644 resources/regressions/lvr.json/mutants/20/Ops/LVR/LVR.sol delete mode 100644 resources/regressions/lvr.json/mutants/21/Ops/LVR/LVR.sol delete mode 100644 resources/regressions/lvr.json/mutants/22/Ops/LVR/LVR.sol delete mode 100644 resources/regressions/lvr.json/mutants/24/Ops/LVR/LVR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/27/EDC/EDC.sol rename resources/regressions/test_log_invalid.json/mutants/{36 => 27}/LOR/LOR.sol (76%) delete mode 100644 resources/regressions/test_log_invalid.json/mutants/28/EDC/EDC.sol rename resources/regressions/{all_ops.json/mutants/36 => test_log_invalid.json/mutants/28}/LOR/LOR.sol (76%) rename resources/regressions/test_log_invalid.json/mutants/{57 => 36}/LVR/LVR.sol (89%) rename resources/regressions/{lvr.json/mutants/23/Ops => test_log_invalid.json/mutants/37}/LVR/LVR.sol (89%) delete mode 100644 resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/49/LVR/LVR.sol rename resources/regressions/{all_ops.json/mutants/80 => test_log_invalid.json/mutants/49}/ROR/ROR.sol (93%) delete mode 100644 resources/regressions/test_log_invalid.json/mutants/50/LVR/LVR.sol rename resources/regressions/{all_ops.json/mutants/78 => test_log_invalid.json/mutants/50}/ROR/ROR.sol (94%) delete mode 100644 resources/regressions/test_log_invalid.json/mutants/51/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/52/LVR/LVR.sol rename resources/regressions/test_log_invalid.json/mutants/{80 => 52}/ROR/ROR.sol (94%) delete mode 100644 resources/regressions/test_log_invalid.json/mutants/53/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/54/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/55/LVR/LVR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/56/LVR/LVR.sol rename resources/regressions/test_log_invalid.json/mutants/{82 => 56}/ROR/ROR.sol (96%) rename resources/regressions/test_log_invalid.json/mutants/{83 => 57}/ROR/ROR.sol (96%) delete mode 100644 resources/regressions/test_log_invalid.json/mutants/58/LVR/LVR.sol rename resources/regressions/test_log_invalid.json/mutants/{73 => 58}/ROR/ROR.sol (100%) delete mode 100644 resources/regressions/test_log_invalid.json/mutants/59/LVR/LVR.sol rename resources/regressions/test_log_invalid.json/mutants/{74 => 59}/ROR/ROR.sol (100%) delete mode 100644 resources/regressions/test_log_invalid.json/mutants/60/LVR/LVR.sol rename resources/regressions/test_log_invalid.json/mutants/{75 => 60}/ROR/ROR.sol (100%) delete mode 100644 resources/regressions/test_log_invalid.json/mutants/61/LVR/LVR.sol rename resources/regressions/test_log_invalid.json/mutants/{76 => 61}/ROR/ROR.sol (100%) rename resources/regressions/test_log_invalid.json/mutants/{88 => 73}/UOR/UOR.sol (100%) rename resources/regressions/test_log_invalid.json/mutants/{89 => 74}/UOR/UOR.sol (100%) delete mode 100644 resources/regressions/test_log_invalid.json/mutants/81/ROR/ROR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/84/ROR/ROR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/85/ROR/ROR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/86/ROR/ROR.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/87/ROR/ROR.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/61/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/62/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/63/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/64/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/61/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/62/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/63/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/64/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/61/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/62/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/63/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/64/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/27/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/28/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/29/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/30/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/31/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/32/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/33/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/34/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/35/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/36/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/37/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/38/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/58/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/59/MultipleContracts/C.sol diff --git a/resources/regressions/all_ops.json/gambit_results.json b/resources/regressions/all_ops.json/gambit_results.json index d7ba80a7..8d7f063e 100644 --- a/resources/regressions/all_ops.json/gambit_results.json +++ b/resources/regressions/all_ops.json/gambit_results.json @@ -311,37 +311,13 @@ "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", "repl": "call" }, - { - "col": 17, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(true, \"Delegatecall failed\");\n }\n }\n", - "id": "27", - "line": 19, - "name": "mutants/27/EDC/EDC.sol", - "op": "EVR", - "orig": "success", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", - "repl": "true" - }, - { - "col": 17, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(false, \"Delegatecall failed\");\n }\n }\n", - "id": "28", - "line": 19, - "name": "mutants/28/EDC/EDC.sol", - "op": "EVR", - "orig": "success", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", - "repl": "false" - }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "29", + "id": "27", "line": 9, - "name": "mutants/29/LOR/LOR.sol", + "name": "mutants/27/LOR/LOR.sol", "op": "LOR", "orig": "a && b", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -351,9 +327,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "30", + "id": "28", "line": 9, - "name": "mutants/30/LOR/LOR.sol", + "name": "mutants/28/LOR/LOR.sol", "op": "LOR", "orig": "a && b", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -363,9 +339,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "31", + "id": "29", "line": 9, - "name": "mutants/31/LOR/LOR.sol", + "name": "mutants/29/LOR/LOR.sol", "op": "LOR", "orig": "a && b", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -375,9 +351,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "32", + "id": "30", "line": 14, - "name": "mutants/32/LOR/LOR.sol", + "name": "mutants/30/LOR/LOR.sol", "op": "LOR", "orig": "a || b", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -387,9 +363,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "33", + "id": "31", "line": 14, - "name": "mutants/33/LOR/LOR.sol", + "name": "mutants/31/LOR/LOR.sol", "op": "LOR", "orig": "a || b", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -399,9 +375,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "34", + "id": "32", "line": 14, - "name": "mutants/34/LOR/LOR.sol", + "name": "mutants/32/LOR/LOR.sol", "op": "LOR", "orig": "a || b", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -411,9 +387,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", - "id": "35", + "id": "33", "line": 19, - "name": "mutants/35/LOR/LOR.sol", + "name": "mutants/33/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -423,9 +399,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", - "id": "36", + "id": "34", "line": 19, - "name": "mutants/36/LOR/LOR.sol", + "name": "mutants/34/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -435,9 +411,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", - "id": "37", + "id": "35", "line": 19, - "name": "mutants/37/LOR/LOR.sol", + "name": "mutants/35/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -447,45 +423,21 @@ "col": 24, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", - "id": "38", + "id": "36", "line": 15, - "name": "mutants/38/LVR/LVR.sol", + "name": "mutants/36/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "1" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 0;\n }\n \n // Expect 2 mutant: 0, 2\n", - "id": "39", - "line": 16, - "name": "mutants/39/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 1;\n }\n \n // Expect 2 mutant: 0, 2\n", - "id": "40", - "line": 16, - "name": "mutants/40/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" - }, { "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", - "id": "41", + "id": "37", "line": 21, - "name": "mutants/41/LVR/LVR.sol", + "name": "mutants/37/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -495,45 +447,21 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", - "id": "42", + "id": "38", "line": 21, - "name": "mutants/42/LVR/LVR.sol", + "name": "mutants/38/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "2" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 0;\n }\n \n // Expect 2 mutants: 0, 1\n", - "id": "43", - "line": 22, - "name": "mutants/43/LVR/LVR.sol", - "op": "EVR", - "orig": "one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 1;\n }\n \n // Expect 2 mutants: 0, 1\n", - "id": "44", - "line": 22, - "name": "mutants/44/LVR/LVR.sol", - "op": "EVR", - "orig": "one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" - }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", - "id": "45", + "id": "39", "line": 27, - "name": "mutants/45/LVR/LVR.sol", + "name": "mutants/39/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -543,9 +471,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", - "id": "46", + "id": "40", "line": 27, - "name": "mutants/46/LVR/LVR.sol", + "name": "mutants/40/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -555,57 +483,21 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", - "id": "47", + "id": "41", "line": 27, - "name": "mutants/47/LVR/LVR.sol", + "name": "mutants/41/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "-2" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 0\n", - "id": "48", - "line": 28, - "name": "mutants/48/LVR/LVR.sol", - "op": "EVR", - "orig": "neg_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "-1" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 0\n", - "id": "49", - "line": 28, - "name": "mutants/49/LVR/LVR.sol", - "op": "EVR", - "orig": "neg_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 0\n", - "id": "50", - "line": 28, - "name": "mutants/50/LVR/LVR.sol", - "op": "EVR", - "orig": "neg_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" - }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", - "id": "51", + "id": "42", "line": 33, - "name": "mutants/51/LVR/LVR.sol", + "name": "mutants/42/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -615,9 +507,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", - "id": "52", + "id": "43", "line": 33, - "name": "mutants/52/LVR/LVR.sol", + "name": "mutants/43/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -627,57 +519,21 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", - "id": "53", + "id": "44", "line": 33, - "name": "mutants/53/LVR/LVR.sol", + "name": "mutants/44/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "2" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 1\n", - "id": "54", - "line": 34, - "name": "mutants/54/LVR/LVR.sol", - "op": "EVR", - "orig": "pos_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "-1" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 1\n", - "id": "55", - "line": 34, - "name": "mutants/55/LVR/LVR.sol", - "op": "EVR", - "orig": "pos_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 1\n", - "id": "56", - "line": 34, - "name": "mutants/56/LVR/LVR.sol", - "op": "EVR", - "orig": "pos_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" - }, { "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", - "id": "57", + "id": "45", "line": 39, - "name": "mutants/57/LVR/LVR.sol", + "name": "mutants/45/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -687,57 +543,21 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", - "id": "58", + "id": "46", "line": 39, - "name": "mutants/58/LVR/LVR.sol", + "name": "mutants/46/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "1" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return -1;\n }\n }\n", - "id": "59", - "line": 40, - "name": "mutants/59/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "-1" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 0;\n }\n }\n", - "id": "60", - "line": 40, - "name": "mutants/60/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 1;\n }\n }\n", - "id": "61", - "line": 40, - "name": "mutants/61/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" - }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "62", + "id": "47", "line": 9, - "name": "mutants/62/ROR/ROR.sol", + "name": "mutants/47/ROR/ROR.sol", "op": "ROR", "orig": "<", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -747,9 +567,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "63", + "id": "48", "line": 9, - "name": "mutants/63/ROR/ROR.sol", + "name": "mutants/48/ROR/ROR.sol", "op": "ROR", "orig": "<", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -759,9 +579,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "64", + "id": "49", "line": 9, - "name": "mutants/64/ROR/ROR.sol", + "name": "mutants/49/ROR/ROR.sol", "op": "ROR", "orig": "x < y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -771,9 +591,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "65", + "id": "50", "line": 14, - "name": "mutants/65/ROR/ROR.sol", + "name": "mutants/50/ROR/ROR.sol", "op": "ROR", "orig": "<=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -783,9 +603,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "66", + "id": "51", "line": 14, - "name": "mutants/66/ROR/ROR.sol", + "name": "mutants/51/ROR/ROR.sol", "op": "ROR", "orig": "<=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -795,9 +615,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "67", + "id": "52", "line": 14, - "name": "mutants/67/ROR/ROR.sol", + "name": "mutants/52/ROR/ROR.sol", "op": "ROR", "orig": "x <= y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -807,9 +627,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "68", + "id": "53", "line": 19, - "name": "mutants/68/ROR/ROR.sol", + "name": "mutants/53/ROR/ROR.sol", "op": "ROR", "orig": ">", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -819,9 +639,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "69", + "id": "54", "line": 19, - "name": "mutants/69/ROR/ROR.sol", + "name": "mutants/54/ROR/ROR.sol", "op": "ROR", "orig": ">", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -831,9 +651,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "70", + "id": "55", "line": 19, - "name": "mutants/70/ROR/ROR.sol", + "name": "mutants/55/ROR/ROR.sol", "op": "ROR", "orig": "x > y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -843,9 +663,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "71", + "id": "56", "line": 24, - "name": "mutants/71/ROR/ROR.sol", + "name": "mutants/56/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -855,9 +675,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "72", + "id": "57", "line": 24, - "name": "mutants/72/ROR/ROR.sol", + "name": "mutants/57/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -867,9 +687,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "73", + "id": "58", "line": 24, - "name": "mutants/73/ROR/ROR.sol", + "name": "mutants/58/ROR/ROR.sol", "op": "ROR", "orig": "x >= y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -879,9 +699,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "74", + "id": "59", "line": 29, - "name": "mutants/74/ROR/ROR.sol", + "name": "mutants/59/ROR/ROR.sol", "op": "ROR", "orig": "==", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -891,9 +711,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "75", + "id": "60", "line": 29, - "name": "mutants/75/ROR/ROR.sol", + "name": "mutants/60/ROR/ROR.sol", "op": "ROR", "orig": "==", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -903,9 +723,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "76", + "id": "61", "line": 29, - "name": "mutants/76/ROR/ROR.sol", + "name": "mutants/61/ROR/ROR.sol", "op": "ROR", "orig": "x == y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -915,9 +735,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", - "id": "77", + "id": "62", "line": 34, - "name": "mutants/77/ROR/ROR.sol", + "name": "mutants/62/ROR/ROR.sol", "op": "ROR", "orig": "x == y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -927,9 +747,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "78", + "id": "63", "line": 39, - "name": "mutants/78/ROR/ROR.sol", + "name": "mutants/63/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -939,9 +759,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "79", + "id": "64", "line": 39, - "name": "mutants/79/ROR/ROR.sol", + "name": "mutants/64/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -951,9 +771,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "80", + "id": "65", "line": 39, - "name": "mutants/80/ROR/ROR.sol", + "name": "mutants/65/ROR/ROR.sol", "op": "ROR", "orig": "x != y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -963,9 +783,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", - "id": "81", + "id": "66", "line": 44, - "name": "mutants/81/ROR/ROR.sol", + "name": "mutants/66/ROR/ROR.sol", "op": "ROR", "orig": "x != y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -975,9 +795,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "82", + "id": "67", "line": 53, - "name": "mutants/82/ROR/ROR.sol", + "name": "mutants/67/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -987,9 +807,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "83", + "id": "68", "line": 53, - "name": "mutants/83/ROR/ROR.sol", + "name": "mutants/68/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -999,9 +819,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "84", + "id": "69", "line": 53, - "name": "mutants/84/ROR/ROR.sol", + "name": "mutants/69/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) >= z", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -1011,9 +831,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", - "id": "85", + "id": "70", "line": 62, - "name": "mutants/85/ROR/ROR.sol", + "name": "mutants/70/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -1023,9 +843,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", - "id": "86", + "id": "71", "line": 62, - "name": "mutants/86/ROR/ROR.sol", + "name": "mutants/71/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -1035,9 +855,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", - "id": "87", + "id": "72", "line": 62, - "name": "mutants/87/ROR/ROR.sol", + "name": "mutants/72/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) != z", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -1047,9 +867,9 @@ "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", - "id": "88", + "id": "73", "line": 14, - "name": "mutants/88/UOR/UOR.sol", + "name": "mutants/73/UOR/UOR.sol", "op": "UOR", "orig": "~", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", @@ -1059,9 +879,9 @@ "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", - "id": "89", + "id": "74", "line": 19, - "name": "mutants/89/UOR/UOR.sol", + "name": "mutants/74/UOR/UOR.sol", "op": "UOR", "orig": "~", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", diff --git a/resources/regressions/all_ops.json/mutants.log b/resources/regressions/all_ops.json/mutants.log index 98a98f96..abc080e6 100644 --- a/resources/regressions/all_ops.json/mutants.log +++ b/resources/regressions/all_ops.json/mutants.log @@ -24,66 +24,51 @@ 24,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,16:18,&,| 25,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,22:18,^,& 26,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,16:38,delegatecall,call -27,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,19:17,success,true -28,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,19:17,success,false -29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,a -30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,b -31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,false -32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,a -33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,b -34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,true -35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y -36,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) -37,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true -38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 -39,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,16:16,zero,0 -40,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,16:16,zero,1 -41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 -42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 -43,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,22:16,one,0 -44,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,22:16,one,1 -45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 -46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 -47,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 -48,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,-1 -49,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,0 -50,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,1 -51,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 -52,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 -53,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 -54,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,-1 -55,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,0 -56,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,1 -57,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 -58,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 -59,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,-1 -60,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,0 -61,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,1 -62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,<= -63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,!= -64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:16,x < y,false -65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,< -66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,== -67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:16,x <= y,true -68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,>= -69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,!= -70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:16,x > y,false -71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,> -72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,== -73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:16,x >= y,true -74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,<= -75,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,>= -76,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:16,x == y,false -77,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,34:16,x == y,false -78,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,< -79,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,> -80,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:16,x != y,true -81,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,44:16,x != y,true -82,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,> -83,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,== -84,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:16,(x + y) >= z,true -85,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,< -86,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,> -87,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:16,(x + y) != z,true -88,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~, - -89,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,~, ~ +27,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,a +28,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,b +29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,false +30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,a +31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,b +32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,true +33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y +34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) +35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true +36,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 +37,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 +38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 +39,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 +40,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 +41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 +42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 +43,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 +44,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 +45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 +46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 +47,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,<= +48,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,!= +49,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:16,x < y,false +50,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,< +51,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,== +52,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:16,x <= y,true +53,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,>= +54,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,!= +55,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:16,x > y,false +56,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,> +57,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,== +58,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:16,x >= y,true +59,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,<= +60,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,>= +61,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:16,x == y,false +62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,34:16,x == y,false +63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,< +64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,> +65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:16,x != y,true +66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,44:16,x != y,true +67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,> +68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,== +69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:16,(x + y) >= z,true +70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,< +71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,> +72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:16,(x + y) != z,true +73,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~, - +74,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,~, ~ diff --git a/resources/regressions/all_ops.json/mutants/27/EDC/EDC.sol b/resources/regressions/all_ops.json/mutants/27/EDC/EDC.sol deleted file mode 100644 index c078b6f6..00000000 --- a/resources/regressions/all_ops.json/mutants/27/EDC/EDC.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.13; - -contract Helper { - function setVars(uint _num) public payable {} -} - -contract EDC { - uint public num; - address public sender; - uint public value; - bool public delegateSuccessful; - bytes public myData; - - function setVars(address _contract) public payable { - (bool success, ) = _contract.delegatecall( - abi.encodeWithSignature("setVars(uint256)", 1) - /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, "Delegatecall failed");` - ); - require(true, "Delegatecall failed"); - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol similarity index 78% rename from resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol rename to resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol index 0d9c28b2..67f4f5df 100644 --- a/resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a && b; + return a; } // Expect three mutants: a, b, true @@ -15,8 +16,7 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return true; + return (x < y) || (a != (x >= y)); } } diff --git a/resources/regressions/all_ops.json/mutants/28/EDC/EDC.sol b/resources/regressions/all_ops.json/mutants/28/EDC/EDC.sol deleted file mode 100644 index eed317db..00000000 --- a/resources/regressions/all_ops.json/mutants/28/EDC/EDC.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.13; - -contract Helper { - function setVars(uint _num) public payable {} -} - -contract EDC { - uint public num; - address public sender; - uint public value; - bool public delegateSuccessful; - bytes public myData; - - function setVars(address _contract) public payable { - (bool success, ) = _contract.delegatecall( - abi.encodeWithSignature("setVars(uint256)", 1) - /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, "Delegatecall failed");` - ); - require(false, "Delegatecall failed"); - } -} diff --git a/resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol similarity index 78% rename from resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol rename to resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol index 0d9c28b2..d63286bb 100644 --- a/resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a && b; + return b; } // Expect three mutants: a, b, true @@ -15,8 +16,7 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return true; + return (x < y) || (a != (x >= y)); } } diff --git a/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol index 67f4f5df..0e5805db 100644 --- a/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` + /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a; + return false; } // Expect three mutants: a, b, true diff --git a/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol index d63286bb..06fbf70c 100644 --- a/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return b; + return a && b; } // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a || b; + return a; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol index 0e5805db..620f1630 100644 --- a/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return false; + return a && b; } // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a || b; + return b; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol index 06fbf70c..29afb982 100644 --- a/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol @@ -10,9 +10,9 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` + /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a; + return true; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol index 620f1630..eb339ae7 100644 --- a/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol @@ -10,13 +10,13 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return b; + return a || b; } // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return (x < y) || (a != (x >= y)); + return x < y; } } diff --git a/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol index 29afb982..fb49fdaf 100644 --- a/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol @@ -10,13 +10,13 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return true; + return a || b; } // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return (x < y) || (a != (x >= y)); + return a != (x >= y); } } diff --git a/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol index eb339ae7..0d9c28b2 100644 --- a/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol @@ -15,8 +15,8 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return x < y; + return true; } } diff --git a/resources/regressions/all_ops.json/mutants/57/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol similarity index 89% rename from resources/regressions/all_ops.json/mutants/57/LVR/LVR.sol rename to resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol index 22af4185..e06271e2 100644 --- a/resources/regressions/all_ops.json/mutants/57/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol @@ -11,8 +11,9 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; + uint256 zero = 1; return zero; } @@ -35,9 +36,8 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = -1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/61/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol similarity index 89% rename from resources/regressions/all_ops.json/mutants/61/LVR/LVR.sol rename to resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol index a4882479..f2cb8295 100644 --- a/resources/regressions/all_ops.json/mutants/61/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol @@ -17,8 +17,9 @@ contract LVR { } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 0; return one; } @@ -36,8 +37,7 @@ contract LVR { // Expect 2 mutants: -1, 1 function signed_zero() public pure returns (int256) { - /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;` int256 zero = 0; - return 1; + return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol index e06271e2..d18c6c48 100644 --- a/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol @@ -11,15 +11,15 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 1; + uint256 zero = 0; return zero; } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 2; return one; } diff --git a/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol index 135e11e3..173dc540 100644 --- a/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol @@ -12,9 +12,8 @@ contract LVR { // Expect 1 mutant: 1 function unsigned_zero() public pure returns (uint256) { - /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;` uint256 zero = 0; - return 0; + return zero; } // Expect 2 mutant: 0, 2 @@ -24,8 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 0; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol index 0d782e4a..72ffaedf 100644 --- a/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol @@ -12,9 +12,8 @@ contract LVR { // Expect 1 mutant: 1 function unsigned_zero() public pure returns (uint256) { - /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;` uint256 zero = 0; - return 1; + return zero; } // Expect 2 mutant: 0, 2 @@ -24,8 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 1; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol index f2cb8295..1e24417f 100644 --- a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 0; + uint256 one = 1; return one; } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = -2; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol index d18c6c48..e088a4e3 100644 --- a/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol @@ -17,9 +17,8 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 2; + uint256 one = 1; return one; } @@ -30,8 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = 0; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol index 0d9d6236..2407079e 100644 --- a/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol @@ -18,9 +18,8 @@ contract LVR { // Expect 2 mutant: 0, 2 function unsigned_one() public pure returns (uint256) { - /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;` uint256 one = 1; - return 0; + return one; } // Expect 2 mutants: 0, 1 @@ -30,8 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = -1; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol index 091e9f64..a5082f3b 100644 --- a/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol @@ -18,9 +18,8 @@ contract LVR { // Expect 2 mutant: 0, 2 function unsigned_one() public pure returns (uint256) { - /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;` uint256 one = 1; - return 1; + return one; } // Expect 2 mutants: 0, 1 @@ -30,8 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = 2; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol index 173dc540..22af4185 100644 --- a/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol @@ -23,9 +23,8 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = -1; return neg_one; } @@ -36,8 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = -1; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol index 72ffaedf..e241973d 100644 --- a/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol @@ -23,9 +23,8 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 1; + int256 neg_one = -1; return neg_one; } @@ -36,8 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = 1; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol deleted file mode 100644 index 1e24417f..00000000 --- a/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -2; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/all_ops.json/mutants/79/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol similarity index 93% rename from resources/regressions/all_ops.json/mutants/79/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol index e5f50322..dec84f24 100644 --- a/resources/regressions/all_ops.json/mutants/79/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x <= y; } // Expect 3 mutants: x < y, x == y, true @@ -35,9 +36,8 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol deleted file mode 100644 index 96e97ffa..00000000 --- a/resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;` - int256 neg_one = -1; - return -1; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/79/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol similarity index 93% rename from resources/regressions/test_log_invalid.json/mutants/79/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol index e5f50322..0c05265c 100644 --- a/resources/regressions/test_log_invalid.json/mutants/79/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x != y; } // Expect 3 mutants: x < y, x == y, true @@ -35,9 +36,8 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/49/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/49/LVR/LVR.sol deleted file mode 100644 index 2d831118..00000000 --- a/resources/regressions/all_ops.json/mutants/49/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;` - int256 neg_one = -1; - return 0; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/all_ops.json/mutants/77/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol similarity index 94% rename from resources/regressions/all_ops.json/mutants/77/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol index ab40e6c9..6141947b 100644 --- a/resources/regressions/all_ops.json/mutants/77/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return false; } // Expect 3 mutants: x < y, x == y, true @@ -30,9 +31,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x == y; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/all_ops.json/mutants/50/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/50/LVR/LVR.sol deleted file mode 100644 index cd826db1..00000000 --- a/resources/regressions/all_ops.json/mutants/50/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;` - int256 neg_one = -1; - return 1; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/78/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol similarity index 94% rename from resources/regressions/test_log_invalid.json/mutants/78/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol index f42e7b7e..9f8ccd04 100644 --- a/resources/regressions/test_log_invalid.json/mutants/78/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol @@ -10,8 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x < y; } // Expect 3 mutants: x >= y, x != y, false @@ -35,9 +36,8 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/51/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/51/LVR/LVR.sol deleted file mode 100644 index e088a4e3..00000000 --- a/resources/regressions/all_ops.json/mutants/51/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 0; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol new file mode 100644 index 00000000..18e38f34 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/52/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/52/LVR/LVR.sol deleted file mode 100644 index 2407079e..00000000 --- a/resources/regressions/all_ops.json/mutants/52/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` - function signed_pos_one() public pure returns (int256) { - int256 pos_one = -1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/all_ops.json/mutants/81/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol similarity index 94% rename from resources/regressions/all_ops.json/mutants/81/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol index 3ae92133..55dd7c79 100644 --- a/resources/regressions/all_ops.json/mutants/81/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol @@ -10,8 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return true; } // Expect 3 mutants: x >= y, x != y, false @@ -40,9 +41,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/all_ops.json/mutants/53/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/53/LVR/LVR.sol deleted file mode 100644 index a5082f3b..00000000 --- a/resources/regressions/all_ops.json/mutants/53/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 2; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol new file mode 100644 index 00000000..52949d03 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` + function more(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/54/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/54/LVR/LVR.sol deleted file mode 100644 index cb3769d5..00000000 --- a/resources/regressions/all_ops.json/mutants/54/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;` - int256 pos_one = 1; - return -1; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol new file mode 100644 index 00000000..a3e16320 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` + function more(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/all_ops.json/mutants/55/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/55/LVR/LVR.sol deleted file mode 100644 index 98a170bc..00000000 --- a/resources/regressions/all_ops.json/mutants/55/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;` - int256 pos_one = 1; - return 0; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/77/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol similarity index 94% rename from resources/regressions/test_log_invalid.json/mutants/77/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol index ab40e6c9..a9024427 100644 --- a/resources/regressions/test_log_invalid.json/mutants/77/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol @@ -15,8 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return false; } // Expect 3 mutants: x > y, x == y, true @@ -30,9 +31,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x == y; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/all_ops.json/mutants/56/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/56/LVR/LVR.sol deleted file mode 100644 index 31602f01..00000000 --- a/resources/regressions/all_ops.json/mutants/56/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;` - int256 pos_one = 1; - return 1; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/all_ops.json/mutants/82/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol similarity index 96% rename from resources/regressions/all_ops.json/mutants/82/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol index bdeac3af..337c9a92 100644 --- a/resources/regressions/all_ops.json/mutants/82/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol @@ -20,8 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x > y; } // Expect 3 mutants: x >= y, x <= y, false @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/83/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol similarity index 96% rename from resources/regressions/all_ops.json/mutants/83/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol index 430379f6..7c02b73b 100644 --- a/resources/regressions/all_ops.json/mutants/83/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol @@ -20,8 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x == y; } // Expect 3 mutants: x >= y, x <= y, false @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) == z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/58/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/58/LVR/LVR.sol deleted file mode 100644 index e241973d..00000000 --- a/resources/regressions/all_ops.json/mutants/58/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` - function signed_zero() public pure returns (int256) { - int256 zero = 1; - return zero; - } -} diff --git a/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol similarity index 100% rename from resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol diff --git a/resources/regressions/all_ops.json/mutants/59/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/59/LVR/LVR.sol deleted file mode 100644 index bae6e772..00000000 --- a/resources/regressions/all_ops.json/mutants/59/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;` - int256 zero = 0; - return -1; - } -} diff --git a/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol similarity index 100% rename from resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol diff --git a/resources/regressions/all_ops.json/mutants/60/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/60/LVR/LVR.sol deleted file mode 100644 index 728fbb96..00000000 --- a/resources/regressions/all_ops.json/mutants/60/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;` - int256 zero = 0; - return 0; - } -} diff --git a/resources/regressions/all_ops.json/mutants/75/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol similarity index 100% rename from resources/regressions/all_ops.json/mutants/75/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol diff --git a/resources/regressions/all_ops.json/mutants/76/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol similarity index 100% rename from resources/regressions/all_ops.json/mutants/76/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol diff --git a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol index dec84f24..ab40e6c9 100644 --- a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -31,8 +30,9 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; + return false; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol index 0c05265c..f42e7b7e 100644 --- a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -36,8 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x < y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol index 6141947b..e5f50322 100644 --- a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -36,8 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x > y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol index 9f8ccd04..83684484 100644 --- a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol @@ -10,9 +10,8 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false @@ -36,8 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return true; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol index 18e38f34..3ae92133 100644 --- a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol @@ -10,9 +10,8 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false @@ -41,8 +40,9 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol index 55dd7c79..bdeac3af 100644 --- a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol @@ -10,9 +10,8 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) > z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol index 52949d03..430379f6 100644 --- a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol @@ -15,9 +15,8 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x > y; } // Expect 3 mutants: x > y, x == y, true @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) == z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol index a3e16320..3d67c155 100644 --- a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol @@ -15,9 +15,8 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x > y; } // Expect 3 mutants: x > y, x == y, true @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol index a9024427..13612614 100644 --- a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol @@ -15,9 +15,8 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x > y; } // Expect 3 mutants: x > y, x == y, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) < z; } } diff --git a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol index 337c9a92..dd0c83ca 100644 --- a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol @@ -20,9 +20,8 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) > z; } } diff --git a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol index 7c02b73b..84889114 100644 --- a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol @@ -20,9 +20,8 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return true; } } diff --git a/resources/regressions/all_ops.json/mutants/88/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/73/UOR/UOR.sol similarity index 100% rename from resources/regressions/all_ops.json/mutants/88/UOR/UOR.sol rename to resources/regressions/all_ops.json/mutants/73/UOR/UOR.sol diff --git a/resources/regressions/all_ops.json/mutants/89/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol similarity index 100% rename from resources/regressions/all_ops.json/mutants/89/UOR/UOR.sol rename to resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol diff --git a/resources/regressions/all_ops.json/mutants/84/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/84/ROR/ROR.sol deleted file mode 100644 index 3d67c155..00000000 --- a/resources/regressions/all_ops.json/mutants/84/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` - ) public pure returns (bool) { - return true; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) != z; - } -} diff --git a/resources/regressions/all_ops.json/mutants/85/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/85/ROR/ROR.sol deleted file mode 100644 index 13612614..00000000 --- a/resources/regressions/all_ops.json/mutants/85/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` - ) public pure returns (bool) { - return (x + y) < z; - } -} diff --git a/resources/regressions/all_ops.json/mutants/86/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/86/ROR/ROR.sol deleted file mode 100644 index dd0c83ca..00000000 --- a/resources/regressions/all_ops.json/mutants/86/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` - ) public pure returns (bool) { - return (x + y) > z; - } -} diff --git a/resources/regressions/all_ops.json/mutants/87/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/87/ROR/ROR.sol deleted file mode 100644 index 84889114..00000000 --- a/resources/regressions/all_ops.json/mutants/87/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` - ) public pure returns (bool) { - return true; - } -} diff --git a/resources/regressions/edc.json/gambit_results.json b/resources/regressions/edc.json/gambit_results.json index 4a48f116..021c96d8 100644 --- a/resources/regressions/edc.json/gambit_results.json +++ b/resources/regressions/edc.json/gambit_results.json @@ -10,29 +10,5 @@ "orig": "delegatecall", "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", "repl": "call" - }, - { - "col": 17, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(true, \"Delegatecall failed\");\n }\n }\n", - "id": "2", - "line": 19, - "name": "mutants/2/Ops/EDC/EDC.sol", - "op": "EVR", - "orig": "success", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", - "repl": "true" - }, - { - "col": 17, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(false, \"Delegatecall failed\");\n }\n }\n", - "id": "3", - "line": 19, - "name": "mutants/3/Ops/EDC/EDC.sol", - "op": "EVR", - "orig": "success", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", - "repl": "false" } ] \ No newline at end of file diff --git a/resources/regressions/edc.json/mutants.log b/resources/regressions/edc.json/mutants.log index 8a510a3b..1b28f670 100644 --- a/resources/regressions/edc.json/mutants.log +++ b/resources/regressions/edc.json/mutants.log @@ -1,3 +1 @@ 1,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,16:38,delegatecall,call -2,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,19:17,success,true -3,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,19:17,success,false diff --git a/resources/regressions/edc.json/mutants/2/Ops/EDC/EDC.sol b/resources/regressions/edc.json/mutants/2/Ops/EDC/EDC.sol deleted file mode 100644 index c078b6f6..00000000 --- a/resources/regressions/edc.json/mutants/2/Ops/EDC/EDC.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.13; - -contract Helper { - function setVars(uint _num) public payable {} -} - -contract EDC { - uint public num; - address public sender; - uint public value; - bool public delegateSuccessful; - bytes public myData; - - function setVars(address _contract) public payable { - (bool success, ) = _contract.delegatecall( - abi.encodeWithSignature("setVars(uint256)", 1) - /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, "Delegatecall failed");` - ); - require(true, "Delegatecall failed"); - } -} diff --git a/resources/regressions/edc.json/mutants/3/Ops/EDC/EDC.sol b/resources/regressions/edc.json/mutants/3/Ops/EDC/EDC.sol deleted file mode 100644 index eed317db..00000000 --- a/resources/regressions/edc.json/mutants/3/Ops/EDC/EDC.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.13; - -contract Helper { - function setVars(uint _num) public payable {} -} - -contract EDC { - uint public num; - address public sender; - uint public value; - bool public delegateSuccessful; - bytes public myData; - - function setVars(address _contract) public payable { - (bool success, ) = _contract.delegatecall( - abi.encodeWithSignature("setVars(uint256)", 1) - /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, "Delegatecall failed");` - ); - require(false, "Delegatecall failed"); - } -} diff --git a/resources/regressions/lvr.json/gambit_results.json b/resources/regressions/lvr.json/gambit_results.json index 58f88b93..ebe26bc0 100644 --- a/resources/regressions/lvr.json/gambit_results.json +++ b/resources/regressions/lvr.json/gambit_results.json @@ -11,37 +11,13 @@ "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "1" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 0;\n }\n \n // Expect 2 mutant: 0, 2\n", - "id": "2", - "line": 16, - "name": "mutants/2/Ops/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 1;\n }\n \n // Expect 2 mutant: 0, 2\n", - "id": "3", - "line": 16, - "name": "mutants/3/Ops/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" - }, { "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", - "id": "4", + "id": "2", "line": 21, - "name": "mutants/4/Ops/LVR/LVR.sol", + "name": "mutants/2/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -51,45 +27,21 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", - "id": "5", + "id": "3", "line": 21, - "name": "mutants/5/Ops/LVR/LVR.sol", + "name": "mutants/3/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "2" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 0;\n }\n \n // Expect 2 mutants: 0, 1\n", - "id": "6", - "line": 22, - "name": "mutants/6/Ops/LVR/LVR.sol", - "op": "EVR", - "orig": "one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 1;\n }\n \n // Expect 2 mutants: 0, 1\n", - "id": "7", - "line": 22, - "name": "mutants/7/Ops/LVR/LVR.sol", - "op": "EVR", - "orig": "one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" - }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", - "id": "8", + "id": "4", "line": 27, - "name": "mutants/8/Ops/LVR/LVR.sol", + "name": "mutants/4/Ops/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -99,9 +51,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", - "id": "9", + "id": "5", "line": 27, - "name": "mutants/9/Ops/LVR/LVR.sol", + "name": "mutants/5/Ops/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -111,57 +63,21 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", - "id": "10", + "id": "6", "line": 27, - "name": "mutants/10/Ops/LVR/LVR.sol", + "name": "mutants/6/Ops/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "-2" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 0\n", - "id": "11", - "line": 28, - "name": "mutants/11/Ops/LVR/LVR.sol", - "op": "EVR", - "orig": "neg_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "-1" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 0\n", - "id": "12", - "line": 28, - "name": "mutants/12/Ops/LVR/LVR.sol", - "op": "EVR", - "orig": "neg_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 0\n", - "id": "13", - "line": 28, - "name": "mutants/13/Ops/LVR/LVR.sol", - "op": "EVR", - "orig": "neg_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" - }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", - "id": "14", + "id": "7", "line": 33, - "name": "mutants/14/Ops/LVR/LVR.sol", + "name": "mutants/7/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -171,9 +87,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", - "id": "15", + "id": "8", "line": 33, - "name": "mutants/15/Ops/LVR/LVR.sol", + "name": "mutants/8/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -183,57 +99,21 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", - "id": "16", + "id": "9", "line": 33, - "name": "mutants/16/Ops/LVR/LVR.sol", + "name": "mutants/9/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "2" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 1\n", - "id": "17", - "line": 34, - "name": "mutants/17/Ops/LVR/LVR.sol", - "op": "EVR", - "orig": "pos_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "-1" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 1\n", - "id": "18", - "line": 34, - "name": "mutants/18/Ops/LVR/LVR.sol", - "op": "EVR", - "orig": "pos_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 1\n", - "id": "19", - "line": 34, - "name": "mutants/19/Ops/LVR/LVR.sol", - "op": "EVR", - "orig": "pos_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" - }, { "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", - "id": "20", + "id": "10", "line": 39, - "name": "mutants/20/Ops/LVR/LVR.sol", + "name": "mutants/10/Ops/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -243,48 +123,12 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", - "id": "21", + "id": "11", "line": 39, - "name": "mutants/21/Ops/LVR/LVR.sol", + "name": "mutants/11/Ops/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "1" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return -1;\n }\n }\n", - "id": "22", - "line": 40, - "name": "mutants/22/Ops/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "-1" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 0;\n }\n }\n", - "id": "23", - "line": 40, - "name": "mutants/23/Ops/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 1;\n }\n }\n", - "id": "24", - "line": 40, - "name": "mutants/24/Ops/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" } ] \ No newline at end of file diff --git a/resources/regressions/lvr.json/mutants.log b/resources/regressions/lvr.json/mutants.log index c6d63732..dbe19c1e 100644 --- a/resources/regressions/lvr.json/mutants.log +++ b/resources/regressions/lvr.json/mutants.log @@ -1,24 +1,11 @@ 1,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 -2,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,16:16,zero,0 -3,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,16:16,zero,1 -4,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 -5,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 -6,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,22:16,one,0 -7,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,22:16,one,1 -8,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 -9,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 -10,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 -11,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,-1 -12,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,0 -13,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,1 -14,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 -15,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 -16,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 -17,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,-1 -18,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,0 -19,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,1 -20,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 -21,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 -22,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,-1 -23,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,0 -24,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,1 +2,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 +3,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 +4,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 +5,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 +6,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 +7,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 +8,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 +9,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 +10,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 +11,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 diff --git a/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol index 1e24417f..22af4185 100644 --- a/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/10/Ops/LVR/LVR.sol @@ -23,9 +23,8 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -2; + int256 neg_one = -1; return neg_one; } @@ -36,8 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = -1; return zero; } } diff --git a/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol index 96e97ffa..e241973d 100644 --- a/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/11/Ops/LVR/LVR.sol @@ -24,9 +24,8 @@ contract LVR { // Expect 2 mutants: 0, 1 function signed_neg_one() public pure returns (int256) { - /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;` int256 neg_one = -1; - return -1; + return neg_one; } // Expect 2 mutants: -1, 0 @@ -36,8 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = 1; return zero; } } diff --git a/resources/regressions/lvr.json/mutants/12/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/12/Ops/LVR/LVR.sol deleted file mode 100644 index 2d831118..00000000 --- a/resources/regressions/lvr.json/mutants/12/Ops/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;` - int256 neg_one = -1; - return 0; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/lvr.json/mutants/13/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/13/Ops/LVR/LVR.sol deleted file mode 100644 index cd826db1..00000000 --- a/resources/regressions/lvr.json/mutants/13/Ops/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;` - int256 neg_one = -1; - return 1; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/lvr.json/mutants/14/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/14/Ops/LVR/LVR.sol deleted file mode 100644 index e088a4e3..00000000 --- a/resources/regressions/lvr.json/mutants/14/Ops/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 0; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/lvr.json/mutants/15/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/15/Ops/LVR/LVR.sol deleted file mode 100644 index 2407079e..00000000 --- a/resources/regressions/lvr.json/mutants/15/Ops/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` - function signed_pos_one() public pure returns (int256) { - int256 pos_one = -1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/lvr.json/mutants/16/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/16/Ops/LVR/LVR.sol deleted file mode 100644 index a5082f3b..00000000 --- a/resources/regressions/lvr.json/mutants/16/Ops/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 2; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/lvr.json/mutants/17/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/17/Ops/LVR/LVR.sol deleted file mode 100644 index cb3769d5..00000000 --- a/resources/regressions/lvr.json/mutants/17/Ops/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;` - int256 pos_one = 1; - return -1; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/lvr.json/mutants/18/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/18/Ops/LVR/LVR.sol deleted file mode 100644 index 98a170bc..00000000 --- a/resources/regressions/lvr.json/mutants/18/Ops/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;` - int256 pos_one = 1; - return 0; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/lvr.json/mutants/19/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/19/Ops/LVR/LVR.sol deleted file mode 100644 index 31602f01..00000000 --- a/resources/regressions/lvr.json/mutants/19/Ops/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;` - int256 pos_one = 1; - return 1; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol index 135e11e3..f2cb8295 100644 --- a/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/2/Ops/LVR/LVR.sol @@ -12,14 +12,14 @@ contract LVR { // Expect 1 mutant: 1 function unsigned_zero() public pure returns (uint256) { - /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;` uint256 zero = 0; - return 0; + return zero; } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 0; return one; } diff --git a/resources/regressions/lvr.json/mutants/20/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/20/Ops/LVR/LVR.sol deleted file mode 100644 index 22af4185..00000000 --- a/resources/regressions/lvr.json/mutants/20/Ops/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` - function signed_zero() public pure returns (int256) { - int256 zero = -1; - return zero; - } -} diff --git a/resources/regressions/lvr.json/mutants/21/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/21/Ops/LVR/LVR.sol deleted file mode 100644 index e241973d..00000000 --- a/resources/regressions/lvr.json/mutants/21/Ops/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` - function signed_zero() public pure returns (int256) { - int256 zero = 1; - return zero; - } -} diff --git a/resources/regressions/lvr.json/mutants/22/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/22/Ops/LVR/LVR.sol deleted file mode 100644 index bae6e772..00000000 --- a/resources/regressions/lvr.json/mutants/22/Ops/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;` - int256 zero = 0; - return -1; - } -} diff --git a/resources/regressions/lvr.json/mutants/24/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/24/Ops/LVR/LVR.sol deleted file mode 100644 index a4882479..00000000 --- a/resources/regressions/lvr.json/mutants/24/Ops/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;` - int256 zero = 0; - return 1; - } -} diff --git a/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol index 0d782e4a..d18c6c48 100644 --- a/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/3/Ops/LVR/LVR.sol @@ -12,14 +12,14 @@ contract LVR { // Expect 1 mutant: 1 function unsigned_zero() public pure returns (uint256) { - /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;` uint256 zero = 0; - return 1; + return zero; } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 2; return one; } diff --git a/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol index f2cb8295..173dc540 100644 --- a/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/4/Ops/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 0; + uint256 one = 1; return one; } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 0; return neg_one; } diff --git a/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol index d18c6c48..72ffaedf 100644 --- a/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/5/Ops/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 2; + uint256 one = 1; return one; } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 1; return neg_one; } diff --git a/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol index 0d9d6236..1e24417f 100644 --- a/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/6/Ops/LVR/LVR.sol @@ -18,14 +18,14 @@ contract LVR { // Expect 2 mutant: 0, 2 function unsigned_one() public pure returns (uint256) { - /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;` uint256 one = 1; - return 0; + return one; } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = -2; return neg_one; } diff --git a/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol index 091e9f64..e088a4e3 100644 --- a/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/7/Ops/LVR/LVR.sol @@ -18,9 +18,8 @@ contract LVR { // Expect 2 mutant: 0, 2 function unsigned_one() public pure returns (uint256) { - /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;` uint256 one = 1; - return 1; + return one; } // Expect 2 mutants: 0, 1 @@ -30,8 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = 0; return pos_one; } diff --git a/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol index 173dc540..2407079e 100644 --- a/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/8/Ops/LVR/LVR.sol @@ -23,15 +23,15 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = -1; return neg_one; } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = -1; return pos_one; } diff --git a/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol b/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol index 72ffaedf..a5082f3b 100644 --- a/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol +++ b/resources/regressions/lvr.json/mutants/9/Ops/LVR/LVR.sol @@ -23,15 +23,15 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 1; + int256 neg_one = -1; return neg_one; } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = 2; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/gambit_results.json b/resources/regressions/test_log_invalid.json/gambit_results.json index d7ba80a7..8d7f063e 100644 --- a/resources/regressions/test_log_invalid.json/gambit_results.json +++ b/resources/regressions/test_log_invalid.json/gambit_results.json @@ -311,37 +311,13 @@ "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", "repl": "call" }, - { - "col": 17, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(true, \"Delegatecall failed\");\n }\n }\n", - "id": "27", - "line": 19, - "name": "mutants/27/EDC/EDC.sol", - "op": "EVR", - "orig": "success", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", - "repl": "true" - }, - { - "col": 17, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n function setVars(address _contract) public payable {\n (bool success, ) = _contract.delegatecall(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n+ /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, \"Delegatecall failed\");`\n );\n- require(success, \"Delegatecall failed\");\n+ require(false, \"Delegatecall failed\");\n }\n }\n", - "id": "28", - "line": 19, - "name": "mutants/28/EDC/EDC.sol", - "op": "EVR", - "orig": "success", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", - "repl": "false" - }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "29", + "id": "27", "line": 9, - "name": "mutants/29/LOR/LOR.sol", + "name": "mutants/27/LOR/LOR.sol", "op": "LOR", "orig": "a && b", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -351,9 +327,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "30", + "id": "28", "line": 9, - "name": "mutants/30/LOR/LOR.sol", + "name": "mutants/28/LOR/LOR.sol", "op": "LOR", "orig": "a && b", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -363,9 +339,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "31", + "id": "29", "line": 9, - "name": "mutants/31/LOR/LOR.sol", + "name": "mutants/29/LOR/LOR.sol", "op": "LOR", "orig": "a && b", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -375,9 +351,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "32", + "id": "30", "line": 14, - "name": "mutants/32/LOR/LOR.sol", + "name": "mutants/30/LOR/LOR.sol", "op": "LOR", "orig": "a || b", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -387,9 +363,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "33", + "id": "31", "line": 14, - "name": "mutants/33/LOR/LOR.sol", + "name": "mutants/31/LOR/LOR.sol", "op": "LOR", "orig": "a || b", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -399,9 +375,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "34", + "id": "32", "line": 14, - "name": "mutants/34/LOR/LOR.sol", + "name": "mutants/32/LOR/LOR.sol", "op": "LOR", "orig": "a || b", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -411,9 +387,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", - "id": "35", + "id": "33", "line": 19, - "name": "mutants/35/LOR/LOR.sol", + "name": "mutants/33/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -423,9 +399,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", - "id": "36", + "id": "34", "line": 19, - "name": "mutants/36/LOR/LOR.sol", + "name": "mutants/34/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -435,9 +411,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", - "id": "37", + "id": "35", "line": 19, - "name": "mutants/37/LOR/LOR.sol", + "name": "mutants/35/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", @@ -447,45 +423,21 @@ "col": 24, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", - "id": "38", + "id": "36", "line": 15, - "name": "mutants/38/LVR/LVR.sol", + "name": "mutants/36/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "1" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 0;\n }\n \n // Expect 2 mutant: 0, 2\n", - "id": "39", - "line": 16, - "name": "mutants/39/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n \n // Expect 1 mutant: 1\n function unsigned_zero() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n uint256 zero = 0;\n- return zero;\n+ return 1;\n }\n \n // Expect 2 mutant: 0, 2\n", - "id": "40", - "line": 16, - "name": "mutants/40/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" - }, { "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", - "id": "41", + "id": "37", "line": 21, - "name": "mutants/41/LVR/LVR.sol", + "name": "mutants/37/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -495,45 +447,21 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", - "id": "42", + "id": "38", "line": 21, - "name": "mutants/42/LVR/LVR.sol", + "name": "mutants/38/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "2" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 0;\n }\n \n // Expect 2 mutants: 0, 1\n", - "id": "43", - "line": 22, - "name": "mutants/43/LVR/LVR.sol", - "op": "EVR", - "orig": "one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -18,8 +18,9 @@\n \n // Expect 2 mutant: 0, 2\n function unsigned_one() public pure returns (uint256) {\n+ /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;`\n uint256 one = 1;\n- return one;\n+ return 1;\n }\n \n // Expect 2 mutants: 0, 1\n", - "id": "44", - "line": 22, - "name": "mutants/44/LVR/LVR.sol", - "op": "EVR", - "orig": "one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" - }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", - "id": "45", + "id": "39", "line": 27, - "name": "mutants/45/LVR/LVR.sol", + "name": "mutants/39/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -543,9 +471,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", - "id": "46", + "id": "40", "line": 27, - "name": "mutants/46/LVR/LVR.sol", + "name": "mutants/40/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -555,57 +483,21 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", - "id": "47", + "id": "41", "line": 27, - "name": "mutants/47/LVR/LVR.sol", + "name": "mutants/41/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "-2" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 0\n", - "id": "48", - "line": 28, - "name": "mutants/48/LVR/LVR.sol", - "op": "EVR", - "orig": "neg_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "-1" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 0\n", - "id": "49", - "line": 28, - "name": "mutants/49/LVR/LVR.sol", - "op": "EVR", - "orig": "neg_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -24,8 +24,9 @@\n \n // Expect 2 mutants: 0, 1\n function signed_neg_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;`\n int256 neg_one = -1;\n- return neg_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 0\n", - "id": "50", - "line": 28, - "name": "mutants/50/LVR/LVR.sol", - "op": "EVR", - "orig": "neg_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" - }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", - "id": "51", + "id": "42", "line": 33, - "name": "mutants/51/LVR/LVR.sol", + "name": "mutants/42/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -615,9 +507,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", - "id": "52", + "id": "43", "line": 33, - "name": "mutants/52/LVR/LVR.sol", + "name": "mutants/43/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -627,57 +519,21 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", - "id": "53", + "id": "44", "line": 33, - "name": "mutants/53/LVR/LVR.sol", + "name": "mutants/44/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "2" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return -1;\n }\n \n // Expect 2 mutants: -1, 1\n", - "id": "54", - "line": 34, - "name": "mutants/54/LVR/LVR.sol", - "op": "EVR", - "orig": "pos_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "-1" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 0;\n }\n \n // Expect 2 mutants: -1, 1\n", - "id": "55", - "line": 34, - "name": "mutants/55/LVR/LVR.sol", - "op": "EVR", - "orig": "pos_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n \n // Expect 2 mutants: -1, 0\n function signed_pos_one() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;`\n int256 pos_one = 1;\n- return pos_one;\n+ return 1;\n }\n \n // Expect 2 mutants: -1, 1\n", - "id": "56", - "line": 34, - "name": "mutants/56/LVR/LVR.sol", - "op": "EVR", - "orig": "pos_one", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" - }, { "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", - "id": "57", + "id": "45", "line": 39, - "name": "mutants/57/LVR/LVR.sol", + "name": "mutants/45/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -687,57 +543,21 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", - "id": "58", + "id": "46", "line": 39, - "name": "mutants/58/LVR/LVR.sol", + "name": "mutants/46/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", "repl": "1" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return -1;\n }\n }\n", - "id": "59", - "line": 40, - "name": "mutants/59/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "-1" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 0;\n }\n }\n", - "id": "60", - "line": 40, - "name": "mutants/60/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n \n // Expect 2 mutants: -1, 1\n function signed_zero() public pure returns (int256) {\n+ /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;`\n int256 zero = 0;\n- return zero;\n+ return 1;\n }\n }\n", - "id": "61", - "line": 40, - "name": "mutants/61/LVR/LVR.sol", - "op": "EVR", - "orig": "zero", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", - "repl": "1" - }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "62", + "id": "47", "line": 9, - "name": "mutants/62/ROR/ROR.sol", + "name": "mutants/47/ROR/ROR.sol", "op": "ROR", "orig": "<", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -747,9 +567,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "63", + "id": "48", "line": 9, - "name": "mutants/63/ROR/ROR.sol", + "name": "mutants/48/ROR/ROR.sol", "op": "ROR", "orig": "<", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -759,9 +579,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "64", + "id": "49", "line": 9, - "name": "mutants/64/ROR/ROR.sol", + "name": "mutants/49/ROR/ROR.sol", "op": "ROR", "orig": "x < y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -771,9 +591,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "65", + "id": "50", "line": 14, - "name": "mutants/65/ROR/ROR.sol", + "name": "mutants/50/ROR/ROR.sol", "op": "ROR", "orig": "<=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -783,9 +603,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "66", + "id": "51", "line": 14, - "name": "mutants/66/ROR/ROR.sol", + "name": "mutants/51/ROR/ROR.sol", "op": "ROR", "orig": "<=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -795,9 +615,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "67", + "id": "52", "line": 14, - "name": "mutants/67/ROR/ROR.sol", + "name": "mutants/52/ROR/ROR.sol", "op": "ROR", "orig": "x <= y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -807,9 +627,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "68", + "id": "53", "line": 19, - "name": "mutants/68/ROR/ROR.sol", + "name": "mutants/53/ROR/ROR.sol", "op": "ROR", "orig": ">", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -819,9 +639,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "69", + "id": "54", "line": 19, - "name": "mutants/69/ROR/ROR.sol", + "name": "mutants/54/ROR/ROR.sol", "op": "ROR", "orig": ">", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -831,9 +651,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "70", + "id": "55", "line": 19, - "name": "mutants/70/ROR/ROR.sol", + "name": "mutants/55/ROR/ROR.sol", "op": "ROR", "orig": "x > y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -843,9 +663,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "71", + "id": "56", "line": 24, - "name": "mutants/71/ROR/ROR.sol", + "name": "mutants/56/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -855,9 +675,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "72", + "id": "57", "line": 24, - "name": "mutants/72/ROR/ROR.sol", + "name": "mutants/57/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -867,9 +687,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "73", + "id": "58", "line": 24, - "name": "mutants/73/ROR/ROR.sol", + "name": "mutants/58/ROR/ROR.sol", "op": "ROR", "orig": "x >= y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -879,9 +699,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "74", + "id": "59", "line": 29, - "name": "mutants/74/ROR/ROR.sol", + "name": "mutants/59/ROR/ROR.sol", "op": "ROR", "orig": "==", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -891,9 +711,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "75", + "id": "60", "line": 29, - "name": "mutants/75/ROR/ROR.sol", + "name": "mutants/60/ROR/ROR.sol", "op": "ROR", "orig": "==", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -903,9 +723,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "76", + "id": "61", "line": 29, - "name": "mutants/76/ROR/ROR.sol", + "name": "mutants/61/ROR/ROR.sol", "op": "ROR", "orig": "x == y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -915,9 +735,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", - "id": "77", + "id": "62", "line": 34, - "name": "mutants/77/ROR/ROR.sol", + "name": "mutants/62/ROR/ROR.sol", "op": "ROR", "orig": "x == y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -927,9 +747,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "78", + "id": "63", "line": 39, - "name": "mutants/78/ROR/ROR.sol", + "name": "mutants/63/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -939,9 +759,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "79", + "id": "64", "line": 39, - "name": "mutants/79/ROR/ROR.sol", + "name": "mutants/64/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -951,9 +771,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "80", + "id": "65", "line": 39, - "name": "mutants/80/ROR/ROR.sol", + "name": "mutants/65/ROR/ROR.sol", "op": "ROR", "orig": "x != y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -963,9 +783,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", - "id": "81", + "id": "66", "line": 44, - "name": "mutants/81/ROR/ROR.sol", + "name": "mutants/66/ROR/ROR.sol", "op": "ROR", "orig": "x != y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -975,9 +795,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "82", + "id": "67", "line": 53, - "name": "mutants/82/ROR/ROR.sol", + "name": "mutants/67/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -987,9 +807,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "83", + "id": "68", "line": 53, - "name": "mutants/83/ROR/ROR.sol", + "name": "mutants/68/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -999,9 +819,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "84", + "id": "69", "line": 53, - "name": "mutants/84/ROR/ROR.sol", + "name": "mutants/69/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) >= z", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -1011,9 +831,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", - "id": "85", + "id": "70", "line": 62, - "name": "mutants/85/ROR/ROR.sol", + "name": "mutants/70/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -1023,9 +843,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", - "id": "86", + "id": "71", "line": 62, - "name": "mutants/86/ROR/ROR.sol", + "name": "mutants/71/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -1035,9 +855,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", - "id": "87", + "id": "72", "line": 62, - "name": "mutants/87/ROR/ROR.sol", + "name": "mutants/72/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) != z", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -1047,9 +867,9 @@ "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", - "id": "88", + "id": "73", "line": 14, - "name": "mutants/88/UOR/UOR.sol", + "name": "mutants/73/UOR/UOR.sol", "op": "UOR", "orig": "~", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", @@ -1059,9 +879,9 @@ "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", - "id": "89", + "id": "74", "line": 19, - "name": "mutants/89/UOR/UOR.sol", + "name": "mutants/74/UOR/UOR.sol", "op": "UOR", "orig": "~", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", diff --git a/resources/regressions/test_log_invalid.json/mutants.log b/resources/regressions/test_log_invalid.json/mutants.log index 98a98f96..abc080e6 100644 --- a/resources/regressions/test_log_invalid.json/mutants.log +++ b/resources/regressions/test_log_invalid.json/mutants.log @@ -24,66 +24,51 @@ 24,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,16:18,&,| 25,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,22:18,^,& 26,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,16:38,delegatecall,call -27,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,19:17,success,true -28,EVR,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,19:17,success,false -29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,a -30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,b -31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,false -32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,a -33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,b -34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,true -35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y -36,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) -37,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true -38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 -39,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,16:16,zero,0 -40,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,16:16,zero,1 -41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 -42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 -43,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,22:16,one,0 -44,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,22:16,one,1 -45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 -46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 -47,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 -48,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,-1 -49,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,0 -50,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,28:16,neg_one,1 -51,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 -52,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 -53,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 -54,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,-1 -55,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,0 -56,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,34:16,pos_one,1 -57,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 -58,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 -59,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,-1 -60,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,0 -61,EVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,40:16,zero,1 -62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,<= -63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,!= -64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:16,x < y,false -65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,< -66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,== -67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:16,x <= y,true -68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,>= -69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,!= -70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:16,x > y,false -71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,> -72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,== -73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:16,x >= y,true -74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,<= -75,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,>= -76,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:16,x == y,false -77,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,34:16,x == y,false -78,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,< -79,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,> -80,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:16,x != y,true -81,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,44:16,x != y,true -82,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,> -83,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,== -84,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:16,(x + y) >= z,true -85,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,< -86,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,> -87,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:16,(x + y) != z,true -88,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~, - -89,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,~, ~ +27,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,a +28,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,b +29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,false +30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,a +31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,b +32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,true +33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y +34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) +35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true +36,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 +37,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 +38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 +39,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 +40,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 +41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 +42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 +43,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 +44,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 +45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 +46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 +47,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,<= +48,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,!= +49,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:16,x < y,false +50,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,< +51,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,== +52,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:16,x <= y,true +53,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,>= +54,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,!= +55,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:16,x > y,false +56,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,> +57,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,== +58,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:16,x >= y,true +59,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,<= +60,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,>= +61,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:16,x == y,false +62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,34:16,x == y,false +63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,< +64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,> +65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:16,x != y,true +66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,44:16,x != y,true +67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,> +68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,== +69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:16,(x + y) >= z,true +70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,< +71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,> +72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:16,(x + y) != z,true +73,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~, - +74,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,~, ~ diff --git a/resources/regressions/test_log_invalid.json/mutants/27/EDC/EDC.sol b/resources/regressions/test_log_invalid.json/mutants/27/EDC/EDC.sol deleted file mode 100644 index c078b6f6..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/27/EDC/EDC.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.13; - -contract Helper { - function setVars(uint _num) public payable {} -} - -contract EDC { - uint public num; - address public sender; - uint public value; - bool public delegateSuccessful; - bytes public myData; - - function setVars(address _contract) public payable { - (bool success, ) = _contract.delegatecall( - abi.encodeWithSignature("setVars(uint256)", 1) - /// ExpressionValueReplacement(`success` |==> `true`) of: `require(success, "Delegatecall failed");` - ); - require(true, "Delegatecall failed"); - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol similarity index 76% rename from resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol rename to resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol index fb49fdaf..67f4f5df 100644 --- a/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a && b; + return a; } // Expect three mutants: a, b, true @@ -15,8 +16,7 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return a != (x >= y); + return (x < y) || (a != (x >= y)); } } diff --git a/resources/regressions/test_log_invalid.json/mutants/28/EDC/EDC.sol b/resources/regressions/test_log_invalid.json/mutants/28/EDC/EDC.sol deleted file mode 100644 index eed317db..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/28/EDC/EDC.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.13; - -contract Helper { - function setVars(uint _num) public payable {} -} - -contract EDC { - uint public num; - address public sender; - uint public value; - bool public delegateSuccessful; - bytes public myData; - - function setVars(address _contract) public payable { - (bool success, ) = _contract.delegatecall( - abi.encodeWithSignature("setVars(uint256)", 1) - /// ExpressionValueReplacement(`success` |==> `false`) of: `require(success, "Delegatecall failed");` - ); - require(false, "Delegatecall failed"); - } -} diff --git a/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol similarity index 76% rename from resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol rename to resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol index fb49fdaf..d63286bb 100644 --- a/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a && b; + return b; } // Expect three mutants: a, b, true @@ -15,8 +16,7 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return a != (x >= y); + return (x < y) || (a != (x >= y)); } } diff --git a/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol index 67f4f5df..0e5805db 100644 --- a/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` + /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a; + return false; } // Expect three mutants: a, b, true diff --git a/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol index d63286bb..06fbf70c 100644 --- a/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return b; + return a && b; } // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a || b; + return a; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol index 0e5805db..620f1630 100644 --- a/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return false; + return a && b; } // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a || b; + return b; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol index 06fbf70c..29afb982 100644 --- a/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol @@ -10,9 +10,9 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` + /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a; + return true; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol index 620f1630..eb339ae7 100644 --- a/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol @@ -10,13 +10,13 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return b; + return a || b; } // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return (x < y) || (a != (x >= y)); + return x < y; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol index 29afb982..fb49fdaf 100644 --- a/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol @@ -10,13 +10,13 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return true; + return a || b; } // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return (x < y) || (a != (x >= y)); + return a != (x >= y); } } diff --git a/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol index eb339ae7..0d9c28b2 100644 --- a/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol @@ -15,8 +15,8 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return x < y; + return true; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/57/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol similarity index 89% rename from resources/regressions/test_log_invalid.json/mutants/57/LVR/LVR.sol rename to resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol index 22af4185..e06271e2 100644 --- a/resources/regressions/test_log_invalid.json/mutants/57/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol @@ -11,8 +11,9 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; + uint256 zero = 1; return zero; } @@ -35,9 +36,8 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = -1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/lvr.json/mutants/23/Ops/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol similarity index 89% rename from resources/regressions/lvr.json/mutants/23/Ops/LVR/LVR.sol rename to resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol index 728fbb96..f2cb8295 100644 --- a/resources/regressions/lvr.json/mutants/23/Ops/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol @@ -17,8 +17,9 @@ contract LVR { } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 0; return one; } @@ -36,8 +37,7 @@ contract LVR { // Expect 2 mutants: -1, 1 function signed_zero() public pure returns (int256) { - /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;` int256 zero = 0; - return 0; + return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol index e06271e2..d18c6c48 100644 --- a/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol @@ -11,15 +11,15 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 1; + uint256 zero = 0; return zero; } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 2; return one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol index 135e11e3..173dc540 100644 --- a/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol @@ -12,9 +12,8 @@ contract LVR { // Expect 1 mutant: 1 function unsigned_zero() public pure returns (uint256) { - /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;` uint256 zero = 0; - return 0; + return zero; } // Expect 2 mutant: 0, 2 @@ -24,8 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 0; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol index 0d782e4a..72ffaedf 100644 --- a/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol @@ -12,9 +12,8 @@ contract LVR { // Expect 1 mutant: 1 function unsigned_zero() public pure returns (uint256) { - /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;` uint256 zero = 0; - return 1; + return zero; } // Expect 2 mutant: 0, 2 @@ -24,8 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 1; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol index f2cb8295..1e24417f 100644 --- a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 0; + uint256 one = 1; return one; } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = -2; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol index d18c6c48..e088a4e3 100644 --- a/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol @@ -17,9 +17,8 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 2; + uint256 one = 1; return one; } @@ -30,8 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = 0; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol index 0d9d6236..2407079e 100644 --- a/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol @@ -18,9 +18,8 @@ contract LVR { // Expect 2 mutant: 0, 2 function unsigned_one() public pure returns (uint256) { - /// ExpressionValueReplacement(`one` |==> `0`) of: `return one;` uint256 one = 1; - return 0; + return one; } // Expect 2 mutants: 0, 1 @@ -30,8 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = -1; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol index 091e9f64..a5082f3b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol @@ -18,9 +18,8 @@ contract LVR { // Expect 2 mutant: 0, 2 function unsigned_one() public pure returns (uint256) { - /// ExpressionValueReplacement(`one` |==> `1`) of: `return one;` uint256 one = 1; - return 1; + return one; } // Expect 2 mutants: 0, 1 @@ -30,8 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = 2; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol index 173dc540..22af4185 100644 --- a/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol @@ -23,9 +23,8 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = -1; return neg_one; } @@ -36,8 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = -1; return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol index 72ffaedf..e241973d 100644 --- a/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol @@ -23,9 +23,8 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 1; + int256 neg_one = -1; return neg_one; } @@ -36,8 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = 1; return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol deleted file mode 100644 index 1e24417f..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -2; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol new file mode 100644 index 00000000..dec84f24 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` + function less(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol deleted file mode 100644 index 96e97ffa..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - /// ExpressionValueReplacement(`neg_one` |==> `-1`) of: `return neg_one;` - int256 neg_one = -1; - return -1; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol new file mode 100644 index 00000000..0c05265c --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` + function less(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/49/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/49/LVR/LVR.sol deleted file mode 100644 index 2d831118..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/49/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - /// ExpressionValueReplacement(`neg_one` |==> `0`) of: `return neg_one;` - int256 neg_one = -1; - return 0; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/all_ops.json/mutants/80/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol similarity index 93% rename from resources/regressions/all_ops.json/mutants/80/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol index 83684484..6141947b 100644 --- a/resources/regressions/all_ops.json/mutants/80/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return false; } // Expect 3 mutants: x < y, x == y, true @@ -35,9 +36,8 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/50/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/50/LVR/LVR.sol deleted file mode 100644 index cd826db1..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/50/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - /// ExpressionValueReplacement(`neg_one` |==> `1`) of: `return neg_one;` - int256 neg_one = -1; - return 1; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/all_ops.json/mutants/78/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol similarity index 94% rename from resources/regressions/all_ops.json/mutants/78/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol index f42e7b7e..9f8ccd04 100644 --- a/resources/regressions/all_ops.json/mutants/78/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol @@ -10,8 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x < y; } // Expect 3 mutants: x >= y, x != y, false @@ -35,9 +36,8 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/51/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/51/LVR/LVR.sol deleted file mode 100644 index e088a4e3..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/51/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 0; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol new file mode 100644 index 00000000..18e38f34 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x >= y, x != y, false + function more(uint256 x, uint256 y) public pure returns (bool) { + return x > y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/52/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/52/LVR/LVR.sol deleted file mode 100644 index 2407079e..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/52/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` - function signed_pos_one() public pure returns (int256) { - int256 pos_one = -1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/80/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol similarity index 94% rename from resources/regressions/test_log_invalid.json/mutants/80/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol index 83684484..55dd7c79 100644 --- a/resources/regressions/test_log_invalid.json/mutants/80/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol @@ -10,8 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return true; } // Expect 3 mutants: x >= y, x != y, false @@ -35,9 +36,8 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/53/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/53/LVR/LVR.sol deleted file mode 100644 index a5082f3b..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/53/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 2; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol new file mode 100644 index 00000000..52949d03 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` + function more(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/54/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/54/LVR/LVR.sol deleted file mode 100644 index cb3769d5..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/54/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - /// ExpressionValueReplacement(`pos_one` |==> `-1`) of: `return pos_one;` - int256 pos_one = 1; - return -1; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol new file mode 100644 index 00000000..a3e16320 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` + function more(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/55/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/55/LVR/LVR.sol deleted file mode 100644 index 98a170bc..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/55/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - /// ExpressionValueReplacement(`pos_one` |==> `0`) of: `return pos_one;` - int256 pos_one = 1; - return 0; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol new file mode 100644 index 00000000..a9024427 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract ROR { + // Expect 3 mutants: x <= y, x != y, false + function less(uint256 x, uint256 y) public pure returns (bool) { + return x < y; + } + + // Expect 3 mutants: x < y, x == y, true + function less_equal(uint256 x, uint256 y) public pure returns (bool) { + return x <= y; + } + + // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` + function more(uint256 x, uint256 y) public pure returns (bool) { + return false; + } + + // Expect 3 mutants: x > y, x == y, true + function more_equal(uint256 x, uint256 y) public pure returns (bool) { + return x >= y; + } + + // Expect 3 mutants: x >= y, x <= y, false + function equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x == y; + } + + // Expect 2 mutants: true, false + function equal_not_ord(bool x, bool y) public pure returns (bool) { + return x == y; + } + + // Expect 3 mutants: x > y, x < y, true + function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { + return x != y; + } + + // Expect 2 mutants: true, false + function not_equal_not_ord(bool x, bool y) public pure returns (bool) { + return x != y; + } + + // Expect 3 mutants: (x + y) > z, (x + y) == z, true + function more_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) >= z; + } + + // Expect 3 mutants: (x + y) > z, (x + y) < z, true + function not_equal_over_aor( + uint256 x, + uint256 y, + uint256 z + ) public pure returns (bool) { + return (x + y) != z; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/56/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/56/LVR/LVR.sol deleted file mode 100644 index 31602f01..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/56/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - /// ExpressionValueReplacement(`pos_one` |==> `1`) of: `return pos_one;` - int256 pos_one = 1; - return 1; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - int256 zero = 0; - return zero; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/82/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol similarity index 96% rename from resources/regressions/test_log_invalid.json/mutants/82/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol index bdeac3af..337c9a92 100644 --- a/resources/regressions/test_log_invalid.json/mutants/82/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol @@ -20,8 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x > y; } // Expect 3 mutants: x >= y, x <= y, false @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/83/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol similarity index 96% rename from resources/regressions/test_log_invalid.json/mutants/83/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol index 430379f6..7c02b73b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/83/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol @@ -20,8 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x == y; } // Expect 3 mutants: x >= y, x <= y, false @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) == z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/58/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/58/LVR/LVR.sol deleted file mode 100644 index e241973d..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/58/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` - function signed_zero() public pure returns (int256) { - int256 zero = 1; - return zero; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol similarity index 100% rename from resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol diff --git a/resources/regressions/test_log_invalid.json/mutants/59/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/59/LVR/LVR.sol deleted file mode 100644 index bae6e772..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/59/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - /// ExpressionValueReplacement(`zero` |==> `-1`) of: `return zero;` - int256 zero = 0; - return -1; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol similarity index 100% rename from resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol diff --git a/resources/regressions/test_log_invalid.json/mutants/60/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/60/LVR/LVR.sol deleted file mode 100644 index 728fbb96..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/60/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - /// ExpressionValueReplacement(`zero` |==> `0`) of: `return zero;` - int256 zero = 0; - return 0; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/75/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol similarity index 100% rename from resources/regressions/test_log_invalid.json/mutants/75/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol diff --git a/resources/regressions/test_log_invalid.json/mutants/61/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/61/LVR/LVR.sol deleted file mode 100644 index a4882479..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/61/LVR/LVR.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract LVR { - uint256 one_u = 1; - uint256 zero_u = 0; - int256 n_one_s = -1; - int256 one_s = 1; - int256 zero_s = 0; - - // Expect 1 mutant: 1 - function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; - return zero; - } - - // Expect 2 mutant: 0, 2 - function unsigned_one() public pure returns (uint256) { - uint256 one = 1; - return one; - } - - // Expect 2 mutants: 0, 1 - function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; - return neg_one; - } - - // Expect 2 mutants: -1, 0 - function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; - return pos_one; - } - - // Expect 2 mutants: -1, 1 - function signed_zero() public pure returns (int256) { - /// ExpressionValueReplacement(`zero` |==> `1`) of: `return zero;` - int256 zero = 0; - return 1; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/76/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol similarity index 100% rename from resources/regressions/test_log_invalid.json/mutants/76/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol diff --git a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol index dec84f24..ab40e6c9 100644 --- a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -31,8 +30,9 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; + return false; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol index 0c05265c..f42e7b7e 100644 --- a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -36,8 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x < y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol index 6141947b..e5f50322 100644 --- a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -36,8 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x > y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol index 9f8ccd04..83684484 100644 --- a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol @@ -10,9 +10,8 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false @@ -36,8 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return true; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol index 18e38f34..3ae92133 100644 --- a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol @@ -10,9 +10,8 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false @@ -41,8 +40,9 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol index 55dd7c79..bdeac3af 100644 --- a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol @@ -10,9 +10,8 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) > z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol index 52949d03..430379f6 100644 --- a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol @@ -15,9 +15,8 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x > y; } // Expect 3 mutants: x > y, x == y, true @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) == z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol index a3e16320..3d67c155 100644 --- a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol @@ -15,9 +15,8 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x > y; } // Expect 3 mutants: x > y, x == y, true @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol index a9024427..13612614 100644 --- a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol @@ -15,9 +15,8 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x > y; } // Expect 3 mutants: x > y, x == y, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) < z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol index 337c9a92..dd0c83ca 100644 --- a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol @@ -20,9 +20,8 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) > z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol index 7c02b73b..84889114 100644 --- a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol @@ -20,9 +20,8 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return true; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/88/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/73/UOR/UOR.sol similarity index 100% rename from resources/regressions/test_log_invalid.json/mutants/88/UOR/UOR.sol rename to resources/regressions/test_log_invalid.json/mutants/73/UOR/UOR.sol diff --git a/resources/regressions/test_log_invalid.json/mutants/89/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol similarity index 100% rename from resources/regressions/test_log_invalid.json/mutants/89/UOR/UOR.sol rename to resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol diff --git a/resources/regressions/test_log_invalid.json/mutants/81/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/81/ROR/ROR.sol deleted file mode 100644 index 3ae92133..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/81/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) != z; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/84/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/84/ROR/ROR.sol deleted file mode 100644 index 3d67c155..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/84/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` - ) public pure returns (bool) { - return true; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) != z; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/85/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/85/ROR/ROR.sol deleted file mode 100644 index 13612614..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/85/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` - ) public pure returns (bool) { - return (x + y) < z; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/86/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/86/ROR/ROR.sol deleted file mode 100644 index dd0c83ca..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/86/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` - ) public pure returns (bool) { - return (x + y) > z; - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/87/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/87/ROR/ROR.sol deleted file mode 100644 index 84889114..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/87/ROR/ROR.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for relational operator replacement (ROR) -contract ROR { - // Expect 3 mutants: x <= y, x != y, false - function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; - } - - // Expect 3 mutants: x < y, x == y, true - function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; - } - - // Expect 3 mutants: x >= y, x != y, false - function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; - } - - // Expect 3 mutants: x > y, x == y, true - function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; - } - - // Expect 3 mutants: x >= y, x <= y, false - function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; - } - - // Expect 2 mutants: true, false - function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; - } - - // Expect 3 mutants: x > y, x < y, true - function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; - } - - // Expect 2 mutants: true, false - function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; - } - - // Expect 3 mutants: (x + y) > z, (x + y) == z, true - function more_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - ) public pure returns (bool) { - return (x + y) >= z; - } - - // Expect 3 mutants: (x + y) > z, (x + y) < z, true - function not_equal_over_aor( - uint256 x, - uint256 y, - uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` - ) public pure returns (bool) { - return true; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json index 40fcd965..7bb1ca00 100644 --- a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json @@ -251,37 +251,13 @@ "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", "repl": "assert(true)" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "22", - "line": 25, - "name": "mutants/22/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "23", - "line": 25, - "name": "mutants/23/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, { "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "24", + "id": "22", "line": 29, - "name": "mutants/24/MultipleContracts/C.sol", + "name": "mutants/22/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -291,9 +267,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "25", + "id": "23", "line": 29, - "name": "mutants/25/MultipleContracts/C.sol", + "name": "mutants/23/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -303,9 +279,9 @@ "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "26", + "id": "24", "line": 29, - "name": "mutants/26/MultipleContracts/C.sol", + "name": "mutants/24/MultipleContracts/C.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -315,9 +291,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "27", + "id": "25", "line": 34, - "name": "mutants/27/MultipleContracts/C.sol", + "name": "mutants/25/MultipleContracts/C.sol", "op": "STD", "orig": "Utils.getarray(b, address(this))", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -327,9 +303,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "28", + "id": "26", "line": 38, - "name": "mutants/28/MultipleContracts/C.sol", + "name": "mutants/26/MultipleContracts/C.sol", "op": "STD", "orig": "return c + d", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -339,9 +315,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "29", + "id": "27", "line": 38, - "name": "mutants/29/MultipleContracts/C.sol", + "name": "mutants/27/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -351,9 +327,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "30", + "id": "28", "line": 38, - "name": "mutants/30/MultipleContracts/C.sol", + "name": "mutants/28/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -363,9 +339,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "31", + "id": "29", "line": 38, - "name": "mutants/31/MultipleContracts/C.sol", + "name": "mutants/29/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -375,9 +351,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "32", + "id": "30", "line": 38, - "name": "mutants/32/MultipleContracts/C.sol", + "name": "mutants/30/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -387,9 +363,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "33", + "id": "31", "line": 7, - "name": "mutants/33/MultipleContracts/C.sol", + "name": "mutants/31/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -399,9 +375,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "34", + "id": "32", "line": 7, - "name": "mutants/34/MultipleContracts/C.sol", + "name": "mutants/32/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -411,9 +387,9 @@ "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "35", + "id": "33", "line": 7, - "name": "mutants/35/MultipleContracts/C.sol", + "name": "mutants/33/MultipleContracts/C.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -423,9 +399,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", - "id": "36", + "id": "34", "line": 11, - "name": "mutants/36/MultipleContracts/C.sol", + "name": "mutants/34/MultipleContracts/C.sol", "op": "STD", "orig": "return a + b", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -435,9 +411,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "37", + "id": "35", "line": 11, - "name": "mutants/37/MultipleContracts/C.sol", + "name": "mutants/35/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -447,9 +423,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "38", + "id": "36", "line": 11, - "name": "mutants/38/MultipleContracts/C.sol", + "name": "mutants/36/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -459,9 +435,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "39", + "id": "37", "line": 11, - "name": "mutants/39/MultipleContracts/C.sol", + "name": "mutants/37/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -471,9 +447,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "40", + "id": "38", "line": 11, - "name": "mutants/40/MultipleContracts/C.sol", + "name": "mutants/38/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -483,9 +459,9 @@ "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "41", + "id": "39", "line": 17, - "name": "mutants/41/MultipleContracts/C.sol", + "name": "mutants/39/MultipleContracts/C.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -495,9 +471,9 @@ "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "42", + "id": "40", "line": 17, - "name": "mutants/42/MultipleContracts/C.sol", + "name": "mutants/40/MultipleContracts/C.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -507,9 +483,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", - "id": "43", + "id": "41", "line": 18, - "name": "mutants/43/MultipleContracts/C.sol", + "name": "mutants/41/MultipleContracts/C.sol", "op": "STD", "orig": "a[0] = msg.sender", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -519,9 +495,9 @@ "col": 11, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", - "id": "44", + "id": "42", "line": 18, - "name": "mutants/44/MultipleContracts/C.sol", + "name": "mutants/42/MultipleContracts/C.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -531,9 +507,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", - "id": "45", + "id": "43", "line": 19, - "name": "mutants/45/MultipleContracts/C.sol", + "name": "mutants/43/MultipleContracts/C.sol", "op": "STD", "orig": "return a", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -543,9 +519,9 @@ "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "46", + "id": "44", "line": 23, - "name": "mutants/46/MultipleContracts/C.sol", + "name": "mutants/44/MultipleContracts/C.sol", "op": "LVR", "orig": "10", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -555,9 +531,9 @@ "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "47", + "id": "45", "line": 23, - "name": "mutants/47/MultipleContracts/C.sol", + "name": "mutants/45/MultipleContracts/C.sol", "op": "LVR", "orig": "10", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -567,9 +543,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "48", + "id": "46", "line": 24, - "name": "mutants/48/MultipleContracts/C.sol", + "name": "mutants/46/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -579,9 +555,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "49", + "id": "47", "line": 24, - "name": "mutants/49/MultipleContracts/C.sol", + "name": "mutants/47/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -591,9 +567,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "50", + "id": "48", "line": 24, - "name": "mutants/50/MultipleContracts/C.sol", + "name": "mutants/48/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -603,9 +579,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "51", + "id": "49", "line": 24, - "name": "mutants/51/MultipleContracts/C.sol", + "name": "mutants/49/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -615,9 +591,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "52", + "id": "50", "line": 24, - "name": "mutants/52/MultipleContracts/C.sol", + "name": "mutants/50/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -627,45 +603,21 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "53", + "id": "51", "line": 25, - "name": "mutants/53/MultipleContracts/C.sol", + "name": "mutants/51/MultipleContracts/C.sol", "op": "STD", "orig": "return res", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", "repl": "assert(true)" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "54", - "line": 25, - "name": "mutants/54/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "55", - "line": 25, - "name": "mutants/55/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, { "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "56", + "id": "52", "line": 29, - "name": "mutants/56/MultipleContracts/C.sol", + "name": "mutants/52/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -675,9 +627,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "57", + "id": "53", "line": 29, - "name": "mutants/57/MultipleContracts/C.sol", + "name": "mutants/53/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -687,9 +639,9 @@ "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "58", + "id": "54", "line": 29, - "name": "mutants/58/MultipleContracts/C.sol", + "name": "mutants/54/MultipleContracts/C.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -699,9 +651,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "59", + "id": "55", "line": 34, - "name": "mutants/59/MultipleContracts/C.sol", + "name": "mutants/55/MultipleContracts/C.sol", "op": "STD", "orig": "Utils.getarray(b, address(this))", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -711,9 +663,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "60", + "id": "56", "line": 38, - "name": "mutants/60/MultipleContracts/C.sol", + "name": "mutants/56/MultipleContracts/C.sol", "op": "STD", "orig": "return c + d", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -723,9 +675,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "61", + "id": "57", "line": 38, - "name": "mutants/61/MultipleContracts/C.sol", + "name": "mutants/57/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -735,9 +687,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "62", + "id": "58", "line": 38, - "name": "mutants/62/MultipleContracts/C.sol", + "name": "mutants/58/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -747,9 +699,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "63", + "id": "59", "line": 38, - "name": "mutants/63/MultipleContracts/C.sol", + "name": "mutants/59/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -759,9 +711,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "64", + "id": "60", "line": 38, - "name": "mutants/64/MultipleContracts/C.sol", + "name": "mutants/60/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants.log b/resources/regressions/test_multiple_contracts_1.json/mutants.log index a102393f..7d9a6488 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_1.json/mutants.log @@ -19,46 +19,42 @@ 19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ 20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% 21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) -22,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 -23,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 -24,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -25,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -26,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 -27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% -33,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) -34,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false -35,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 -36,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) -37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* -39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ -40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% -41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 -42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) -44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 -45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) -46,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 -47,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* -51,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ -52,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% -53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) -54,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 -55,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 -56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -57,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -58,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 -59,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -60,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) -61,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -62,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -63,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -64,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% +22,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +23,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +24,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 +25,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) +27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% +31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) +32,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false +33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 +34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) +35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- +36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* +37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% +39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 +40,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 +41,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) +42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) +44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 +45,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 +46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ +47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% +51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) +52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +53,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +54,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 +55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) +57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +60,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol index f4904fd4..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return 0; + return res; } + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol index e702ba43..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return 1; + return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol index a4c6c970..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol @@ -25,9 +25,9 @@ contract C { return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[1] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol index 781e87b1..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol @@ -25,14 +25,14 @@ contract C { return res; } - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol index 7749a0cb..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol @@ -25,9 +25,8 @@ contract C { return res; } - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); + assert(c[0] == e); } function callmyself() external view { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol index a14e05da..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol index 4887a934..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol index 7a0c07d0..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol index d73584b8..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol index c226dcfd..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol @@ -3,8 +3,9 @@ pragma solidity ^0.8.13; library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(true); } function add(int8 a, int8 b) public pure returns (int8) { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol index c6022ee9..ecdc98c4 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol @@ -3,8 +3,9 @@ pragma solidity ^0.8.13; library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } function add(int8 a, int8 b) public pure returns (int8) { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol index 5f69007a..e9466e07 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(true); + assert(c[1] == e); } function add(int8 a, int8 b) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol index ecdc98c4..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(false); + assert(c[0] == e); } + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol index e9466e07..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[1] == e); + assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a - b; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol index f7a48737..86125329 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - assert(true); + return a * b; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol index 9e5f617a..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a / b; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol index 86125329..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + return a % b; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol index e85ef12c..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a + b; } } contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); + address[] memory a = new address[](0); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol index b32909ed..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a + b; } } contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); + address[] memory a = new address[](2); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol index f9a5de25..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); - a[0] = msg.sender; + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` + address[] memory a = new address[](1); + assert(true); return a; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol index 16f8bc88..9db93f13 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); - a[0] = msg.sender; + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` + address[] memory a = new address[](1); + a[1] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol index 427647a6..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol @@ -14,10 +14,10 @@ library Utils { contract C { function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` + a[0] = msg.sender; assert(true); - return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol index 9db93f13..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol @@ -14,14 +14,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { - /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[1] = msg.sender; + a[0] = msg.sender; return a; } + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; + uint256 a = 0; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol index a9342ea1..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol @@ -15,13 +15,13 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - assert(true); + return a; } + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; + uint256 a = 11; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol index f2136ed3..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; - uint256 res = a ** decimals; + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a + decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol index f69e3360..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; - uint256 res = a ** decimals; + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a - decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol index 13319cbe..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a + decimals; + uint256 res = a * decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol index 3279b41e..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a - decimals; + uint256 res = a / decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol index 95cc94e7..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a * decimals; + uint256 res = a % decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol index cc3476f1..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol @@ -20,10 +20,10 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; - return res; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` + uint256 res = a ** decimals; + assert(true); } function getarray(address[] memory c, address e) public pure { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol index 4979f42e..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol @@ -20,14 +20,14 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a ** decimals; return res; } + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol index 5933d066..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; - assert(true); + return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol index f4904fd4..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return 0; + return res; } + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(c[1] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol index e702ba43..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol @@ -21,9 +21,8 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return 1; + return res; } function getarray(address[] memory c, address e) public pure { @@ -31,8 +30,9 @@ contract C { } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol index a4c6c970..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol @@ -25,9 +25,8 @@ contract C { return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol index 781e87b1..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol @@ -25,9 +25,8 @@ contract C { return res; } - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol index 7749a0cb..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol @@ -25,9 +25,8 @@ contract C { return res; } - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); + assert(c[0] == e); } function callmyself() external view { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol index a14e05da..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol index 4887a934..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/61/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/61/MultipleContracts/C.sol deleted file mode 100644 index 7a0c07d0..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/61/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c - d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/62/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/62/MultipleContracts/C.sol deleted file mode 100644 index d73584b8..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/62/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c * d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/63/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/63/MultipleContracts/C.sol deleted file mode 100644 index c226dcfd..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/63/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/64/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/64/MultipleContracts/C.sol deleted file mode 100644 index c6022ee9..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/64/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json index 40fcd965..7bb1ca00 100644 --- a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json @@ -251,37 +251,13 @@ "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", "repl": "assert(true)" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "22", - "line": 25, - "name": "mutants/22/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "23", - "line": 25, - "name": "mutants/23/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, { "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "24", + "id": "22", "line": 29, - "name": "mutants/24/MultipleContracts/C.sol", + "name": "mutants/22/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -291,9 +267,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "25", + "id": "23", "line": 29, - "name": "mutants/25/MultipleContracts/C.sol", + "name": "mutants/23/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -303,9 +279,9 @@ "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "26", + "id": "24", "line": 29, - "name": "mutants/26/MultipleContracts/C.sol", + "name": "mutants/24/MultipleContracts/C.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -315,9 +291,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "27", + "id": "25", "line": 34, - "name": "mutants/27/MultipleContracts/C.sol", + "name": "mutants/25/MultipleContracts/C.sol", "op": "STD", "orig": "Utils.getarray(b, address(this))", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -327,9 +303,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "28", + "id": "26", "line": 38, - "name": "mutants/28/MultipleContracts/C.sol", + "name": "mutants/26/MultipleContracts/C.sol", "op": "STD", "orig": "return c + d", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -339,9 +315,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "29", + "id": "27", "line": 38, - "name": "mutants/29/MultipleContracts/C.sol", + "name": "mutants/27/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -351,9 +327,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "30", + "id": "28", "line": 38, - "name": "mutants/30/MultipleContracts/C.sol", + "name": "mutants/28/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -363,9 +339,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "31", + "id": "29", "line": 38, - "name": "mutants/31/MultipleContracts/C.sol", + "name": "mutants/29/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -375,9 +351,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "32", + "id": "30", "line": 38, - "name": "mutants/32/MultipleContracts/C.sol", + "name": "mutants/30/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -387,9 +363,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "33", + "id": "31", "line": 7, - "name": "mutants/33/MultipleContracts/C.sol", + "name": "mutants/31/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -399,9 +375,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "34", + "id": "32", "line": 7, - "name": "mutants/34/MultipleContracts/C.sol", + "name": "mutants/32/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -411,9 +387,9 @@ "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "35", + "id": "33", "line": 7, - "name": "mutants/35/MultipleContracts/C.sol", + "name": "mutants/33/MultipleContracts/C.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -423,9 +399,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", - "id": "36", + "id": "34", "line": 11, - "name": "mutants/36/MultipleContracts/C.sol", + "name": "mutants/34/MultipleContracts/C.sol", "op": "STD", "orig": "return a + b", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -435,9 +411,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "37", + "id": "35", "line": 11, - "name": "mutants/37/MultipleContracts/C.sol", + "name": "mutants/35/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -447,9 +423,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "38", + "id": "36", "line": 11, - "name": "mutants/38/MultipleContracts/C.sol", + "name": "mutants/36/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -459,9 +435,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "39", + "id": "37", "line": 11, - "name": "mutants/39/MultipleContracts/C.sol", + "name": "mutants/37/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -471,9 +447,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "40", + "id": "38", "line": 11, - "name": "mutants/40/MultipleContracts/C.sol", + "name": "mutants/38/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -483,9 +459,9 @@ "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "41", + "id": "39", "line": 17, - "name": "mutants/41/MultipleContracts/C.sol", + "name": "mutants/39/MultipleContracts/C.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -495,9 +471,9 @@ "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "42", + "id": "40", "line": 17, - "name": "mutants/42/MultipleContracts/C.sol", + "name": "mutants/40/MultipleContracts/C.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -507,9 +483,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", - "id": "43", + "id": "41", "line": 18, - "name": "mutants/43/MultipleContracts/C.sol", + "name": "mutants/41/MultipleContracts/C.sol", "op": "STD", "orig": "a[0] = msg.sender", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -519,9 +495,9 @@ "col": 11, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", - "id": "44", + "id": "42", "line": 18, - "name": "mutants/44/MultipleContracts/C.sol", + "name": "mutants/42/MultipleContracts/C.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -531,9 +507,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", - "id": "45", + "id": "43", "line": 19, - "name": "mutants/45/MultipleContracts/C.sol", + "name": "mutants/43/MultipleContracts/C.sol", "op": "STD", "orig": "return a", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -543,9 +519,9 @@ "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "46", + "id": "44", "line": 23, - "name": "mutants/46/MultipleContracts/C.sol", + "name": "mutants/44/MultipleContracts/C.sol", "op": "LVR", "orig": "10", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -555,9 +531,9 @@ "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "47", + "id": "45", "line": 23, - "name": "mutants/47/MultipleContracts/C.sol", + "name": "mutants/45/MultipleContracts/C.sol", "op": "LVR", "orig": "10", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -567,9 +543,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "48", + "id": "46", "line": 24, - "name": "mutants/48/MultipleContracts/C.sol", + "name": "mutants/46/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -579,9 +555,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "49", + "id": "47", "line": 24, - "name": "mutants/49/MultipleContracts/C.sol", + "name": "mutants/47/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -591,9 +567,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "50", + "id": "48", "line": 24, - "name": "mutants/50/MultipleContracts/C.sol", + "name": "mutants/48/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -603,9 +579,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "51", + "id": "49", "line": 24, - "name": "mutants/51/MultipleContracts/C.sol", + "name": "mutants/49/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -615,9 +591,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "52", + "id": "50", "line": 24, - "name": "mutants/52/MultipleContracts/C.sol", + "name": "mutants/50/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -627,45 +603,21 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "53", + "id": "51", "line": 25, - "name": "mutants/53/MultipleContracts/C.sol", + "name": "mutants/51/MultipleContracts/C.sol", "op": "STD", "orig": "return res", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", "repl": "assert(true)" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "54", - "line": 25, - "name": "mutants/54/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "55", - "line": 25, - "name": "mutants/55/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, { "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "56", + "id": "52", "line": 29, - "name": "mutants/56/MultipleContracts/C.sol", + "name": "mutants/52/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -675,9 +627,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "57", + "id": "53", "line": 29, - "name": "mutants/57/MultipleContracts/C.sol", + "name": "mutants/53/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -687,9 +639,9 @@ "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "58", + "id": "54", "line": 29, - "name": "mutants/58/MultipleContracts/C.sol", + "name": "mutants/54/MultipleContracts/C.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -699,9 +651,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "59", + "id": "55", "line": 34, - "name": "mutants/59/MultipleContracts/C.sol", + "name": "mutants/55/MultipleContracts/C.sol", "op": "STD", "orig": "Utils.getarray(b, address(this))", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -711,9 +663,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "60", + "id": "56", "line": 38, - "name": "mutants/60/MultipleContracts/C.sol", + "name": "mutants/56/MultipleContracts/C.sol", "op": "STD", "orig": "return c + d", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -723,9 +675,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "61", + "id": "57", "line": 38, - "name": "mutants/61/MultipleContracts/C.sol", + "name": "mutants/57/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -735,9 +687,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "62", + "id": "58", "line": 38, - "name": "mutants/62/MultipleContracts/C.sol", + "name": "mutants/58/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -747,9 +699,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "63", + "id": "59", "line": 38, - "name": "mutants/63/MultipleContracts/C.sol", + "name": "mutants/59/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -759,9 +711,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "64", + "id": "60", "line": 38, - "name": "mutants/64/MultipleContracts/C.sol", + "name": "mutants/60/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants.log b/resources/regressions/test_multiple_contracts_2.json/mutants.log index a102393f..7d9a6488 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_2.json/mutants.log @@ -19,46 +19,42 @@ 19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ 20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% 21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) -22,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 -23,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 -24,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -25,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -26,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 -27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% -33,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) -34,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false -35,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 -36,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) -37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* -39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ -40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% -41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 -42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) -44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 -45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) -46,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 -47,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* -51,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ -52,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% -53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) -54,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 -55,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 -56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -57,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -58,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 -59,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -60,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) -61,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -62,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -63,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -64,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% +22,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +23,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +24,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 +25,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) +27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% +31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) +32,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false +33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 +34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) +35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- +36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* +37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% +39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 +40,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 +41,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) +42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) +44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 +45,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 +46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ +47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% +51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) +52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +53,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +54,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 +55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) +57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +60,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol index f4904fd4..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return 0; + return res; } + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol index e702ba43..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return 1; + return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol index a4c6c970..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol @@ -25,9 +25,9 @@ contract C { return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[1] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol index 781e87b1..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol @@ -25,14 +25,14 @@ contract C { return res; } - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol index 7749a0cb..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol @@ -25,9 +25,8 @@ contract C { return res; } - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); + assert(c[0] == e); } function callmyself() external view { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol index a14e05da..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol index 4887a934..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol index 7a0c07d0..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol index d73584b8..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol index c226dcfd..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol @@ -3,8 +3,9 @@ pragma solidity ^0.8.13; library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(true); } function add(int8 a, int8 b) public pure returns (int8) { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol index c6022ee9..ecdc98c4 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol @@ -3,8 +3,9 @@ pragma solidity ^0.8.13; library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } function add(int8 a, int8 b) public pure returns (int8) { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol index 5f69007a..e9466e07 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(true); + assert(c[1] == e); } function add(int8 a, int8 b) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol index ecdc98c4..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(false); + assert(c[0] == e); } + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol index e9466e07..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[1] == e); + assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a - b; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol index f7a48737..86125329 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - assert(true); + return a * b; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol index 9e5f617a..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a / b; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol index 86125329..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + return a % b; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol index e85ef12c..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a + b; } } contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); + address[] memory a = new address[](0); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol index b32909ed..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a + b; } } contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); + address[] memory a = new address[](2); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol index f9a5de25..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); - a[0] = msg.sender; + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` + address[] memory a = new address[](1); + assert(true); return a; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol index 16f8bc88..9db93f13 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); - a[0] = msg.sender; + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` + address[] memory a = new address[](1); + a[1] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol index 427647a6..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol @@ -14,10 +14,10 @@ library Utils { contract C { function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` + a[0] = msg.sender; assert(true); - return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol index 9db93f13..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol @@ -14,14 +14,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { - /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[1] = msg.sender; + a[0] = msg.sender; return a; } + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; + uint256 a = 0; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol index a9342ea1..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol @@ -15,13 +15,13 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - assert(true); + return a; } + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; + uint256 a = 11; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol index f2136ed3..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; - uint256 res = a ** decimals; + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a + decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol index f69e3360..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; - uint256 res = a ** decimals; + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a - decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol index 13319cbe..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a + decimals; + uint256 res = a * decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol index 3279b41e..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a - decimals; + uint256 res = a / decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol index 95cc94e7..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a * decimals; + uint256 res = a % decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol index cc3476f1..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol @@ -20,10 +20,10 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; - return res; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` + uint256 res = a ** decimals; + assert(true); } function getarray(address[] memory c, address e) public pure { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol index 4979f42e..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol @@ -20,14 +20,14 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a ** decimals; return res; } + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol index 5933d066..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; - assert(true); + return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol index f4904fd4..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return 0; + return res; } + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(c[1] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol index e702ba43..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol @@ -21,9 +21,8 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return 1; + return res; } function getarray(address[] memory c, address e) public pure { @@ -31,8 +30,9 @@ contract C { } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol index a4c6c970..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol @@ -25,9 +25,8 @@ contract C { return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol index 781e87b1..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol @@ -25,9 +25,8 @@ contract C { return res; } - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol index 7749a0cb..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol @@ -25,9 +25,8 @@ contract C { return res; } - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); + assert(c[0] == e); } function callmyself() external view { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol index a14e05da..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol index 4887a934..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/61/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/61/MultipleContracts/C.sol deleted file mode 100644 index 7a0c07d0..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/61/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c - d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/62/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/62/MultipleContracts/C.sol deleted file mode 100644 index d73584b8..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/62/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c * d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/63/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/63/MultipleContracts/C.sol deleted file mode 100644 index c226dcfd..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/63/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/64/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/64/MultipleContracts/C.sol deleted file mode 100644 index c6022ee9..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/64/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json index 40fcd965..7bb1ca00 100644 --- a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json @@ -251,37 +251,13 @@ "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", "repl": "assert(true)" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "22", - "line": 25, - "name": "mutants/22/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "23", - "line": 25, - "name": "mutants/23/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, { "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "24", + "id": "22", "line": 29, - "name": "mutants/24/MultipleContracts/C.sol", + "name": "mutants/22/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -291,9 +267,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "25", + "id": "23", "line": 29, - "name": "mutants/25/MultipleContracts/C.sol", + "name": "mutants/23/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -303,9 +279,9 @@ "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "26", + "id": "24", "line": 29, - "name": "mutants/26/MultipleContracts/C.sol", + "name": "mutants/24/MultipleContracts/C.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -315,9 +291,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "27", + "id": "25", "line": 34, - "name": "mutants/27/MultipleContracts/C.sol", + "name": "mutants/25/MultipleContracts/C.sol", "op": "STD", "orig": "Utils.getarray(b, address(this))", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -327,9 +303,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "28", + "id": "26", "line": 38, - "name": "mutants/28/MultipleContracts/C.sol", + "name": "mutants/26/MultipleContracts/C.sol", "op": "STD", "orig": "return c + d", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -339,9 +315,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "29", + "id": "27", "line": 38, - "name": "mutants/29/MultipleContracts/C.sol", + "name": "mutants/27/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -351,9 +327,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "30", + "id": "28", "line": 38, - "name": "mutants/30/MultipleContracts/C.sol", + "name": "mutants/28/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -363,9 +339,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "31", + "id": "29", "line": 38, - "name": "mutants/31/MultipleContracts/C.sol", + "name": "mutants/29/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -375,9 +351,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "32", + "id": "30", "line": 38, - "name": "mutants/32/MultipleContracts/C.sol", + "name": "mutants/30/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -387,9 +363,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "33", + "id": "31", "line": 7, - "name": "mutants/33/MultipleContracts/C.sol", + "name": "mutants/31/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -399,9 +375,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "34", + "id": "32", "line": 7, - "name": "mutants/34/MultipleContracts/C.sol", + "name": "mutants/32/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -411,9 +387,9 @@ "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "35", + "id": "33", "line": 7, - "name": "mutants/35/MultipleContracts/C.sol", + "name": "mutants/33/MultipleContracts/C.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -423,9 +399,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", - "id": "36", + "id": "34", "line": 11, - "name": "mutants/36/MultipleContracts/C.sol", + "name": "mutants/34/MultipleContracts/C.sol", "op": "STD", "orig": "return a + b", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -435,9 +411,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "37", + "id": "35", "line": 11, - "name": "mutants/37/MultipleContracts/C.sol", + "name": "mutants/35/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -447,9 +423,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "38", + "id": "36", "line": 11, - "name": "mutants/38/MultipleContracts/C.sol", + "name": "mutants/36/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -459,9 +435,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "39", + "id": "37", "line": 11, - "name": "mutants/39/MultipleContracts/C.sol", + "name": "mutants/37/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -471,9 +447,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "40", + "id": "38", "line": 11, - "name": "mutants/40/MultipleContracts/C.sol", + "name": "mutants/38/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -483,9 +459,9 @@ "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "41", + "id": "39", "line": 17, - "name": "mutants/41/MultipleContracts/C.sol", + "name": "mutants/39/MultipleContracts/C.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -495,9 +471,9 @@ "col": 44, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "42", + "id": "40", "line": 17, - "name": "mutants/42/MultipleContracts/C.sol", + "name": "mutants/40/MultipleContracts/C.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -507,9 +483,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", - "id": "43", + "id": "41", "line": 18, - "name": "mutants/43/MultipleContracts/C.sol", + "name": "mutants/41/MultipleContracts/C.sol", "op": "STD", "orig": "a[0] = msg.sender", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -519,9 +495,9 @@ "col": 11, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", - "id": "44", + "id": "42", "line": 18, - "name": "mutants/44/MultipleContracts/C.sol", + "name": "mutants/42/MultipleContracts/C.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -531,9 +507,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", - "id": "45", + "id": "43", "line": 19, - "name": "mutants/45/MultipleContracts/C.sol", + "name": "mutants/43/MultipleContracts/C.sol", "op": "STD", "orig": "return a", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -543,9 +519,9 @@ "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "46", + "id": "44", "line": 23, - "name": "mutants/46/MultipleContracts/C.sol", + "name": "mutants/44/MultipleContracts/C.sol", "op": "LVR", "orig": "10", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -555,9 +531,9 @@ "col": 21, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "47", + "id": "45", "line": 23, - "name": "mutants/47/MultipleContracts/C.sol", + "name": "mutants/45/MultipleContracts/C.sol", "op": "LVR", "orig": "10", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -567,9 +543,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "48", + "id": "46", "line": 24, - "name": "mutants/48/MultipleContracts/C.sol", + "name": "mutants/46/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -579,9 +555,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "49", + "id": "47", "line": 24, - "name": "mutants/49/MultipleContracts/C.sol", + "name": "mutants/47/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -591,9 +567,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "50", + "id": "48", "line": 24, - "name": "mutants/50/MultipleContracts/C.sol", + "name": "mutants/48/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -603,9 +579,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "51", + "id": "49", "line": 24, - "name": "mutants/51/MultipleContracts/C.sol", + "name": "mutants/49/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -615,9 +591,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "52", + "id": "50", "line": 24, - "name": "mutants/52/MultipleContracts/C.sol", + "name": "mutants/50/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -627,45 +603,21 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "53", + "id": "51", "line": 25, - "name": "mutants/53/MultipleContracts/C.sol", + "name": "mutants/51/MultipleContracts/C.sol", "op": "STD", "orig": "return res", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", "repl": "assert(true)" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "54", - "line": 25, - "name": "mutants/54/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "55", - "line": 25, - "name": "mutants/55/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, { "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "56", + "id": "52", "line": 29, - "name": "mutants/56/MultipleContracts/C.sol", + "name": "mutants/52/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -675,9 +627,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "57", + "id": "53", "line": 29, - "name": "mutants/57/MultipleContracts/C.sol", + "name": "mutants/53/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -687,9 +639,9 @@ "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "58", + "id": "54", "line": 29, - "name": "mutants/58/MultipleContracts/C.sol", + "name": "mutants/54/MultipleContracts/C.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -699,9 +651,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "59", + "id": "55", "line": 34, - "name": "mutants/59/MultipleContracts/C.sol", + "name": "mutants/55/MultipleContracts/C.sol", "op": "STD", "orig": "Utils.getarray(b, address(this))", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -711,9 +663,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "60", + "id": "56", "line": 38, - "name": "mutants/60/MultipleContracts/C.sol", + "name": "mutants/56/MultipleContracts/C.sol", "op": "STD", "orig": "return c + d", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -723,9 +675,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "61", + "id": "57", "line": 38, - "name": "mutants/61/MultipleContracts/C.sol", + "name": "mutants/57/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -735,9 +687,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "62", + "id": "58", "line": 38, - "name": "mutants/62/MultipleContracts/C.sol", + "name": "mutants/58/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -747,9 +699,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "63", + "id": "59", "line": 38, - "name": "mutants/63/MultipleContracts/C.sol", + "name": "mutants/59/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -759,9 +711,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "64", + "id": "60", "line": 38, - "name": "mutants/64/MultipleContracts/C.sol", + "name": "mutants/60/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants.log b/resources/regressions/test_multiple_contracts_3.json/mutants.log index a102393f..7d9a6488 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_3.json/mutants.log @@ -19,46 +19,42 @@ 19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ 20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% 21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) -22,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 -23,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 -24,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -25,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -26,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 -27,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -31,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% -33,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) -34,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false -35,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 -36,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) -37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* -39,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ -40,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% -41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 -42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) -44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 -45,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) -46,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 -47,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* -51,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ -52,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% -53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) -54,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 -55,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 -56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -57,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -58,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 -59,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -60,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) -61,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -62,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -63,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -64,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% +22,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +23,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +24,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 +25,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) +27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% +31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) +32,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false +33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 +34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) +35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- +36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* +37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ +38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% +39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 +40,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 +41,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) +42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 +43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) +44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 +45,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 +46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ +47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- +48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* +49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ +50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% +51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) +52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +53,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +54,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 +55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) +57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +60,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol index f4904fd4..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return 0; + return res; } + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol index e702ba43..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return 1; + return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol index a4c6c970..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol @@ -25,9 +25,9 @@ contract C { return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[1] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol index 781e87b1..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol @@ -25,14 +25,14 @@ contract C { return res; } - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol index 7749a0cb..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol @@ -25,9 +25,8 @@ contract C { return res; } - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); + assert(c[0] == e); } function callmyself() external view { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol index a14e05da..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol index 4887a934..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol index 7a0c07d0..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol index d73584b8..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol index c226dcfd..5f69007a 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol @@ -3,8 +3,9 @@ pragma solidity ^0.8.13; library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(true); } function add(int8 a, int8 b) public pure returns (int8) { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol index c6022ee9..ecdc98c4 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol @@ -3,8 +3,9 @@ pragma solidity ^0.8.13; library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); + assert(false); } function add(int8 a, int8 b) public pure returns (int8) { @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol index 5f69007a..e9466e07 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.13; library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(true); + assert(c[1] == e); } function add(int8 a, int8 b) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol index ecdc98c4..f7a48737 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(false); + assert(c[0] == e); } + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol index e9466e07..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(c[1] == e); + assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a - b; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol index f7a48737..86125329 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - assert(true); + return a * b; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol index 9e5f617a..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a / b; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol index 86125329..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + return a % b; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol index e85ef12c..f9a5de25 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a + b; } } contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); + address[] memory a = new address[](0); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol index b32909ed..16f8bc88 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol @@ -7,15 +7,15 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a + b; } } contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); + address[] memory a = new address[](2); a[0] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol index f9a5de25..427647a6 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); - a[0] = msg.sender; + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` + address[] memory a = new address[](1); + assert(true); return a; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol index 16f8bc88..9db93f13 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol @@ -13,10 +13,10 @@ library Utils { } contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); - a[0] = msg.sender; + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` + address[] memory a = new address[](1); + a[1] = msg.sender; return a; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol index 427647a6..a9342ea1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol @@ -14,10 +14,10 @@ library Utils { contract C { function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` + a[0] = msg.sender; assert(true); - return a; } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol index 9db93f13..f2136ed3 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol @@ -14,14 +14,14 @@ library Utils { contract C { function foo() external view returns (address[] memory) { - /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` address[] memory a = new address[](1); - a[1] = msg.sender; + a[0] = msg.sender; return a; } + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; + uint256 a = 0; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol index a9342ea1..f69e3360 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol @@ -15,13 +15,13 @@ library Utils { contract C { function foo() external view returns (address[] memory) { address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` a[0] = msg.sender; - assert(true); + return a; } + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; + uint256 a = 11; uint256 res = a ** decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol index f2136ed3..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; - uint256 res = a ** decimals; + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a + decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol index f69e3360..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol @@ -19,10 +19,10 @@ contract C { return a; } - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; - uint256 res = a ** decimals; + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a - decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol index 13319cbe..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a + decimals; + uint256 res = a * decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol index 3279b41e..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a - decimals; + uint256 res = a / decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol index 95cc94e7..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a * decimals; + uint256 res = a % decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol index cc3476f1..5933d066 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol @@ -20,10 +20,10 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; - return res; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` + uint256 res = a ** decimals; + assert(true); } function getarray(address[] memory c, address e) public pure { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol index 4979f42e..a4c6c970 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol @@ -20,14 +20,14 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a ** decimals; return res; } + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol index 5933d066..781e87b1 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` uint256 res = a ** decimals; - assert(true); + return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol index f4904fd4..7749a0cb 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return 0; + return res; } + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(c[1] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol index e702ba43..a14e05da 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol @@ -21,9 +21,8 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return 1; + return res; } function getarray(address[] memory c, address e) public pure { @@ -31,8 +30,9 @@ contract C { } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol index a4c6c970..4887a934 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol @@ -25,9 +25,8 @@ contract C { return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + assert(true); } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol index 781e87b1..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol @@ -25,9 +25,8 @@ contract C { return res; } - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol index 7749a0cb..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol @@ -25,9 +25,8 @@ contract C { return res; } - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); + assert(c[0] == e); } function callmyself() external view { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol index a14e05da..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol index 4887a934..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/61/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/61/MultipleContracts/C.sol deleted file mode 100644 index 7a0c07d0..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/61/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c - d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/62/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/62/MultipleContracts/C.sol deleted file mode 100644 index d73584b8..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/62/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c * d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/63/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/63/MultipleContracts/C.sol deleted file mode 100644 index c226dcfd..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/63/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/64/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/64/MultipleContracts/C.sol deleted file mode 100644 index c6022ee9..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/64/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json index 4da88457..daec1385 100644 --- a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json @@ -1,35 +1,11 @@ [ - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "1", - "line": 7, - "name": "mutants/1/MultipleContracts/C.sol", - "op": "EVR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "true" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "2", - "line": 7, - "name": "mutants/2/MultipleContracts/C.sol", - "op": "EVR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, { "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "3", + "id": "1", "line": 11, - "name": "mutants/3/MultipleContracts/C.sol", + "name": "mutants/1/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -39,9 +15,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "4", + "id": "2", "line": 11, - "name": "mutants/4/MultipleContracts/C.sol", + "name": "mutants/2/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -51,9 +27,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "5", + "id": "3", "line": 11, - "name": "mutants/5/MultipleContracts/C.sol", + "name": "mutants/3/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -63,9 +39,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "6", + "id": "4", "line": 11, - "name": "mutants/6/MultipleContracts/C.sol", + "name": "mutants/4/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -75,9 +51,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "7", + "id": "5", "line": 24, - "name": "mutants/7/MultipleContracts/C.sol", + "name": "mutants/5/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -87,9 +63,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "8", + "id": "6", "line": 24, - "name": "mutants/8/MultipleContracts/C.sol", + "name": "mutants/6/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -99,9 +75,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "9", + "id": "7", "line": 24, - "name": "mutants/9/MultipleContracts/C.sol", + "name": "mutants/7/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -111,9 +87,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "10", + "id": "8", "line": 24, - "name": "mutants/10/MultipleContracts/C.sol", + "name": "mutants/8/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -123,69 +99,21 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "11", + "id": "9", "line": 24, - "name": "mutants/11/MultipleContracts/C.sol", + "name": "mutants/9/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", "repl": "%" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "12", - "line": 25, - "name": "mutants/12/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "13", - "line": 25, - "name": "mutants/13/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "14", - "line": 29, - "name": "mutants/14/MultipleContracts/C.sol", - "op": "EVR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "true" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "15", - "line": 29, - "name": "mutants/15/MultipleContracts/C.sol", - "op": "EVR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, { "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "16", + "id": "10", "line": 38, - "name": "mutants/16/MultipleContracts/C.sol", + "name": "mutants/10/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -195,9 +123,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "17", + "id": "11", "line": 38, - "name": "mutants/17/MultipleContracts/C.sol", + "name": "mutants/11/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -207,9 +135,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "18", + "id": "12", "line": 38, - "name": "mutants/18/MultipleContracts/C.sol", + "name": "mutants/12/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -219,45 +147,21 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "19", + "id": "13", "line": 38, - "name": "mutants/19/MultipleContracts/C.sol", + "name": "mutants/13/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", "repl": "%" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "20", - "line": 7, - "name": "mutants/20/MultipleContracts/C.sol", - "op": "EVR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "true" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "21", - "line": 7, - "name": "mutants/21/MultipleContracts/C.sol", - "op": "EVR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, { "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "22", + "id": "14", "line": 11, - "name": "mutants/22/MultipleContracts/C.sol", + "name": "mutants/14/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -267,9 +171,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "23", + "id": "15", "line": 11, - "name": "mutants/23/MultipleContracts/C.sol", + "name": "mutants/15/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -279,9 +183,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "24", + "id": "16", "line": 11, - "name": "mutants/24/MultipleContracts/C.sol", + "name": "mutants/16/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -291,9 +195,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "25", + "id": "17", "line": 11, - "name": "mutants/25/MultipleContracts/C.sol", + "name": "mutants/17/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -303,9 +207,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "26", + "id": "18", "line": 24, - "name": "mutants/26/MultipleContracts/C.sol", + "name": "mutants/18/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -315,9 +219,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "27", + "id": "19", "line": 24, - "name": "mutants/27/MultipleContracts/C.sol", + "name": "mutants/19/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -327,9 +231,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "28", + "id": "20", "line": 24, - "name": "mutants/28/MultipleContracts/C.sol", + "name": "mutants/20/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -339,9 +243,9 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "29", + "id": "21", "line": 24, - "name": "mutants/29/MultipleContracts/C.sol", + "name": "mutants/21/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -351,69 +255,21 @@ "col": 25, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "30", + "id": "22", "line": 24, - "name": "mutants/30/MultipleContracts/C.sol", + "name": "mutants/22/MultipleContracts/C.sol", "op": "AOR", "orig": "**", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", "repl": "%" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "31", - "line": 25, - "name": "mutants/31/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "32", - "line": 25, - "name": "mutants/32/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "33", - "line": 29, - "name": "mutants/33/MultipleContracts/C.sol", - "op": "EVR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "true" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "34", - "line": 29, - "name": "mutants/34/MultipleContracts/C.sol", - "op": "EVR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, { "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "35", + "id": "23", "line": 38, - "name": "mutants/35/MultipleContracts/C.sol", + "name": "mutants/23/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -423,9 +279,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "36", + "id": "24", "line": 38, - "name": "mutants/36/MultipleContracts/C.sol", + "name": "mutants/24/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -435,9 +291,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "37", + "id": "25", "line": 38, - "name": "mutants/37/MultipleContracts/C.sol", + "name": "mutants/25/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -447,9 +303,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "38", + "id": "26", "line": 38, - "name": "mutants/38/MultipleContracts/C.sol", + "name": "mutants/26/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants.log b/resources/regressions/test_multiple_contracts_4.json/mutants.log index b1576d09..45cc514b 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_4.json/mutants.log @@ -1,38 +1,26 @@ -1,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,true -2,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false -3,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- -4,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* -5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ -6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% -7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ -8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- -9,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* -10,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ -11,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% -12,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 -13,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 -14,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,true -15,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% -20,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,true -21,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false -22,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- -23,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* -24,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ -25,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% -26,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ -27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- -28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% -31,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 -32,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 -33,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,true -34,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% +1,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- +2,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* +3,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ +4,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% +5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ +6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- +7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* +8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ +9,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% +10,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +11,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +12,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +13,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% +14,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- +15,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* +16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ +17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% +18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ +19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- +20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* +21,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ +22,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% +23,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +24,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +25,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +26,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol index f1071c00..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { - /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(true); + assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a - b; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol index cc3476f1..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol @@ -20,9 +20,8 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a / decimals; + uint256 res = a ** decimals; return res; } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol index 4979f42e..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol @@ -20,9 +20,8 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a % decimals; + uint256 res = a ** decimals; return res; } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol index f4904fd4..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol @@ -21,9 +21,8 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return 0; + return res; } function getarray(address[] memory c, address e) public pure { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol index e702ba43..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol @@ -21,9 +21,8 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return 1; + return res; } function getarray(address[] memory c, address e) public pure { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol index 564fa8e1..9e5f617a 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a - b; } } @@ -25,9 +26,8 @@ contract C { return res; } - /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol index d4d439fa..86125329 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a * b; } } @@ -25,9 +26,8 @@ contract C { return res; } - /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol index 7a0c07d0..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a / b; } } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol index d73584b8..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol @@ -7,8 +7,9 @@ library Utils { assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a % b; } } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol index c226dcfd..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a + decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c / d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol index c6022ee9..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol @@ -20,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a - decimals; return res; } @@ -34,8 +35,7 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c % d; + return c + d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol index 87a73488..86125329 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.13; library Utils { - /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(false); + assert(c[0] == e); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a + b; + return a * b; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol index f1071c00..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol @@ -3,9 +3,8 @@ pragma solidity ^0.8.13; library Utils { - /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(true); + assert(c[0] == e); } function add(int8 a, int8 b) public pure returns (int8) { @@ -21,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a * decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol index 87a73488..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol @@ -3,9 +3,8 @@ pragma solidity ^0.8.13; library Utils { - /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) internal pure { - assert(false); + assert(c[0] == e); } function add(int8 a, int8 b) public pure returns (int8) { @@ -21,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a / decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol index 9e5f617a..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a + b; } } @@ -21,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a % decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol index 86125329..7a0c07d0 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c - d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol index e85ef12c..d73584b8 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c * d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol index b32909ed..c226dcfd 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a + b; } } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c / d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol index 13319cbe..c6022ee9 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol @@ -20,9 +20,8 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a + decimals; + uint256 res = a ** decimals; return res; } @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c % d; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/27/MultipleContracts/C.sol deleted file mode 100644 index 3279b41e..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/27/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/28/MultipleContracts/C.sol deleted file mode 100644 index 95cc94e7..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/28/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/29/MultipleContracts/C.sol deleted file mode 100644 index cc3476f1..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/29/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a / decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol index 9e5f617a..e85ef12c 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a - b; + return a / b; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/30/MultipleContracts/C.sol deleted file mode 100644 index 4979f42e..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/30/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a % decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/31/MultipleContracts/C.sol deleted file mode 100644 index f4904fd4..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/31/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` - uint256 res = a ** decimals; - return 0; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/32/MultipleContracts/C.sol deleted file mode 100644 index e702ba43..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/32/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` - uint256 res = a ** decimals; - return 1; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/33/MultipleContracts/C.sol deleted file mode 100644 index 564fa8e1..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/33/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// ExpressionValueReplacement(`c[0] == e` |==> `true`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(true); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/34/MultipleContracts/C.sol deleted file mode 100644 index d4d439fa..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/34/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// ExpressionValueReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(false); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/35/MultipleContracts/C.sol deleted file mode 100644 index 7a0c07d0..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/35/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c - d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/36/MultipleContracts/C.sol deleted file mode 100644 index d73584b8..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/36/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c * d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/37/MultipleContracts/C.sol deleted file mode 100644 index c226dcfd..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/37/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/38/MultipleContracts/C.sol deleted file mode 100644 index c6022ee9..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/38/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol index 86125329..b32909ed 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol @@ -7,9 +7,9 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a * b; + return a % b; } } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol index e85ef12c..13319cbe 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a / b; + return a + b; } } @@ -21,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a + decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol index b32909ed..3279b41e 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol @@ -7,9 +7,8 @@ library Utils { assert(c[0] == e); } - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` function add(int8 a, int8 b) public pure returns (int8) { - return a % b; + return a + b; } } @@ -21,8 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a ** decimals; + uint256 res = a - decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol index 13319cbe..95cc94e7 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a + decimals; + uint256 res = a * decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol index 3279b41e..cc3476f1 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a - decimals; + uint256 res = a / decimals; return res; } diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol index 95cc94e7..4979f42e 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol @@ -20,9 +20,9 @@ contract C { } function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` uint256 a = 10; - uint256 res = a * decimals; + uint256 res = a % decimals; return res; } diff --git a/resources/regressions/test_multiple_files_1.json/gambit_results.json b/resources/regressions/test_multiple_files_1.json/gambit_results.json index 40546083..d7eefb89 100644 --- a/resources/regressions/test_multiple_files_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_files_1.json/gambit_results.json @@ -575,37 +575,13 @@ "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", "repl": "assert(true)" }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 0;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "49", - "line": 25, - "name": "mutants/49/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 16, - "description": "ExpressionValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ return 1;\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "50", - "line": 25, - "name": "mutants/50/MultipleContracts/C.sol", - "op": "EVR", - "orig": "res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, { "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "51", + "id": "49", "line": 29, - "name": "mutants/51/MultipleContracts/C.sol", + "name": "mutants/49/MultipleContracts/C.sol", "op": "STD", "orig": "assert(c[0] == e)", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -615,9 +591,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "52", + "id": "50", "line": 29, - "name": "mutants/52/MultipleContracts/C.sol", + "name": "mutants/50/MultipleContracts/C.sol", "op": "ROR", "orig": "c[0] == e", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -627,9 +603,9 @@ "col": 18, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "53", + "id": "51", "line": 29, - "name": "mutants/53/MultipleContracts/C.sol", + "name": "mutants/51/MultipleContracts/C.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -639,9 +615,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "54", + "id": "52", "line": 34, - "name": "mutants/54/MultipleContracts/C.sol", + "name": "mutants/52/MultipleContracts/C.sol", "op": "STD", "orig": "Utils.getarray(b, address(this))", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -651,9 +627,9 @@ "col": 9, "description": "StatementDeletion", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "55", + "id": "53", "line": 38, - "name": "mutants/55/MultipleContracts/C.sol", + "name": "mutants/53/MultipleContracts/C.sol", "op": "STD", "orig": "return c + d", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -663,9 +639,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "56", + "id": "54", "line": 38, - "name": "mutants/56/MultipleContracts/C.sol", + "name": "mutants/54/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -675,9 +651,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "57", + "id": "55", "line": 38, - "name": "mutants/57/MultipleContracts/C.sol", + "name": "mutants/55/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -687,9 +663,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "58", + "id": "56", "line": 38, - "name": "mutants/58/MultipleContracts/C.sol", + "name": "mutants/56/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", @@ -699,9 +675,9 @@ "col": 18, "description": "ArithmeticOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "59", + "id": "57", "line": 38, - "name": "mutants/59/MultipleContracts/C.sol", + "name": "mutants/57/MultipleContracts/C.sol", "op": "AOR", "orig": "+", "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", diff --git a/resources/regressions/test_multiple_files_1.json/mutants.log b/resources/regressions/test_multiple_files_1.json/mutants.log index 3684a932..b493b657 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants.log +++ b/resources/regressions/test_multiple_files_1.json/mutants.log @@ -46,14 +46,12 @@ 46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ 47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% 48,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) -49,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,0 -50,EVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:16,res,1 -51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -52,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -53,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 -54,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) -56,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% +49,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +50,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false +51,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 +52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) +54,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- +55,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* +56,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ +57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol index f4904fd4..a4c6c970 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `0`) of: `return res;` uint256 res = a ** decimals; - return 0; + return res; } + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(true); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol index e702ba43..781e87b1 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol @@ -21,13 +21,13 @@ contract C { function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { uint256 a = 10; - /// ExpressionValueReplacement(`res` |==> `1`) of: `return res;` uint256 res = a ** decimals; - return 1; + return res; } + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); + assert(false); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol index a4c6c970..7749a0cb 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol @@ -25,9 +25,9 @@ contract C { return res; } - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(true); + assert(c[1] == e); } function callmyself() external view { diff --git a/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol index 781e87b1..a14e05da 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol @@ -25,14 +25,14 @@ contract C { return res; } - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(false); + assert(c[0] == e); } function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - Utils.getarray(b, address(this)); + assert(true); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol index 7749a0cb..4887a934 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol @@ -25,9 +25,8 @@ contract C { return res; } - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); + assert(c[0] == e); } function callmyself() external view { @@ -35,7 +34,8 @@ contract C { Utils.getarray(b, address(this)); } + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + assert(true); } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol index a14e05da..7a0c07d0 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol @@ -30,12 +30,12 @@ contract C { } function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` address[] memory b = this.foo(); - assert(true); + Utils.getarray(b, address(this)); } + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c + d; + return c - d; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol index 4887a934..d73584b8 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - assert(true); + return c * d; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol index 7a0c07d0..c226dcfd 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c - d; + return c / d; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol index d73584b8..c6022ee9 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol +++ b/resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol @@ -34,8 +34,8 @@ contract C { Utils.getarray(b, address(this)); } - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` function add(int8 c, int8 d) public pure returns (int8) { - return c * d; + return c % d; } } diff --git a/resources/regressions/test_multiple_files_1.json/mutants/58/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/58/MultipleContracts/C.sol deleted file mode 100644 index c226dcfd..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/58/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/59/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/59/MultipleContracts/C.sol deleted file mode 100644 index c6022ee9..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/59/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} From 9d067019fd2ddfd84c5e10bb44edd29ff7fc20ff Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 8 Aug 2023 14:24:06 -0700 Subject: [PATCH 095/200] Removed EVR from default mutations --- src/mutation.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mutation.rs b/src/mutation.rs index cf14629e..d3a5fce0 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -304,7 +304,6 @@ impl MutationType { vec![ MutationType::ArithmeticOperatorReplacement, MutationType::BitwiseOperatorReplacement, - MutationType::ExpressionValueReplacement, MutationType::ElimDelegateCall, MutationType::LiteralValueReplacement, MutationType::LogicalOperatorReplacement, From 60ab6f15fd6e30b20dac3823738234cc1e9107d5 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 10 Aug 2023 14:00:41 -0700 Subject: [PATCH 096/200] Fix some cli stuff --- aor.sol | 17 +++++++++++++++++ src/cli.rs | 10 +++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 aor.sol diff --git a/aor.sol b/aor.sol new file mode 100644 index 00000000..d44c79a0 --- /dev/null +++ b/aor.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for Arithmetic operator replacement +contract AOR { + // Expect 4 mutants: + // a - b + // a * b + // a / b + // a % b + function plus(int256 a, int256 b) public pure returns (int256) { + return a + b; + } + +} + diff --git a/src/cli.rs b/src/cli.rs index 318ac299..3e2f7531 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -179,7 +179,7 @@ pub struct MutateParams { pub solc_allow_paths: Option>, /// Solidity remappings - #[arg(long, num_args(1..), conflicts_with = "json")] + #[arg(long, hide = true, num_args(1..), conflicts_with = "json")] pub solc_remappings: Option>, /// Do not validate mutants by invoking solc @@ -210,11 +210,15 @@ pub struct GambitConfigFile { pub enum Command { Mutate(Box), // Maybe we want to do other things in the future like support checking mutants? Summary(SummaryParams), + /// Print the current Gambit version number Version, } -/// Summarize mutants generated by a Gambit run. By default, all mutant ids are -/// summarized. Use the `--mids` flag to specify a list of mids to summarize +/// Summarize mutants generated by a Gambit run. +/// +/// By default, high level statistics are reported. Use the `--mids` flag to +/// summarize a specific list of mutant ids, and use the `--all` flag to +/// summarize all mutant ids. #[derive(Debug, Clone, Parser, Deserialize, Serialize)] #[command(rename_all = "kebab-case")] pub struct SummaryParams { From 903d35496dca7726d23e1b2b5b69cae2c9cf537e Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 10 Aug 2023 16:54:00 -0700 Subject: [PATCH 097/200] Made gambit summary experimental --- src/summary.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/summary.rs b/src/summary.rs index 3b79c03e..030bc532 100644 --- a/src/summary.rs +++ b/src/summary.rs @@ -6,7 +6,7 @@ use std::{ use serde_json::Value; -use crate::SummaryParams; +use crate::{print_experimental_feature_warning, SummaryParams}; struct MutantSummaryEntry { mid: String, @@ -35,6 +35,7 @@ pub enum SummaryMode { /// /// [SummaryParams]:crate::cli::SummaryParams pub fn summarize(params: SummaryParams) -> Result<(), Box> { + print_experimental_feature_warning("gambit summary", "1.0.0"); let mutation_dir = PathBuf::from(params.mutation_directory); let gambit_results_json_path = mutation_dir.join("gambit_results.json"); let short = params.short; From eae3d5b11a5244e3274d6ab2f8bc98eaaa064a0b Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 10 Aug 2023 17:17:40 -0700 Subject: [PATCH 098/200] Updated test to match updates to mutation ops --- src/mutation.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mutation.rs b/src/mutation.rs index d3a5fce0..af72c3ae 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -1351,14 +1351,14 @@ contract A { &vec!["bool a", "bool b"], &vec!["if (a != b) {}"], &vec![MutationType::RelationalOperatorReplacement], - &vec!["true", "false"], + &vec!["true"], ); assert_exact_mutants_for_statements( &vec!["bool a", "bool b"], &vec!["if (a == b) {}"], &vec![MutationType::RelationalOperatorReplacement], - &vec!["true", "false"], + &vec!["false"], ); } From fa6c0a9f925284b1ce8d10fa5c95053ed23cf8ee Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 11 Aug 2023 12:34:17 -0700 Subject: [PATCH 099/200] Fix merge --- src/cli.rs | 4 ---- src/compile.rs | 6 ------ 2 files changed, 10 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 77b328ab..3e2f7531 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -178,10 +178,6 @@ pub struct MutateParams { #[arg(long, conflicts_with = "json")] pub solc_allow_paths: Option>, - /// Includepath argument to solc - #[arg(long)] - pub solc_include_path: Option, - /// Solidity remappings #[arg(long, hide = true, num_args(1..), conflicts_with = "json")] pub solc_remappings: Option>, diff --git a/src/compile.rs b/src/compile.rs index 36c050d0..1e337ae8 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -43,7 +43,6 @@ impl Solc { basepath: None, include_paths: vec![], allow_paths: None, - include_path: None, remappings: None, optimize: false, raw_args: None, @@ -101,11 +100,6 @@ impl Solc { self } - pub fn with_include_path(&mut self, include_path: String) -> &Self { - self.include_path = Some(include_path); - self - } - pub fn with_remappings(&mut self, remappings: Vec) -> &Self { self.remappings = Some(remappings); self From 2d9ef4b7a1252058775aa0e9d3ebc7b74e0d5baa Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 11 Aug 2023 16:50:40 -0700 Subject: [PATCH 100/200] Fixes --- src/compile.rs | 5 +++-- src/main.rs | 17 ++++++++++++++--- src/mutator.rs | 18 +++++++++--------- src/util.rs | 10 ++++++++++ 4 files changed, 36 insertions(+), 14 deletions(-) diff --git a/src/compile.rs b/src/compile.rs index 1e337ae8..0aab0952 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -1,6 +1,6 @@ use crate::{invoke_command, MutateParams}; use std::{ - error, + env, error, path::{Path, PathBuf}, }; @@ -144,8 +144,9 @@ impl Solc { .join(" "); log::debug!( - "Invoking solc on {}: `{} {}`", + "Invoking solc on {} from {}: `{} {}`", solidity_file.display(), + env::current_dir()?.display(), self.solc, pretty_flags, ); diff --git a/src/main.rs b/src/main.rs index 7ac360d5..4554d059 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,8 +3,8 @@ use std::path::{Path, PathBuf}; use clap::Parser; use gambit::{ default_gambit_output_directory, normalize_mutation_operator_name, normalize_path, - print_deprecation_warning, print_experimental_feature_warning, print_version, run_mutate, - run_summary, Command, MutateParams, + print_deprecation_warning, print_experimental_feature_warning, print_version, print_warning, + run_mutate, run_summary, Command, MutateParams, }; fn main() -> Result<(), Box> { @@ -309,6 +309,15 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box] Resolved params.import_maps: {:?}", import_maps); p.filename = Some(filepath.to_str().unwrap().to_string()); p.outdir = Some(outdir); @@ -456,6 +465,8 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box] Resolved params.import_paths: {:?}", import_paths); + let mut import_maps = vec![]; for import_map in params.import_maps.iter() { import_maps.push(import_map.clone()); @@ -468,7 +479,7 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box] Resolved params.import_paths: {:?}", import_paths); + log::debug!(" [->] Resolved params.import_maps: {:?}", import_maps); // Finally, update params with resolved source root and filename. // (We don't update earlier to preserve the state of params diff --git a/src/mutator.rs b/src/mutator.rs index 27a17fe7..c3524302 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -151,16 +151,16 @@ impl From<&MutateParams> for Mutator { } // Add any remappings to file resolver - if let Some(remappings) = &value.solc_remappings { - for rm in remappings { - let split_rm: Vec<&str> = rm.split("=").collect(); - if split_rm.len() != 2 { - panic!("Invalid remapping: {}", rm); - } - file_resolver - .add_import_map(OsString::from(split_rm[0]), PathBuf::from(split_rm[1])) - .unwrap(); + for rm in &value.import_maps { + let split_rm: Vec<&str> = rm.split("=").collect(); + if split_rm.len() != 2 { + panic!("Invalid remapping: {}", rm); } + let map = split_rm[0]; + let path = split_rm[1]; + file_resolver + .add_import_map(OsString::from(map), PathBuf::from(path)) + .expect(format!("Failed to add import_map {} -> {}", map, path).as_str()); } if let Some(allow_paths) = &value.solc_allow_paths { diff --git a/src/util.rs b/src/util.rs index d2421bb0..16fdd2d8 100644 --- a/src/util.rs +++ b/src/util.rs @@ -446,3 +446,13 @@ pub fn print_experimental_feature_warning(feature: &str, version: &str) { ); eprintln!("{}\n", italic.paint( " Future updates may alter this feature's behavior, or remove this feature entirely, without warning.")); } + +pub fn print_warning(warn: &str, message: &str) { + let yellow = ansi_term::Color::Yellow; + let bold = ansi_term::Style::new().bold(); + let message_lines = message.split('\n'); + eprintln!("{}: {}", yellow.paint("Warning"), bold.paint(warn)); + for line in message_lines { + eprintln!(" {}", line,); + } +} From ebb4c1e5688c27f8662f8b8f535ef8d906b20a16 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 16 Aug 2023 12:19:01 -0700 Subject: [PATCH 101/200] Fix cli names --- src/cli.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 3e2f7531..b594c04e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -156,12 +156,12 @@ pub struct MutateParams { pub contract: Option, /// Specify a directory to search for solidity files during import - #[arg(long = "import-path", short = 'I', conflicts_with = "json")] + #[arg(long = "import_path", short = 'I', conflicts_with = "json")] #[serde(default = "default_import_paths")] pub import_paths: Vec, /// Map directory to search for solidity files [format: map=path] - #[arg(long = "import-map", short = 'm', conflicts_with = "json")] + #[arg(long = "import_map", short = 'm', conflicts_with = "json")] #[serde(default = "default_import_paths")] pub import_maps: Vec, @@ -170,7 +170,7 @@ pub struct MutateParams { pub solc_base_path: Option, /// Deprecated: Include paths argument to solc (`--include-paths`) - #[arg(long = "solc-include-path", hide = true, conflicts_with = "json")] + #[arg(long = "solc_include_path", hide = true, conflicts_with = "json")] #[serde(default = "default_include_paths")] pub solc_include_paths: Vec, From 6fafe880e8d0eb2905046c8c35b5c408149f97db Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 28 Aug 2023 13:02:59 -0700 Subject: [PATCH 102/200] Added a mutate_function fn to mutation --- src/mutation.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/mutation.rs b/src/mutation.rs index af72c3ae..c7047e26 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -5,7 +5,7 @@ use num_traits::{One, Signed, Zero}; use serde::{Deserialize, Serialize}; use solang::{ file_resolver::FileResolver, - sema::ast::{CallTy, Expression, Namespace, RetrieveType, Statement, Type}, + sema::ast::{CallTy, Expression, Function, Namespace, RetrieveType, Statement, Type}, }; use solang_parser::pt::{CodeLocation, Loc}; use std::{ @@ -221,9 +221,12 @@ impl Debug for Mutant { /// Every kind of mutation implements this trait. A mutation can check if it /// applies to an AST node, and can mutate an AST node. pub trait Mutation { + fn mutate_function(&self, mutator: &Mutator, func: &Function) -> Vec; + fn mutate_statement(&self, mutator: &Mutator, stmt: &Statement) -> Vec; fn mutate_expression(&self, mutator: &Mutator, expr: &Expression) -> Vec; + fn mutate_expression_fallback(&self, mutator: &Mutator, expr: &Expression) -> Vec; /// Is a given mutation operator a fallback mutation? @@ -231,6 +234,12 @@ pub trait Mutation { } /// Kinds of mutations. +/// +/// Note: to add another mutation, do the following steps: +/// 1. Add a new entry to the `MutationType` enum +/// 2. Update `MutationType::to_string` w/ new mutation type +/// 3. Update `MutationType::shortname` w/ new mutation type +/// 4. Update `normalize_mutation_operator_name()` in `utils.rs` w/ new mutation type #[derive(Hash, Eq, PartialEq, Clone, Copy, Debug, ValueEnum, Deserialize, Serialize)] pub enum MutationType { ArithmeticOperatorReplacement, @@ -265,6 +274,10 @@ impl ToString for MutationType { } impl Mutation for MutationType { + fn mutate_function(&self, _mutator: &Mutator, _func: &Function) -> Vec { + vec![] + } + fn mutate_statement(&self, mutator: &Mutator, stmt: &Statement) -> Vec { let file_no = stmt.loc().file_no(); let resolver = &mutator.file_resolver; From 98aa765f31ae59366db982f61cd16e413cc09728 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 28 Aug 2023 13:56:13 -0700 Subject: [PATCH 103/200] Updated warning, added benchmark --- benchmarks/NoImportPath/contracts/C.sol | 42 +++++++++++++++++++ .../NoImportPath/contracts/Imported.sol | 9 ++++ benchmarks/NoImportPath/gambit.json | 3 ++ src/main.rs | 2 +- 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 benchmarks/NoImportPath/contracts/C.sol create mode 100644 benchmarks/NoImportPath/contracts/Imported.sol create mode 100644 benchmarks/NoImportPath/gambit.json diff --git a/benchmarks/NoImportPath/contracts/C.sol b/benchmarks/NoImportPath/contracts/C.sol new file mode 100644 index 00000000..56920d5c --- /dev/null +++ b/benchmarks/NoImportPath/contracts/C.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/benchmarks/NoImportPath/contracts/Imported.sol b/benchmarks/NoImportPath/contracts/Imported.sol new file mode 100644 index 00000000..cb8b0d75 --- /dev/null +++ b/benchmarks/NoImportPath/contracts/Imported.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +contract Imported { + function foo() public pure returns (uint256) { + return 0; + } +} diff --git a/benchmarks/NoImportPath/gambit.json b/benchmarks/NoImportPath/gambit.json new file mode 100644 index 00000000..8595c0f5 --- /dev/null +++ b/benchmarks/NoImportPath/gambit.json @@ -0,0 +1,3 @@ +{ + "filename": "contracts/C.sol" +} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 4554d059..50532e8d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -313,7 +313,7 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box Date: Mon, 28 Aug 2023 14:32:34 -0700 Subject: [PATCH 104/200] Work around to solang import resolution bug --- src/mutator.rs | 38 ++++++++++++++++++++++++++++++++++---- src/util.rs | 10 ++++++++++ 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/src/mutator.rs b/src/mutator.rs index c3524302..f5c1cece 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -1,6 +1,6 @@ use crate::{ default_gambit_output_directory, mutation::MutationType, normalize_mutation_operator_name, - Mutant, MutateParams, Mutation, Solc, + print_error, Mutant, MutateParams, Mutation, Solc, }; use clap::ValueEnum; use solang::{ @@ -158,9 +158,39 @@ impl From<&MutateParams> for Mutator { } let map = split_rm[0]; let path = split_rm[1]; - file_resolver - .add_import_map(OsString::from(map), PathBuf::from(path)) - .expect(format!("Failed to add import_map {} -> {}", map, path).as_str()); + // XXX: This is a hack to deal with a Solang bug, where mapping + // targets are canonicalized _before_ they are resolved against + // import paths. To work around this _we_ have to resolve against + // import paths! Rather than passing in a raw import target, we + // will manually resolve our target against any import paths + + let target = if let Some(target) = value + .import_paths + .iter() + .filter_map(|p| PathBuf::from(p).join(path).canonicalize().ok()) + .next() + { + target + } else { + print_error( + format!("Could not resolve remapping target {}", path).as_str(), + format!( + "Attempted to resolve {} against one of import paths [{}]", + path, + value.import_paths.join(", ") + ) + .as_str(), + ); + std::process::exit(1); + }; + + if let Err(e) = file_resolver.add_import_map(OsString::from(map), PathBuf::from(target)) + { + print_error( + format!("Failed to add import map {}={}", map, path).as_str(), + format!("Encountered error {}", e).as_str(), + ) + } } if let Some(allow_paths) = &value.solc_allow_paths { diff --git a/src/util.rs b/src/util.rs index 16fdd2d8..cd63748f 100644 --- a/src/util.rs +++ b/src/util.rs @@ -456,3 +456,13 @@ pub fn print_warning(warn: &str, message: &str) { eprintln!(" {}", line,); } } + +pub fn print_error(err: &str, message: &str) { + let red = ansi_term::Color::Red; + let bold = ansi_term::Style::new().bold(); + let message_lines = message.split('\n'); + eprintln!("{}: {}", red.paint("Error"), bold.paint(err)); + for line in message_lines { + eprintln!(" {}", line,); + } +} From d1311c69e072b687f1800676ab1967e2cd9e1ade Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 28 Aug 2023 16:16:43 -0700 Subject: [PATCH 105/200] added better error messages --- src/main.rs | 162 +++++++++++++++++++++++++++++-------------------- src/mutator.rs | 37 +++++++---- src/util.rs | 28 ++++++++- 3 files changed, 147 insertions(+), 80 deletions(-) diff --git a/src/main.rs b/src/main.rs index 50532e8d..602ad4f7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -78,7 +78,13 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box contents, + Err(e) => { + gambit::print_file_not_found_error(json_path); + Err(e)? + } + }; let json: serde_json::Value = serde_json::from_reader(json_contents.as_bytes())?; log::info!("Read configuration json: {:#?}", json); @@ -87,7 +93,11 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box) -> Result<(), Box f.clone(), + None => { + gambit::print_invalid_conf_missing_field_error("filename"); + std::process::exit(1); + } + }; let filepath = PathBuf::from(&filename); let filepath = if filepath.is_absolute() { filepath } else { let joined = config_parent_pb.join(filepath); - joined - .canonicalize() - .expect(format!("Couldn't find file at {}", joined.display()).as_str()) + match joined.canonicalize() { + Ok(p) => p, + Err(_) => { + gambit::print_file_not_found_error(joined.to_str().unwrap()); + std::process::exit(1) + } + } }; // PARAM: Outdir @@ -235,19 +255,17 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box p.to_str().unwrap().to_string(), + Err(_) => { + gambit::print_file_not_found_error( + json_parent_directory.join(ip).to_str().unwrap(), + ); + std::process::exit(1); + } + }, + ) .collect::>(); log::debug!( @@ -256,17 +274,16 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box p.to_str().unwrap().to_string(), + Err(_) => { + gambit::print_file_not_found_error( + json_parent_directory.join(&base_path).to_str().unwrap(), + ); + std::process::exit(1); + } + }; + if !import_paths.contains(&base_path) { import_paths.push(base_path); } @@ -276,17 +293,17 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box p.to_str().unwrap().to_string(), + Err(_) => { + gambit::print_file_not_found_error( + json_parent_directory.join(&include_path).to_str().unwrap(), + ); + std::process::exit(1); + } + }; + if !import_paths.contains(&include_path) { import_paths.push(include_path); } @@ -360,14 +377,22 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box f.clone(), + None => { + gambit::print_invalid_conf_missing_field_error("filename"); + std::process::exit(1); + } + }; + let filepath = match PathBuf::from(&filename).canonicalize() { + Ok(path) => path, + Err(_) => { + gambit::print_file_not_found_error(&filename); + std::process::exit(1); + } + }; if params.sourceroot.is_some() { print_deprecation_warning( @@ -415,13 +440,16 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box>(); @@ -433,12 +461,13 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box p.to_str().unwrap().to_string(), + Err(_) => { + gambit::print_file_not_found_error(base_path.as_str()); + std::process::exit(1); + } + }; if !import_paths.contains(&base_path) { import_paths.push(base_path); } @@ -452,12 +481,13 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box p.to_str().unwrap().to_string(), + Err(_) => { + gambit::print_file_not_found_error(include_path.as_str()); + std::process::exit(1); + } + }; if !import_paths.contains(&include_path) { import_paths.push(include_path); } diff --git a/src/mutator.rs b/src/mutator.rs index f5c1cece..7919bee4 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -1,6 +1,6 @@ use crate::{ default_gambit_output_directory, mutation::MutationType, normalize_mutation_operator_name, - print_error, Mutant, MutateParams, Mutation, Solc, + print_error, print_warning, Mutant, MutateParams, Mutation, Solc, }; use clap::ValueEnum; use solang::{ @@ -139,14 +139,23 @@ impl From<&MutateParams> for Mutator { // Add base path to file resolver if value.import_paths.is_empty() { - file_resolver - .add_import_path(&PathBuf::from(".")) - .expect(format!("Failed to add import path {}", ".").as_str()); + print_error( + "No import paths found", + "Tried to create a Mutator without an import path", + ); + std::process::exit(1); } else { for import_path in value.import_paths.iter() { - file_resolver - .add_import_path(&PathBuf::from(import_path)) - .expect(format!("Failed to add import path {}", import_path).as_str()); + if let Err(e) = file_resolver.add_import_path(&PathBuf::from(import_path)) { + print_warning( + "Could not add import path", + format!( + "Failed to add import path {}: encountered error {}", + import_path, e + ) + .as_str(), + ) + } } } @@ -285,10 +294,16 @@ impl Mutator { log::info!(" {} functions", ns.functions.len()); self.namespace = Some(ns.clone()); - let resolved = self - .file_resolver - .resolve_file(None, OsStr::new(filename)) - .expect(format!("Unable to resolve filename {}", filename).as_str()); + let resolved = match self.file_resolver.resolve_file(None, OsStr::new(filename)) { + Ok(resolved) => resolved, + Err(e) => { + print_error( + format!("Unable to resolve filename {}", filename).as_str(), + format!("Found error {}", e).as_str(), + ); + std::process::exit(1) + } + }; let file_path = resolved.full_path.clone(); log::info!( diff --git a/src/util.rs b/src/util.rs index cd63748f..77e5750d 100644 --- a/src/util.rs +++ b/src/util.rs @@ -460,9 +460,31 @@ pub fn print_warning(warn: &str, message: &str) { pub fn print_error(err: &str, message: &str) { let red = ansi_term::Color::Red; let bold = ansi_term::Style::new().bold(); - let message_lines = message.split('\n'); eprintln!("{}: {}", red.paint("Error"), bold.paint(err)); - for line in message_lines { - eprintln!(" {}", line,); + if !message.trim().is_empty() { + let message_lines = message.split('\n'); + for line in message_lines { + eprintln!(" {}", line,); + } } } + +pub fn print_file_not_found_error(filename: &str) { + let italic = ansi_term::Style::new().italic(); + print_error( + format!("File not found: `{}`", italic.paint(filename)).as_str(), + "", + ) +} + +pub fn print_invalid_conf_missing_field_error(field: &str) { + let italic = ansi_term::Style::new().italic(); + print_invalid_conf_error( + format!("missing field `{}`", italic.paint(field)).as_str(), + format!("All configurations must specify field `{}`", field).as_str(), + ) +} + +pub fn print_invalid_conf_error(reason: &str, msg: &str) { + print_error(format!("Invalid Configuration: {}", reason).as_str(), msg) +} From 8774fd9ee66fe61dcafd5819ea1a3cec1f80960c Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 28 Aug 2023 16:17:36 -0700 Subject: [PATCH 106/200] Added broken configuration jsons --- benchmarks/broken-config-jsons/file_not_found.json | 11 +++++++++++ .../invalid_config_missing_field_filename.json | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 benchmarks/broken-config-jsons/file_not_found.json create mode 100644 benchmarks/broken-config-jsons/invalid_config_missing_field_filename.json diff --git a/benchmarks/broken-config-jsons/file_not_found.json b/benchmarks/broken-config-jsons/file_not_found.json new file mode 100644 index 00000000..a3b51dae --- /dev/null +++ b/benchmarks/broken-config-jsons/file_not_found.json @@ -0,0 +1,11 @@ +[ + { + "filename": "I don't exist.sol", + "import_paths": [ + ".." + ], + "mutations": [ + "aor" + ] + } +] \ No newline at end of file diff --git a/benchmarks/broken-config-jsons/invalid_config_missing_field_filename.json b/benchmarks/broken-config-jsons/invalid_config_missing_field_filename.json new file mode 100644 index 00000000..e7a5ce12 --- /dev/null +++ b/benchmarks/broken-config-jsons/invalid_config_missing_field_filename.json @@ -0,0 +1,10 @@ +[ + { + "import_paths": [ + ".." + ], + "mutations": [ + "aor" + ] + } +] \ No newline at end of file From 69269b6ccaebb929ceaddb27dee91cb0d47a9c03 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 28 Aug 2023 16:21:24 -0700 Subject: [PATCH 107/200] Added regressions --- benchmarks/NoImportPath/README.md | 14 + benchmarks/config-jsons/no_import_path.json | 1 + .../no_import_path.json/gambit_results.json | 362 ++++++++++++++++++ .../no_import_path.json/mutants.log | 30 ++ .../mutants/1/contracts/C.sol | 43 +++ .../mutants/10/contracts/C.sol | 43 +++ .../mutants/11/contracts/C.sol | 43 +++ .../mutants/12/contracts/C.sol | 43 +++ .../mutants/13/contracts/C.sol | 43 +++ .../mutants/14/contracts/C.sol | 43 +++ .../mutants/15/contracts/C.sol | 43 +++ .../mutants/16/contracts/C.sol | 43 +++ .../mutants/17/contracts/C.sol | 43 +++ .../mutants/18/contracts/C.sol | 43 +++ .../mutants/19/contracts/C.sol | 43 +++ .../mutants/2/contracts/C.sol | 43 +++ .../mutants/20/contracts/C.sol | 43 +++ .../mutants/21/contracts/C.sol | 43 +++ .../mutants/22/contracts/C.sol | 43 +++ .../mutants/23/contracts/C.sol | 43 +++ .../mutants/24/contracts/C.sol | 43 +++ .../mutants/25/contracts/C.sol | 43 +++ .../mutants/26/contracts/C.sol | 43 +++ .../mutants/27/contracts/C.sol | 43 +++ .../mutants/28/contracts/C.sol | 43 +++ .../mutants/29/contracts/C.sol | 43 +++ .../mutants/3/contracts/C.sol | 43 +++ .../mutants/30/contracts/C.sol | 43 +++ .../mutants/4/contracts/C.sol | 43 +++ .../mutants/5/contracts/C.sol | 43 +++ .../mutants/6/contracts/C.sol | 43 +++ .../mutants/7/contracts/C.sol | 43 +++ .../mutants/8/contracts/C.sol | 43 +++ .../mutants/9/contracts/C.sol | 43 +++ 34 files changed, 1697 insertions(+) create mode 100644 benchmarks/NoImportPath/README.md create mode 120000 benchmarks/config-jsons/no_import_path.json create mode 100644 resources/regressions/no_import_path.json/gambit_results.json create mode 100644 resources/regressions/no_import_path.json/mutants.log create mode 100644 resources/regressions/no_import_path.json/mutants/1/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/10/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/11/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/12/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/13/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/14/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/15/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/16/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/17/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/18/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/19/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/2/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/20/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/21/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/22/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/23/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/24/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/25/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/26/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/27/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/28/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/29/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/3/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/30/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/4/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/5/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/6/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/7/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/8/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/9/contracts/C.sol diff --git a/benchmarks/NoImportPath/README.md b/benchmarks/NoImportPath/README.md new file mode 100644 index 00000000..578aa844 --- /dev/null +++ b/benchmarks/NoImportPath/README.md @@ -0,0 +1,14 @@ +# README + +This file tests the case where a configuration file doesn't have an import path. +This should print a warning: + +``` +Warning: No `import_paths` specified in config + Adding default import path /Users/benku/Gambit/benchmarks/NoImportPath. + To fix, add + "import_paths": ["/Users/benku/Gambit/benchmarks/NoImportPath"], + to benchmarks/NoImportPath/gambit.json +``` + +and generate mutants. \ No newline at end of file diff --git a/benchmarks/config-jsons/no_import_path.json b/benchmarks/config-jsons/no_import_path.json new file mode 120000 index 00000000..21809914 --- /dev/null +++ b/benchmarks/config-jsons/no_import_path.json @@ -0,0 +1 @@ +../NoImportPath/gambit.json \ No newline at end of file diff --git a/resources/regressions/no_import_path.json/gambit_results.json b/resources/regressions/no_import_path.json/gambit_results.json new file mode 100644 index 00000000..f0936fb4 --- /dev/null +++ b/resources/regressions/no_import_path.json/gambit_results.json @@ -0,0 +1,362 @@ +[ + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n import \"contracts/Imported.sol\";\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "1", + "line": 9, + "name": "mutants/1/contracts/C.sol", + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 16, + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n import \"contracts/Imported.sol\";\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "2", + "line": 9, + "name": "mutants/2/contracts/C.sol", + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "false" + }, + { + "col": 18, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n import \"contracts/Imported.sol\";\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "3", + "line": 9, + "name": "mutants/3/contracts/C.sol", + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "1" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "id": "4", + "line": 13, + "name": "mutants/4/contracts/C.sol", + "op": "STD", + "orig": "return a + b", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "id": "5", + "line": 13, + "name": "mutants/5/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "-" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "id": "6", + "line": 13, + "name": "mutants/6/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "*" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "id": "7", + "line": 13, + "name": "mutants/7/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "/" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "id": "8", + "line": 13, + "name": "mutants/8/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "%" + }, + { + "col": 44, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "9", + "line": 19, + "name": "mutants/9/contracts/C.sol", + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "0" + }, + { + "col": 44, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "10", + "line": 19, + "name": "mutants/10/contracts/C.sol", + "op": "LVR", + "orig": "1", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "2" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -16,8 +16,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "id": "11", + "line": 20, + "name": "mutants/11/contracts/C.sol", + "op": "STD", + "orig": "a[0] = msg.sender", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 11, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -16,8 +16,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", + "id": "12", + "line": 20, + "name": "mutants/12/contracts/C.sol", + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "1" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "id": "13", + "line": 21, + "name": "mutants/13/contracts/C.sol", + "op": "STD", + "orig": "return a", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 21, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "14", + "line": 25, + "name": "mutants/14/contracts/C.sol", + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "0" + }, + { + "col": 21, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "15", + "line": 25, + "name": "mutants/15/contracts/C.sol", + "op": "LVR", + "orig": "10", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "11" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "id": "16", + "line": 26, + "name": "mutants/16/contracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "+" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "17", + "line": 26, + "name": "mutants/17/contracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "-" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "18", + "line": 26, + "name": "mutants/18/contracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "*" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "19", + "line": 26, + "name": "mutants/19/contracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "/" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "20", + "line": 26, + "name": "mutants/20/contracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "%" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "21", + "line": 27, + "name": "mutants/21/contracts/C.sol", + "op": "STD", + "orig": "return res", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -27,8 +27,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "22", + "line": 31, + "name": "mutants/22/contracts/C.sol", + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 16, + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -27,8 +27,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "id": "23", + "line": 31, + "name": "mutants/23/contracts/C.sol", + "op": "ROR", + "orig": "c[0] == e", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "false" + }, + { + "col": 18, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -27,8 +27,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "id": "24", + "line": 31, + "name": "mutants/24/contracts/C.sol", + "op": "LVR", + "orig": "0", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "1" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -32,8 +32,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "id": "25", + "line": 36, + "name": "mutants/25/contracts/C.sol", + "op": "STD", + "orig": "Utils.getarray(b, address(this))", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "id": "26", + "line": 40, + "name": "mutants/26/contracts/C.sol", + "op": "STD", + "orig": "return c + d", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "27", + "line": 40, + "name": "mutants/27/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "-" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "28", + "line": 40, + "name": "mutants/28/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "*" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "29", + "line": 40, + "name": "mutants/29/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "/" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "30", + "line": 40, + "name": "mutants/30/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", + "repl": "%" + } +] \ No newline at end of file diff --git a/resources/regressions/no_import_path.json/mutants.log b/resources/regressions/no_import_path.json/mutants.log new file mode 100644 index 00000000..6f03b359 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants.log @@ -0,0 +1,30 @@ +1,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,9:9,assert(c[0] == e),assert(true) +2,ROR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,9:16,c[0] == e,false +3,LVR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,9:18,0,1 +4,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,13:9,return a + b,assert(true) +5,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,13:18,+,- +6,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,13:18,+,* +7,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,13:18,+,/ +8,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,13:18,+,% +9,LVR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,19:44,1,0 +10,LVR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,19:44,1,2 +11,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,20:9,a[0] = msg.sender,assert(true) +12,LVR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,20:11,0,1 +13,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,21:9,return a,assert(true) +14,LVR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,25:21,10,0 +15,LVR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,25:21,10,11 +16,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,26:25,**,+ +17,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,26:25,**,- +18,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,26:25,**,* +19,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,26:25,**,/ +20,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,26:25,**,% +21,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,27:9,return res,assert(true) +22,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,31:9,assert(c[0] == e),assert(true) +23,ROR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,31:16,c[0] == e,false +24,LVR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,31:18,0,1 +25,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,36:9,"Utils.getarray(b, address(this))",assert(true) +26,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,40:9,return c + d,assert(true) +27,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,40:18,+,- +28,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,40:18,+,* +29,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,40:18,+,/ +30,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,40:18,+,% diff --git a/resources/regressions/no_import_path.json/mutants/1/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/1/contracts/C.sol new file mode 100644 index 00000000..53921f1e --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/1/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) internal pure { + assert(true); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/10/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/10/contracts/C.sol new file mode 100644 index 00000000..eab6041d --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/10/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](2); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/11/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/11/contracts/C.sol new file mode 100644 index 00000000..c112a1fe --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/11/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` + address[] memory a = new address[](1); + assert(true); + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/12/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/12/contracts/C.sol new file mode 100644 index 00000000..97b84a0a --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/12/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` + address[] memory a = new address[](1); + a[1] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/13/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/13/contracts/C.sol new file mode 100644 index 00000000..8321873c --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/13/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` + a[0] = msg.sender; + assert(true); + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/14/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/14/contracts/C.sol new file mode 100644 index 00000000..60a4db1c --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/14/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 0; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/15/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/15/contracts/C.sol new file mode 100644 index 00000000..2567941a --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/15/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 11; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/16/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/16/contracts/C.sol new file mode 100644 index 00000000..3e409958 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/16/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a + decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/17/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/17/contracts/C.sol new file mode 100644 index 00000000..71f2d2c3 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/17/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/18/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/18/contracts/C.sol new file mode 100644 index 00000000..43c3a73b --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/18/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/19/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/19/contracts/C.sol new file mode 100644 index 00000000..697ef1c3 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/19/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/2/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/2/contracts/C.sol new file mode 100644 index 00000000..9b4e8ff7 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/2/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) internal pure { + assert(false); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/20/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/20/contracts/C.sol new file mode 100644 index 00000000..cdaa3314 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/20/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/21/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/21/contracts/C.sol new file mode 100644 index 00000000..ca8a4da8 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/21/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/22/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/22/contracts/C.sol new file mode 100644 index 00000000..3fe88f14 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/22/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/23/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/23/contracts/C.sol new file mode 100644 index 00000000..3767f986 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/23/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(false); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/24/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/24/contracts/C.sol new file mode 100644 index 00000000..63ab6010 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/24/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(c[1] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/25/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/25/contracts/C.sol new file mode 100644 index 00000000..165e0995 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/25/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` + address[] memory b = this.foo(); + assert(true); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/26/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/26/contracts/C.sol new file mode 100644 index 00000000..1a619f47 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/26/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + assert(true); + } +} diff --git a/resources/regressions/no_import_path.json/mutants/27/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/27/contracts/C.sol new file mode 100644 index 00000000..a68b62f4 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/27/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/28/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/28/contracts/C.sol new file mode 100644 index 00000000..e9094108 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/28/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/29/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/29/contracts/C.sol new file mode 100644 index 00000000..c884f370 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/29/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/3/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/3/contracts/C.sol new file mode 100644 index 00000000..25bd0cd8 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/3/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) internal pure { + assert(c[1] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/30/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/30/contracts/C.sol new file mode 100644 index 00000000..01a3dfdc --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/30/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/4/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/4/contracts/C.sol new file mode 100644 index 00000000..fd6e5b9c --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/4/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + assert(true); + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/5/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/5/contracts/C.sol new file mode 100644 index 00000000..d9f773c1 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/5/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a - b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/6/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/6/contracts/C.sol new file mode 100644 index 00000000..5ca3a37d --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/6/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a * b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/7/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/7/contracts/C.sol new file mode 100644 index 00000000..74e195f7 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/7/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a / b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/8/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/8/contracts/C.sol new file mode 100644 index 00000000..2c42d823 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/8/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a % b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/9/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/9/contracts/C.sol new file mode 100644 index 00000000..6f3eacdc --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/9/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](0); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} From 48b91370f1fcb56541588578a0a8c075caf79fc7 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 29 Aug 2023 20:47:41 -0700 Subject: [PATCH 108/200] Removed stray file --- aor.sol | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 aor.sol diff --git a/aor.sol b/aor.sol deleted file mode 100644 index d44c79a0..00000000 --- a/aor.sol +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >0.7.0; -pragma experimental ABIEncoderV2; - -// This contract provides test functions for Arithmetic operator replacement -contract AOR { - // Expect 4 mutants: - // a - b - // a * b - // a / b - // a % b - function plus(int256 a, int256 b) public pure returns (int256) { - return a + b; - } - -} - From 3aa784a538e3e0d182bb6c6139f2b97398be393c Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 29 Aug 2023 20:59:21 -0700 Subject: [PATCH 109/200] Prettified output --- scripts/run_regressions.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/run_regressions.sh b/scripts/run_regressions.sh index 5dd40172..fa21538d 100644 --- a/scripts/run_regressions.sh +++ b/scripts/run_regressions.sh @@ -23,7 +23,7 @@ green_check="" red_x="" # shellcheck disable=SC1091 source "$SCRIPTS/util.sh" -GAMBIT="$SCRIPTS/.." +GAMBIT="$(cd "$SCRIPTS"/.. && pwd)" GAMBIT_EXECUTABLE="$GAMBIT/target/release/gambit" CONFIGS="$GAMBIT/benchmarks/config-jsons" REGRESSIONS="$GAMBIT"/resources/regressions @@ -70,15 +70,20 @@ run_regressions() { conf=$(basename "$conf_path") regression_dir="$REGRESSIONS"/"$conf" - printf " %s \033[1mRunning:\033[0m %s\n" "$green_check" "gambit mutate --json $conf_path" + # Get relative paths for nice printing + rel_conf_path=$(python -c "import os.path; print( os.path.relpath('$conf_path', '$(pwd)'))") + rel_regression_dir=$(python -c "import os.path; print( os.path.relpath('$regression_dir', '$(pwd)'))") + + + printf " %s \033[1mRunning:\033[0m %s\n" "$green_check" "gambit mutate --json $rel_conf_path" stdout="$("$GAMBIT_EXECUTABLE" mutate --json "$conf_path")" printf " %s \033[1mGambit Output:\033[0m '\033[3m%s\033[0m'\n" "$green_check" "$stdout" if diff -q -r gambit_out "$regression_dir" 1>/dev/null; then - printf " %s \033[1mDiffed:\033[0m gambit_out and %s\n" "$green_check" "$regression_dir" + printf " %s \033[1mDiffed:\033[0m gambit_out and %s\n" "$green_check" "$rel_regression_dir" printf " %s No regressions in %s\n" "$green_check" "$conf" passed+=("$conf") else - printf " %s \033[1mDiffed:\033[0m gambit_out and %s\n" "$red_x" "$regression_dir" + printf " %s \033[1mDiffed:\033[0m gambit_out and %s\n" "$red_x" "$rel_regression_dir" diff -r gambit_out/mutants "$regression_dir"/mutants printf " %s Found a regression in \033[3m%s\033[0m\n" "$red_x" "$conf" failed+=("$conf") From d7146a055cbe5565f8c0d56b606d765ed98727aa Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 29 Aug 2023 21:07:36 -0700 Subject: [PATCH 110/200] Fixed small bug --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index 602ad4f7..c129679e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -494,6 +494,9 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box] Resolved params.import_paths: {:?}", import_paths); From cf2461097ba2f084fa600d2f2d3e05ec97de31b5 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 31 Aug 2023 16:44:31 -0700 Subject: [PATCH 111/200] Updated to point at solang PR, fixed some breakages, fixed clippy warnings --- Cargo.toml | 4 +- src/lib.rs | 2 +- src/main.rs | 22 +++---- src/mutation.rs | 147 +++++++++++++++++++++++++---------------------- src/mutator.rs | 53 ++++++----------- src/summary.rs | 14 ++--- src/test_util.rs | 4 +- src/util.rs | 89 ++++------------------------ 8 files changed, 128 insertions(+), 207 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5753bfb5..3c081946 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ authors = [ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -solang = { git = "https://github.com/hyperledger/solang.git", rev = "ffb8844f8a8f7f985a6f923156c5443e66eb6e40", default-features = false } +solang = { git = "https://github.com/hyperledger/solang.git", rev = "70af554c42748009e414e6263dd4607fb380e5dc", default-features = false } ansi_term = "0.12" clap = { version = "4.0.29", features = ["derive"] } clap_complete = "4.0.6" @@ -30,7 +30,7 @@ scanner-rust = "2.0.16" serde = { version = "1", features = ["derive"] } serde_json = "1" similar = "2" -solang-parser = { git = "https://github.com/hyperledger/solang.git", rev = "ffb8844f8a8f7f985a6f923156c5443e66eb6e40" } +solang-parser = { git = "https://github.com/hyperledger/solang.git", rev = "70af554c42748009e414e6263dd4607fb380e5dc" } strum = "0.24.1" strum_macros = "0.24.3" tempfile = "3" diff --git a/src/lib.rs b/src/lib.rs index 2b04b7e3..9010e53d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -135,7 +135,7 @@ pub fn run_mutate( // Check if we are filtering let mut solc = Solc::new(params.solc.clone(), outdir_path.clone()); - solc.with_vfs_roots_from_params(¶ms); + solc.with_vfs_roots_from_params(params); let mut validator = Validator { solc }; log::debug!("Validator: {:?}", validator); let (sampled, invalid) = if let Some(num_mutants) = params.num_mutants { diff --git a/src/main.rs b/src/main.rs index c129679e..c6827b81 100644 --- a/src/main.rs +++ b/src/main.rs @@ -153,9 +153,9 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box) -> Result<(), Box) -> Result<(), Box p.to_str().unwrap().to_string(), Err(_) => { gambit::print_file_not_found_error( - json_parent_directory.join(&base_path).to_str().unwrap(), + json_parent_directory.join(base_path).to_str().unwrap(), ); std::process::exit(1); } @@ -298,7 +298,7 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box p.to_str().unwrap().to_string(), Err(_) => { gambit::print_file_not_found_error( - json_parent_directory.join(&include_path).to_str().unwrap(), + json_parent_directory.join(include_path).to_str().unwrap(), ); std::process::exit(1); } @@ -354,9 +354,9 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box) -> Result<(), Box) -> Loc { let op = get_operator(expr); let substr = &source[start..end]; let first_op_char = op.chars().next().unwrap(); - let op_offset_in_substr = substr.chars().position(|c| c == first_op_char).expect( + let op_offset_in_substr = match substr.chars().position(|c| c == first_op_char) { + Some(x) => x, + None => { + print_error(format!("Could not find start/end to operator {:?}", op).as_str(), format!( "Error finding start/end to operator {:?} in substring {}\nExpression: {:?}\nFile: {}, Pos: {:?}", op, @@ -442,8 +454,12 @@ fn get_op_loc(expr: &Expression, source: &Arc) -> Loc { left.loc().file_no(), (start, end) ) - .as_str(), - ); + .as_str() + ); + std::process::exit(1); + } + }; + let op_start = start + (op_offset_in_substr as usize); let op_end = op_start + op.len(); left.loc().with_start(op_start).with_end(op_end) @@ -457,7 +473,7 @@ fn get_op_loc(expr: &Expression, source: &Arc) -> Loc { let substr = &source[start..end]; let first_op_char = op.chars().next().unwrap(); let op_offset_in_substr = substr.chars().position(|c| c == first_op_char).unwrap(); - let op_start = start + (op_offset_in_substr as usize); + let op_start = start + op_offset_in_substr; let op_end = op_start + op.len(); base.loc().with_start(op_start).with_end(op_end) } @@ -484,7 +500,7 @@ fn get_op_loc(expr: &Expression, source: &Arc) -> Loc { let substr = &source[start..end]; let first_op_char = op.chars().next().unwrap(); let op_offset_in_substr = substr.chars().position(|c| c == first_op_char).unwrap(); - let op_start = start + (op_offset_in_substr as usize); + let op_start = start + op_offset_in_substr; let op_end = op_start + op.len(); cond.loc().with_start(op_start).with_end(op_end) } @@ -536,10 +552,13 @@ fn arith_op_replacement( ) -> Vec { let loc = expr.loc(); let arith_op = get_operator(expr); - let rs = vec!["+", "-", "*", "/", "**", "%"]; - let mut replacements: Vec<&str> = rs.iter().filter(|x| **x != arith_op).map(|x| *x).collect(); + let mut replacements: Vec<&str> = ["+", "-", "*", "/", "**", "%"] + .iter() + .filter(|x| **x != arith_op) + .copied() + .collect(); - if let None = loc.try_file_no() { + if loc.try_file_no().is_none() { return vec![]; } match expr { @@ -550,11 +569,7 @@ fn arith_op_replacement( | Expression::Add { .. } => { if let Type::Int(_) = expr.ty() { // When we're signed, filter out `**`, which is illegal - replacements = replacements - .iter() - .filter(|x| **x != "**") - .map(|x| *x) - .collect(); + replacements.retain(|x| *x != "**"); }; let op_loc = get_op_loc(expr, contents); @@ -565,9 +580,9 @@ fn arith_op_replacement( file_resolver, namespace.clone(), op_loc, - op.clone(), + *op, arith_op.to_string(), - format!("{}", r), + r.to_string(), ) }) .collect() @@ -581,9 +596,9 @@ fn arith_op_replacement( file_resolver, namespace.clone(), op_loc, - op.clone(), + *op, arith_op.to_string(), - format!("{}", r), + r.to_string(), ) }) .collect() @@ -600,7 +615,7 @@ fn bitwise_op_replacement( source: &Arc, ) -> Vec { let loc = expr.loc(); - if let None = loc.try_file_no() { + if loc.try_file_no().is_none() { return vec![]; } match expr { @@ -610,7 +625,7 @@ fn bitwise_op_replacement( file_resolver, namespace, op_loc, - op.clone(), + *op, "|".to_string(), "&".to_string(), )] @@ -621,7 +636,7 @@ fn bitwise_op_replacement( file_resolver, namespace, op_loc, - op.clone(), + *op, "&".to_string(), "|".to_string(), )] @@ -632,7 +647,7 @@ fn bitwise_op_replacement( file_resolver, namespace, op_loc, - op.clone(), + *op, "^".to_string(), "&".to_string(), )] @@ -650,7 +665,7 @@ fn literal_value_replacement( ) -> Vec { let loc = expr.loc(); let orig = source[loc.start()..loc.end()].to_string(); - if let None = loc.try_file_no() { + if loc.try_file_no().is_none() { return vec![]; } // We are only replacing BoolLiterals, NumberLiterals, and @@ -700,7 +715,7 @@ fn literal_value_replacement( file_resolver, namespace.clone(), loc, - op.clone(), + *op, orig.clone(), r.clone(), )); @@ -716,7 +731,7 @@ fn logical_op_replacement( source: &Arc, ) -> Vec { let loc = expr.loc(); - if let None = loc.try_file_no() { + if loc.try_file_no().is_none() { return vec![]; } @@ -747,7 +762,7 @@ fn logical_op_replacement( file_resolver, namespace.clone(), loc, - op.clone(), + *op, orig.clone(), repl, ) @@ -756,7 +771,7 @@ fn logical_op_replacement( file_resolver, namespace.clone(), loc, - op.clone(), + *op, orig.clone(), r.to_string(), ), @@ -774,7 +789,7 @@ fn rel_op_replacement( source: &Arc, ) -> Vec { let loc = expr.loc(); - if let None = loc.try_file_no() { + if loc.try_file_no().is_none() { return vec![]; } @@ -834,7 +849,7 @@ fn rel_op_replacement( file_resolver, namespace.clone(), loc, - op.clone(), + *op, expr_string.to_string(), r.to_string(), ), @@ -845,7 +860,7 @@ fn rel_op_replacement( file_resolver, namespace.clone(), rel_op_loc, - op.clone(), + *op, rel_op_string.clone(), r.to_string(), ), @@ -862,7 +877,7 @@ fn shift_op_replacement( source: &Arc, ) -> Vec { let loc = expr.loc(); - if let None = loc.try_file_no() { + if loc.try_file_no().is_none() { return vec![]; } match expr { @@ -872,7 +887,7 @@ fn shift_op_replacement( file_resolver, namespace, op_loc, - op.clone(), + *op, "<<".to_string(), ">>".to_string(), )] @@ -883,7 +898,7 @@ fn shift_op_replacement( file_resolver, namespace, op_loc, - op.clone(), + *op, ">>".to_string(), "<<".to_string(), )] @@ -925,7 +940,7 @@ fn statement_deletion( file_resolver, namespace, loc, - op.clone(), + *op, orig, "assert(true)".to_string(), )], @@ -937,7 +952,7 @@ fn statement_deletion( file_resolver, namespace, loc, - op.clone(), + *op, orig, "assert(true)".to_string(), )], @@ -953,10 +968,9 @@ fn unary_op_replacement( ) -> Vec { let loc = expr.loc(); let unary_op = get_operator(expr); - let rs = vec!["-", "~"]; - let replacements: Vec<&&str> = rs.iter().filter(|x| **x != unary_op).collect(); + let replacements: Vec<&&str> = ["-", "~"].iter().filter(|x| **x != unary_op).collect(); - if let None = loc.try_file_no() { + if loc.try_file_no().is_none() { return vec![]; } let muts = match expr { @@ -969,7 +983,7 @@ fn unary_op_replacement( file_resolver, namespace.clone(), op_loc, - op.clone(), + *op, "~".to_string(), format!(" {} ", r), ) @@ -1011,10 +1025,10 @@ fn elim_delegate_mutation( let delegate_call_end = delegate_call_start + 12; vec![Mutant::new( - &file_resolver, + file_resolver, namespace, Loc::File(loc.file_no(), delegate_call_start, delegate_call_end), - op.clone(), + *op, "delegatecall".to_string(), "call".to_string(), )] @@ -1082,7 +1096,7 @@ fn expression_value_replacement( Expression::InternalFunctionCall { returns, .. } | Expression::ExternalFunctionCall { returns, .. } => match &returns[..] { - [ty] => defaults_by_type(&ty), + [ty] => defaults_by_type(ty), _ => vec![], }, @@ -1099,7 +1113,7 @@ fn expression_value_replacement( file_resolver, namespace.clone(), loc, - op.clone(), + *op, expr_string.to_string(), r.to_string(), )); @@ -1540,10 +1554,6 @@ contract A { .rand_bytes(5) .tempdir_in(source.parent().unwrap())?; let mut mutator = make_mutator(ops, &vec![], source, outdir.into_path()); - mutator - .file_resolver - .add_import_path(&PathBuf::from("/")) - .unwrap(); let sources = mutator.filenames().clone(); mutator.mutate(sources)?; @@ -1607,10 +1617,7 @@ contract A { // println!(" {}: {:?}", i + 1, &s); // } // } - mutator - .file_resolver - .add_import_path(&PathBuf::from("/")) - .unwrap(); + mutator.file_resolver.add_import_path(&PathBuf::from("/")); let sources = mutator.filenames().clone(); mutator.mutate(sources)?; @@ -1634,8 +1641,8 @@ contract A { let sources = vec![filename.to_str().unwrap().to_string()]; let solc = Solc::new("solc".into(), PathBuf::from(outdir)); - let mut cache = FileResolver::new(); - cache.add_import_path(&PathBuf::from("/")).unwrap(); + let mut cache = FileResolver::default(); + cache.add_import_path(&PathBuf::from("")); Mutator::new(conf, cache, sources, solc) } } diff --git a/src/mutator.rs b/src/mutator.rs index 7919bee4..ae9792e6 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -1,6 +1,6 @@ use crate::{ default_gambit_output_directory, mutation::MutationType, normalize_mutation_operator_name, - print_error, print_warning, Mutant, MutateParams, Mutation, Solc, + print_error, Mutant, MutateParams, Mutation, Solc, }; use clap::ValueEnum; use solang::{ @@ -135,7 +135,7 @@ impl From<&MutateParams> for Mutator { filenames.push(filename.clone()); } - let mut file_resolver = FileResolver::new(); + let mut file_resolver = FileResolver::default(); // Add base path to file resolver if value.import_paths.is_empty() { @@ -146,22 +146,13 @@ impl From<&MutateParams> for Mutator { std::process::exit(1); } else { for import_path in value.import_paths.iter() { - if let Err(e) = file_resolver.add_import_path(&PathBuf::from(import_path)) { - print_warning( - "Could not add import path", - format!( - "Failed to add import path {}: encountered error {}", - import_path, e - ) - .as_str(), - ) - } + file_resolver.add_import_path(&PathBuf::from(import_path)); } } // Add any remappings to file resolver for rm in &value.import_maps { - let split_rm: Vec<&str> = rm.split("=").collect(); + let split_rm: Vec<&str> = rm.split('=').collect(); if split_rm.len() != 2 { panic!("Invalid remapping: {}", rm); } @@ -193,27 +184,16 @@ impl From<&MutateParams> for Mutator { std::process::exit(1); }; - if let Err(e) = file_resolver.add_import_map(OsString::from(map), PathBuf::from(target)) - { - print_error( - format!("Failed to add import map {}={}", map, path).as_str(), - format!("Encountered error {}", e).as_str(), - ) - } + file_resolver.add_import_map(OsString::from(map), target); } if let Some(allow_paths) = &value.solc_allow_paths { for allow_path in allow_paths.iter() { - file_resolver - .add_import_path(&PathBuf::from(allow_path)) - .expect( - format!("Failed to add allow_path as import path: {}", allow_path).as_str(), - ) + file_resolver.add_import_path(&PathBuf::from(allow_path)); } } - let mutator = Mutator::new(conf, file_resolver, filenames, solc); - mutator + Mutator::new(conf, file_resolver, filenames, solc) } } @@ -241,11 +221,11 @@ impl Mutator { } pub fn mutation_operators(&self) -> &[MutationType] { - &self.conf.mutation_operators.as_slice() + self.conf.mutation_operators.as_slice() } pub fn fallback_mutation_operators(&self) -> &[MutationType] { - &self.conf.fallback_operators.as_slice() + self.conf.fallback_operators.as_slice() } /// Run all mutations! This is the main external entry point into mutation. @@ -265,7 +245,7 @@ impl Mutator { for filename in filenames.iter() { log::info!("Mutating file {}", filename); - match self.mutate_file(&filename) { + match self.mutate_file(filename) { Ok(file_mutants) => { log::info!(" Generated {} mutants from file", file_mutants.len()); } @@ -284,7 +264,7 @@ impl Mutator { fn mutate_file(&mut self, filename: &String) -> Result, Box> { log::info!("Parsing file {}", filename); let ns = Rc::new(parse_and_resolve( - &OsStr::new(filename), + OsStr::new(filename), &mut self.file_resolver, solang::Target::EVM, )); @@ -310,7 +290,8 @@ impl Mutator { "Resolved {} to {:?} with import path {:?}", filename, resolved, - self.file_resolver.get_import_path(resolved.get_import_no()) + self.file_resolver + .get_import_path(resolved.import_no.unwrap()) ); // mutate functions for function in ns.functions.iter() { @@ -318,7 +299,7 @@ impl Mutator { let file = ns.files.get(function.loc.file_no()); match file { Some(file) => { - if &file.path != &file_path { + if file.path != file_path { continue; } } @@ -362,7 +343,7 @@ impl Mutator { } pub fn apply_operators_to_expression(&mut self, expr: &Expression) { - if let Some(_) = expr.loc().try_file_no() { + if expr.loc().try_file_no().is_some() { let mut mutants = vec![]; for op in self.mutation_operators() { if op.is_fallback_mutation(self) { @@ -375,7 +356,7 @@ impl Mutator { } pub fn apply_fallback_operators_to_expression(&mut self, expr: &Expression) { - if let Some(_) = expr.loc().try_file_no() { + if expr.loc().try_file_no().is_some() { let mut mutants = vec![]; for op in self.fallback_mutation_operators() { mutants.append(&mut op.mutate_expression_fallback(self, expr)); @@ -385,7 +366,7 @@ impl Mutator { } pub fn apply_operators_to_statement(&mut self, stmt: &Statement) { - if let Some(_) = stmt.loc().try_file_no() { + if stmt.loc().try_file_no().is_some() { let mut mutants = vec![]; for op in self.mutation_operators() { mutants.append(&mut op.mutate_statement(self, stmt)); diff --git a/src/summary.rs b/src/summary.rs index 030bc532..f3872988 100644 --- a/src/summary.rs +++ b/src/summary.rs @@ -99,7 +99,7 @@ pub fn summarize(params: SummaryParams) -> Result<(), Box> { for (_, m) in mutant_summary_entries.iter().enumerate() { if let Some(e) = m { if mids.contains(&e.mid) { - print_mutant_summary(&m, short); + print_mutant_summary(m, short); } } } @@ -188,7 +188,7 @@ fn get_mutant_summary(i: usize, mutant_json: &Value) -> Option) { } } -fn print_statistics(summaries: &Vec>) { +fn print_statistics(summaries: &[Option]) { let mut op_freq: HashMap = HashMap::new(); let total_mutants = summaries.iter().filter(|s| s.is_some()).count(); - for summary in summaries { - if let Some(summary) = summary { - let op = summary.op_short.clone(); - op_freq.insert(op.clone(), op_freq.get(&op).unwrap_or(&0) + 1); - } + for summary in summaries.iter().flatten() { + let op = summary.op_short.clone(); + op_freq.insert(op.clone(), op_freq.get(&op).unwrap_or(&0) + 1); } for (op, freq) in op_freq.iter() { println!( diff --git a/src/test_util.rs b/src/test_util.rs index ec69cd3e..a0c50edf 100644 --- a/src/test_util.rs +++ b/src/test_util.rs @@ -5,7 +5,7 @@ use tempfile::Builder; /// optionally providing a return type pub fn wrap_and_write_solidity_to_temp_file( statements: &[&str], - params: &Vec<&str>, + params: &[&str], returns: Option<&str>, ) -> std::io::Result { // Wrap statements in a Solidity function and contract @@ -36,7 +36,7 @@ pub fn write_solidity_to_temp_file(sol: String) -> std::io::Result { } /// Wrap solidity code in a contract/function -pub fn wrap_solidity(statements: &[&str], returns: Option<&str>, params: &Vec<&str>) -> String { +pub fn wrap_solidity(statements: &[&str], returns: Option<&str>, params: &[&str]) -> String { let returns = if let Some(returns) = returns { format!("({})", returns) } else { diff --git a/src/util.rs b/src/util.rs index 77e5750d..93194387 100644 --- a/src/util.rs +++ b/src/util.rs @@ -8,7 +8,6 @@ use std::{ use ansi_term::{ANSIGenericString, Color, Style}; use solang::{file_resolver::FileResolver, sema::ast::Statement}; -static EQUAL: &str = "="; pub static DEFAULT_GAMBIT_OUTPUT_DIRECTORY: &str = "gambit_out"; pub fn default_gambit_output_directory() -> String { @@ -51,56 +50,6 @@ pub fn get_indent(line: &str) -> String { res } -/// Resolve a remapping path. -/// -/// A remapping string is of the form `@aave=path/to/aave-gho/node_modules/@aave`. -/// This is of the form `@NAME=PATH`. This function separates `PATH` from the -/// remapping string, resolves `PATH` with respect to the optional -/// `resolve_against` (defaults to '.' if `None` is provided), canonicalizes the -/// resolved path, and repackages a new canonical remapping string. -/// -/// # Arguments -/// -/// * `remap_str` - the remapping string whose path needs to be resolved -/// * `resolve_against` - an optional path that `remap_str`'s PATH will be -/// resolved against---by default (i.e., if `None` is provided), this is -/// treated as `"."` -pub fn repair_remapping(remap_str: &str, resolve_against: Option<&str>) -> String { - log::debug!( - "Repairing remap {} against path {:?}", - remap_str, - &resolve_against - ); - let against_path_str = if let Some(p) = resolve_against { - p - } else { - "." - }; - let parts: Vec<&str> = remap_str.split(EQUAL).collect(); - assert_eq!( - parts.len(), - 2, - "repair_remappings: remapping must have the shape @foo=bar/baz/blip, please check {}.", - remap_str - ); - let lhs = parts[0]; - let rhs = parts[1]; - let resolved_path = PathBuf::from(against_path_str) - .join(rhs) - .canonicalize() - .expect( - format!( - "Unable to resolve remapping target `{}` against base path `{}`", - rhs, against_path_str - ) - .as_str(), - ); - let resolved = resolved_path.to_str().unwrap(); - let result = lhs.to_owned() + EQUAL + resolved; - log::debug!("Repaired to {}", result); - result -} - type CommandOutput = (Option, Vec, Vec); /// Utility for invoking any command `cmd` with `args`. @@ -279,27 +228,6 @@ mod tests { ) } - // Note: I'm ignoring the following two tests. I've updated - // `repair_remapping` to use `fs::canonicalize()` which requires a path to - // exist. This makes writing these tests a bit trickier. - #[ignore] - #[test] - fn test_remapping1() { - let aave = "@aave=../../../Test/aave-gho/node_modules/@aave"; - let base = "."; - let res = "@aave=../../../Test/aave-gho/node_modules/@aave"; - assert_eq!(repair_remapping(aave, Some(base)), res) - } - - #[ignore] - #[test] - fn test_remapping2() { - let aave = "@aave=/Test/aave-gho/node_modules/@aave"; - let base = "/foo/bar"; - let res = "@aave=/Test/aave-gho/node_modules/@aave"; - assert_eq!(repair_remapping(aave, Some(base)), res) - } - use crate::simplify_path; use std::path::PathBuf; @@ -358,9 +286,9 @@ pub fn normalize_path(path: &Path) -> PathBuf { ret } -pub fn normalize_mutation_operator_name(op_name: &String) -> String { +pub fn normalize_mutation_operator_name(op_name: &str) -> String { let tmp = op_name.to_lowercase(); - let tmp = tmp.replace("_", "-"); + let tmp = tmp.replace('_', "-"); let op_name_lower = tmp.as_str(); match op_name_lower { "aor" | "arithmetic-operator-replacement" => "arithmetic-operator-replacement", @@ -402,11 +330,18 @@ pub fn statement_type(stmt: &Statement) -> &str { } /// Get the import path, if available, from resolver for the import_no -pub fn get_import_path(resolver: &FileResolver, import_no: usize) -> Option { - match resolver.get_import_path(import_no) { - Some(&(_, ref b)) => Some(b.clone()), +pub fn get_sol_path(resolver: &FileResolver, file: &solang::sema::ast::File) -> Option { + let import_paths = resolver.get_import_paths(); + let path = &file.path; + for import_path in import_paths.iter().filter_map(|p| match p { + (None, ip) => Some(ip), _ => None, + }) { + if let Ok(rel_path) = path.strip_prefix(import_path) { + return Some(rel_path.to_path_buf()); + } } + None } /// Print a deprecation warning to stderr From 446344f15568a90b2c289a59275d08690b25a31a Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 6 Sep 2023 15:54:35 -0700 Subject: [PATCH 112/200] Some readme fixes --- README.md | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 571063bd..ad6fd57d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Gambit is a state-of-the-art mutation system for Solidity. By applying predefined syntax transformations called _mutation operators_ (for - example, `a + b` -> `a - b`) to a Solidity program's source code, Gambit + example, convert `a + b` to `a - b`) to a Solidity program's source code, Gambit generates variants of the program called _mutants_. Mutants can be used to evaluate test suites or specs used for formal verification: each mutant represents a potential bug in the program, and @@ -12,8 +12,8 @@ Mutants can be used to evaluate test suites or specs used for formal 1. Gambit is written in Rust. You'll need to [install Rust and Cargo](https://www.rust-lang.org/tools/install) to build Gambit. -2. Gambit uses the solc, the Solidity compiler, to generate mutants. You'll need - to have solc binary that is compatable with the project you are mutating (see +2. Gambit uses `solc`, the Solidity compiler, to generate mutants. You'll need + to have a `solc` binary that is compatible with the project you are mutating (see the `--solc` option in `gambit mutate --help`) ## Installation @@ -21,7 +21,7 @@ Mutants can be used to evaluate test suites or specs used for formal You can download prebuilt Gambit binaries for Mac and Linux from our [releases](https://github.com/Certora/gambit/releases) page. -To build Gambit from source, clone this repository and run +To build Gambit from source, clone [the Gambit repository](https://github.com/Certora/gambit) and run ``` cargo install --path . @@ -41,10 +41,10 @@ Gambit has two main commands: `mutate` and `summary`. `gambit mutate` is responsible for mutating code, and `gambit summary` is a convenience command for summarizing generated mutants in a human-readable way. -Running `gambit mutate` will invoke the solidity compiler via `solc`, so make +Running `gambit mutate` will invoke `solc`, so make sure it is visible on your `PATH`. Alternatively, you can specify where Gambit can find the Solidity compiler with the option `--solc path/to/solc`, or specify a -version of solc (e.g., solc8.12) with the option `--solc solc8.12`. +`solc` binary (e.g., `solc8.12`) with the option `--solc solc8.12`. _**Note:** All tests (`cargo test`) are currently run using solc8.13. Your tests may fail if your `solc` points at a different version of the compiler._ @@ -65,7 +65,7 @@ instead: ```bash gambit mutate --json gambit_conf.json -``` +``` Run `gambit --help` for more information. @@ -78,25 +78,27 @@ In the following section we provide examples of how to run Gambit using both ## Examples -Unless otherwise noted, examples use code from `benchmarks/` and are run from -the root of this repository. +Unless otherwise noted, examples use code from [benchmarks/](https://github.com/Certora/gambit/tree/master/benchmarks) +and are run from the root of the [Gambit repository](https://github.com/Certora/gambit). -### Example 1: Mutating a Single File +### Example 1: Mutating a single file To mutate a single file, use the `--filename` option (or `-f`), followed by the file to mutate. ```bash -gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol +gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol ```
 Generated 34 mutants in 0.69 seconds
 
-_**Note:** The mutated file must located within your current working directory or +_**Note:** +The mutated file must located within your current working directory or one of its subdirectories. If you want to mutate code in an arbitrary directory, -use the `--sourceroot` option._ +use the `--sourceroot` option. +_ ### Example 2: Mutating and Downsampling @@ -417,8 +419,8 @@ passed directly to solc. All pass-through arguments are prefixed with `solc-`: | :-------------------- | :---------------------------------------------------------------------------- | | `--solc_base_path` | passes a value to solc's `--base-path` argument | | `--solc_allow_paths` | passes a value to solc's `--allow-paths` argument | -| `--solc_include_path` | passes a value to solc's `--include-path` argument | -| `--solc_remappings` | passes a value to directly to solc: this should be of the form `prefix=path`. | +| `--solc_include_path` | passes a value to solc's `--include-path` argument | +| `--solc_remappings` | passes a value to directly to solc: this should be of the form `prefix=path`. | ## Mutation Operators Gambit implements the following mutation operators From b2b0fa61eeb5791a0aa5847e0b77de276773a6fa Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 6 Sep 2023 16:48:00 -0700 Subject: [PATCH 113/200] Updated README --- README.md | 116 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 65 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index ad6fd57d..0ce381b9 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,10 @@ gambit mutate --json gambit_conf.json Run `gambit --help` for more information. -_**Note:** all relative paths specified in a JSON configuration file are interpreted -to be relative to the config file's parent directory._ +_**Note:** +All relative paths specified in a JSON configuration file are interpreted +to be relative to the configuration file's parent directory. +_ In the following section we provide examples of how to run Gambit using both `--filename` and `--json`. We provide more complete documentation in the @@ -95,12 +97,12 @@ Generated 34 mutants in 0.69 seconds _**Note:** -The mutated file must located within your current working directory or +The mutated file must be located within your current working directory or one of its subdirectories. If you want to mutate code in an arbitrary directory, use the `--sourceroot` option. _ -### Example 2: Mutating and Downsampling +### Example 2: Mutating and downsampling The above command produced 34 mutants which may be more than you need. Gambit provides a way to randomly downsample the number of mutants with the @@ -113,7 +115,7 @@ gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -n 3 Generated 3 mutants in 0.15 seconds -### Example 3: Viewing Gambit Results +### Example 3: Viewing Gambit results _**Note:** this example assumes you've just completed Example 2_ Gambit outputs all of its results in `gambit_out`: @@ -147,45 +149,45 @@ For instance, `gambit summary --mids 3 4 5` will only print info for mutant ids 3 through 5. -### Example 4: Specifying solc Pass-through Arguments -Solc may need some extra information to successfully run on a file or a project. -Gambit enables this with _pass-through arguments_ that, as the name suggests, -are passed directly through to the solc compiler. +### Example 4: Specifying solc pass-through arguments +The Solidity compiler (`solc`) may need some extra information to successfully +run on a file or a project. Gambit enables this with _pass-through arguments_ +that, as the name suggests, are passed directly through to the `solc` compiler. For projects that have complex dependencies and imports, you may need to: -* **Specify base-paths**: To specify the Solidity [--base-path][basepath] +* **Specify base paths**: To specify the Solidity [`--base-path`][basepath] argument, use `--solc_base_path`: ```bash - gambit mutate --filename path/to/file.sol --solc_base_path base/path/dir/. + gambit mutate --filename path/to/file.sol --solc_base_path base/path/dir ``` * **Specify remappings:** To indicate where Solidity should find libraries, - use solc's [import remapping][remapping] syntax with `--solc_remappings`: + use `solc`'s [import remapping][remapping] syntax with `--solc_remappings`: ```bash gambit mutate --filename path/to/file.sol \ --solc_remappings @openzepplin=node_modules/@openzeppelin @foo=node_modules/@foo ``` -* **Specify allow-paths:** To include additional allowed paths via solc's - [--allow-paths][allowed] argument, use `--solc_allow_paths`: +* **Specify allow paths:** To include additional allowed paths via `solc`'s + [`--allow-paths`][allowed] argument, use `--solc_allow_paths`: ```bash gambit mutate --filename path/to/file.sol \ - --solc_allow_paths PATH1 --solc_allow_paths PATH2 ... + --solc_allow_paths PATH1 --solc_allow_paths PATH2 ... ``` * **Specify include-path:** To make an additional source directory available - to the default import callback via solc's [--include-path][included] argument, use - `--solc_include_path`: + to the default import callback via `solc`'s [--include-path][included] argument, + use `--solc_include_path`: ```bash gambit mutate --filename path/to/file.sol --solc_include_path PATH ``` -* **Use optimization:** To run the solidity compiler with optimizations (solc's - `--optimize` argument), use `--solc_optimize`: +* **Use optimization:** To run the solidity compiler with optimizations + (`solc`'s `--optimize` argument), use `--solc_optimize`: ```bash gambit mutate --filename path/to/file.sol --solc_optimize @@ -195,22 +197,26 @@ For projects that have complex dependencies and imports, you may need to: [basepath]: https://docs.soliditylang.org/en/v0.8.17/path-resolution.html#base-path-and-include-paths [allowed]: https://docs.soliditylang.org/en/v0.8.17/path-resolution.html#allowed-paths -### Example 5: The `--sourceroot` Option -Gambit needs to track the location of sourcefiles that it mutates within a + +### Example 5: The `--sourceroot` option + +Gambit needs to track the location of source files that it mutates within a project: for instance, imagine there are files `foo/Foo.sol` and `bar/Foo.sol`. These are separate files, and their path prefixes are needed to determine this. -Gambit addresses this with the `--sourceroot` option: the sourceroot indicates +Gambit addresses this with the `--sourceroot` option: the source root indicates to Gambit the root of the files that are being mutated, and all source file -paths (both original and mutated) are reported relative to this sourceroot. +paths (both original and mutated) are reported relative to this source root. -_If Gambit encounters a source file that does not belong to the sourceroot it -will print an error message and exit._ +_**Note:** +If Gambit encounters a source file that does not belong to the source root it +will print an error message and exit. +_ _When running `gambit mutate` with the `--filename` option, -sourceroot defaults to the current working directory. +source root defaults to the current working directory. When running `gambit mutate` with the `--json` option, -sourceroot defaults to the directory containing the configuration JSON._ +source root defaults to the directory containing the configuration JSON._ Here are some examples of using the `--sourceroot` option. @@ -218,7 +224,7 @@ Here are some examples of using the `--sourceroot` option. ```bash gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -n 1 - cat gambit_out/mutants.log + cat gambit_out/mutants.log find gambit_out/mutants -name "*.sol" ``` @@ -230,17 +236,17 @@ Here are some examples of using the `--sourceroot` option. gambit_out/mutants/1/benchmarks/BinaryOpMutation/BinaryOpMutation.sol - The first command generates a single mutant, and its sourcepath is relative to `.`, - the default sourceroot. We can see that the reported paths in `mutants.log`, + The first command generates a single mutant, and its source path is relative to `.`, + the default source root. We can see that the reported paths in `mutants.log`, and the mutant file path in `gambit_out/mutants/1`, are the relative to this - sourceroot: `benchmarks/BinaryOpMutation/BinaryOpMutation.sol` - + source root: `benchmarks/BinaryOpMutation/BinaryOpMutation.sol` + 2. Suppose we want our paths to be reported relative to `benchmarks/BinaryOpMutation`. We can run ```bash gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -n 1 --sourceroot benchmarks/BinaryOpMutation - cat gambit_out/mutants.log + cat gambit_out/mutants.log find gambit_out/mutants -name "*.sol" ``` @@ -254,10 +260,10 @@ Here are some examples of using the `--sourceroot` option. The reported filenames, and the offset path inside of - `gambit_out/mutants/1/`, are now relative to the sourceroot that we + `gambit_out/mutants/1/`, are now relative to the source root that we specified. -3. Finally, suppose we use a sourceroot that doesn't contain the source file: +3. Finally, suppose we use a source root that doesn't contain the source file: ```bash gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -n 1 --sourceroot scripts @@ -267,12 +273,12 @@ Here are some examples of using the `--sourceroot` option.
-   [ERROR gambit] [!!] Illegal Configuration: Resolved filename `/Users/USER/Gambit/benchmarks/BinaryOpMutation/BinaryOpMutation.sol` is not prefixed by the derived sourceroot /Users/USER/Gambit/scripts
+   [ERROR gambit] [!!] Illegal Configuration: Resolved filename `/Users/USER/Gambit/benchmarks/BinaryOpMutation/BinaryOpMutation.sol` is not prefixed by the derived source root /Users/USER/Gambit/scripts
    
Gambit prints an error and exits. -### Example 6: Running Gambit Through a Configuration File +### Example 6: Running Gambit using a configuration file To run gambit with a configuration file, use the `--json` argument: ```bash @@ -297,16 +303,19 @@ mutants that you want to apply, the specific functions you wish to mutate, and more. See the [`benchmark/config-jsons` directory][config-examples] for examples. -_**Note:** Any paths provided by the configuration file are resolved relative to -the configuration file's parent directory._ +_**Note:** +Any paths provided by the configuration file are resolved relative to the +configuration file's parent directory. +_ + ## Configuration Files Configuration files allow you to save complex configurations and perform multiple mutations at once. Gambit uses a simple JSON object format to store mutation options, where each `--option VALUE` specified on the CLI is represented as a `"option": VALUE` key/value pair in the JSON object. Boolean `--flag`s are enabled by storing them as true: `"flag": true`. For instance, -`--no_overwrite` would be written as `"no_overwrite": true"`. +`--no_overwrite` would be written as `"no_overwrite": true`. As an example, consider the command from Example 1: @@ -361,6 +370,8 @@ directory of the configuration file_. So if the JSON file listed above was moved to the `benchmarks/` directory the `"filename"` would need to be updated to `BinaryOpMutation/BinaryOpMutation.sol`. + + ## Results Directory `gambit mutate` produces all results in an output directory (default: @@ -395,6 +406,7 @@ This has the following structure: + `mutants.log`: a log file with all mutant information. This is similar to `results.json` but in a different format and with different information + ## CLI Options `gambit mutate` supports the following options; for a comprehensive list, run @@ -406,21 +418,23 @@ This has the following structure: | `-o`, `--outdir` | specify Gambit's output directory (defaults to `gambit_out`) | | `--no_overwrite` | do not overwrite an output directory; if the output directory exists, print an error and exit | | `-n`, `--num_mutants` | randomly downsample to a given number of mutants. | -| `-s`, `--seed` | specify a random seed. For reproducability, Gambit defaults to using the seed `0`. To randomize the seed use `--random-seed` | -| `--random_seed` | use a random seed. Note this overrides any value specified by `--seed` | +| `-s`, `--seed` | specify a random seed. For reproducibility, Gambit defaults to using the seed `0`. To randomize the seed use `--random_seed` | +| `--random_seed` | use a random seed. Note that this overrides any value specified by `--seed` | | `--contract` | specify a specific contract name to mutate; by default mutate all contracts | | `--functions` | specify one or more functions to mutate; by default mutate all functions | | `--mutations` | specify one or more mutation operators to use; only generates mutants that are created using the specified operators | +| `--skip_validate` | only generate mutants without validating them by compilation | Gambit also supports _pass-through arguments_, which are arguments that are -passed directly to solc. All pass-through arguments are prefixed with `solc-`: +passed directly to the solidity compiler. All pass-through arguments are +prefixed with `solc_`: -| Option | Description | -| :-------------------- | :---------------------------------------------------------------------------- | -| `--solc_base_path` | passes a value to solc's `--base-path` argument | -| `--solc_allow_paths` | passes a value to solc's `--allow-paths` argument | -| `--solc_include_path` | passes a value to solc's `--include-path` argument | -| `--solc_remappings` | passes a value to directly to solc: this should be of the form `prefix=path`. | +| Option | Description | +| :-------------------- | :------------------------------------------------------------------------------ | +| `--solc_base_path` | passes a value to `solc`'s `--base-path` argument | +| `--solc_include_path` | passes a value to `solc`'s `--include-path` argument | +| `--solc_remappings` | passes a value to directly to `solc`: this should be of the form `prefix=path`. | +| `--solc_allow_paths` | passes a value to `solc`'s `--allow-paths` argument | ## Mutation Operators Gambit implements the following mutation operators @@ -430,8 +444,8 @@ Gambit implements the following mutation operators | **binary-op-mutation** | Replace a binary operator with another | `a+b` -> `a-b` | | **unary-operator-mutation** | Replace a unary operator with another | `~a` -> `-a` | | **require-mutation** | Alter the condition of a `require` statement | `require(some_condition())` -> `require(true)` | -| **assignment-mutation** | Replaces the rhs of a mutation | `x = foo();` -> `x = -1;` | -| **delete-expression-mutation** | Replace an expression statement with `assert(true)` | `foo();` -> `assert(true);` | +| **assignment-mutation** | Replaces the right hand side of an assignment | `x = foo();` -> `x = -1;` | +| **delete-expression-mutation** | Replaces an expression with a no-op (`assert(true)`) | `foo();` -> `assert(true);` | | **if-cond-mutation** | Mutate the conditional of an `if` statement | `if (C) {...}` -> `if (true) {...}` | | **swap-arguments-operator-mutation** | Swap the order of non-commutative operators | `a - b` -> `b - a` | | **elim-delegate-mutation** | Change a `delegatecall()` to a `call()` | `_c.delegatecall(...)` -> `_c.call(...)` | From 9acc90e804845cf4bebab65dad3ed832c9a98f70 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 6 Sep 2023 18:20:28 -0700 Subject: [PATCH 114/200] Updated readme --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0ce381b9..6c429837 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,10 @@ sure it is visible on your `PATH`. Alternatively, you can specify where Gambit c find the Solidity compiler with the option `--solc path/to/solc`, or specify a `solc` binary (e.g., `solc8.12`) with the option `--solc solc8.12`. -_**Note:** All tests (`cargo test`) are currently run using solc8.13. Your tests may fail if your `solc` points at - a different version of the compiler._ +_**Note:** +All tests (`cargo test`) are currently run using solc8.13. Your tests may fail if your `solc` points at + a different version of the compiler. + _ ### Running `gambit mutate` @@ -116,7 +118,9 @@ Generated 3 mutants in 0.15 seconds ### Example 3: Viewing Gambit results -_**Note:** this example assumes you've just completed Example 2_ +_**Note:** +This example assumes you've just completed Example 2. +_ Gambit outputs all of its results in `gambit_out`: @@ -371,7 +375,6 @@ to the `benchmarks/` directory the `"filename"` would need to be updated to `BinaryOpMutation/BinaryOpMutation.sol`. - ## Results Directory `gambit mutate` produces all results in an output directory (default: From 06638e571c7a175d433237033375469e37abfdd8 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 6 Sep 2023 18:24:41 -0700 Subject: [PATCH 115/200] Added a script to generate rtd docs --- scripts/generate_rtd_markdown.py | 107 +++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 scripts/generate_rtd_markdown.py diff --git a/scripts/generate_rtd_markdown.py b/scripts/generate_rtd_markdown.py new file mode 100644 index 00000000..ef8b2ab9 --- /dev/null +++ b/scripts/generate_rtd_markdown.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python3 + +""" +Generate RTD version of the Gambit README +""" + +from argparse import ArgumentParser +from typing import Optional +import re +import hashlib + + +def line_is_anchor(line: str) -> bool: + return line.startswith("") + '(test-anchor)=' + >>> get_anchor("# README") + """ + + if not line.startswith("")].strip() + return anchor + + +def translate(readme_file_path: str) -> str: + with open(readme_file_path) as f: + original = f.read() + lines = original.split("\n") + lines2 = [] + + note_start = -1 # Track if we've started a note + for i, line in enumerate(lines): + anchor = get_anchor(line) + if anchor is not None: + lines2.append(anchor) + elif "_**note:**" == line.strip().lower(): + if note_start > -1: + raise RuntimeError( + f"Already in note from line {note_start + 1}, cannot start new note on line {i+1}" + ) + note_start = i + lines2.append("```{note}") + elif "_**note:**" in line.strip().lower(): + raise RuntimeError( + f"Illegal note start on line {i+1}: new note tags '_**Note:**' and their closing '_' must be on their own lines" + ) + + elif note_start > -1 and line.strip() == "_": + note_start = -1 + lines2.append("```") + else: + # replace internal links + l = replace_internal_references(line) + lines2.append(l.strip("\n")) + signature = hashlib.md5(original.encode()).hexdigest() + lines2.append(f"") + return "\n".join(lines2) + "\n" + + +def main(): + parser = ArgumentParser() + parser.add_argument("readme_file", help="README.md file to translate to RTD") + parser.add_argument("--output", "-o", default="gambit.md", help="output file") + + args = parser.parse_args() + rtd = translate(args.readme_file) + with open(args.output, "w+") as f: + print("Writing to", args.output) + f.write(rtd) + + +if __name__ == "__main__": + main() From 53f162717af02fbb8b0cc9ca9f628ed6f3f3065a Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 7 Sep 2023 15:38:48 -0700 Subject: [PATCH 116/200] Updated CI --- .github/workflows/gambit.yml | 24 +++++++++++++++++++++++- .gitignore | 3 +++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gambit.yml b/.github/workflows/gambit.yml index 5d058207..ad4833d2 100644 --- a/.github/workflows/gambit.yml +++ b/.github/workflows/gambit.yml @@ -130,4 +130,26 @@ jobs: else gh release upload $TAG gambit-linux-$TAG/gambit-linux-$TAG gh release upload $TAG gambit-macos-$TAG/gambit-macos-$TAG - fi \ No newline at end of file + fi + +name: Check RTD Docs + +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Check that RTD Docs are Up To Date + run: python3 scripts/check_rtd_docs_up_to_date.py + + - name: Check Exit Code + run: | + if [[ $? -ne 0 ]]; then + echo "Error: documentation is not synced" + exit 1 + fi + diff --git a/.gitignore b/.gitignore index 0bfcc3a0..5463df2f 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ Cargo.lock # vscode .vscode/ + +# python +**/__pycache__/ From 5d40c544f3f2ab15a7b6934b14d58eceeced3486 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 7 Sep 2023 15:41:16 -0700 Subject: [PATCH 117/200] Updated README and added scripts for synching w/ RTD --- README.md | 154 ++++++++++++++++++++++++++- scripts/check_rtd_docs_up_to_date.py | 83 +++++++++++++++ scripts/generate_rtd_markdown.py | 59 +++++++++- 3 files changed, 290 insertions(+), 6 deletions(-) create mode 100644 scripts/check_rtd_docs_up_to_date.py diff --git a/README.md b/README.md index 6c429837..7e82fe1d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,149 @@ # Gambit: Mutant Generation for Solidity + + + + + + + + Gambit is a state-of-the-art mutation system for Solidity. By applying predefined syntax transformations called _mutation operators_ (for example, convert `a + b` to `a - b`) to a Solidity program's source code, Gambit @@ -47,9 +191,9 @@ find the Solidity compiler with the option `--solc path/to/solc`, or specify a `solc` binary (e.g., `solc8.12`) with the option `--solc solc8.12`. _**Note:** -All tests (`cargo test`) are currently run using solc8.13. Your tests may fail if your `solc` points at - a different version of the compiler. - _ +All tests (`cargo test`) are currently run using `solc8.13`. Your tests may fail + if your `solc` points at a different version of the compiler. +_ ### Running `gambit mutate` @@ -153,7 +297,7 @@ For instance, `gambit summary --mids 3 4 5` will only print info for mutant ids 3 through 5. -### Example 4: Specifying solc pass-through arguments +### Example 4: Specifying `solc` pass-through arguments The Solidity compiler (`solc`) may need some extra information to successfully run on a file or a project. Gambit enables this with _pass-through arguments_ that, as the name suggests, are passed directly through to the `solc` compiler. @@ -457,6 +601,7 @@ Gambit implements the following mutation operators For more details on each mutation type, refer to the [full documentation](https://docs.certora.com/en/latest/docs/gambit/gambit.html#mutation-types). + ## Contact If you have ideas for interesting mutations or other features, we encourage you to make a PR or [email](mailto:chandra@certora.com) us. @@ -467,6 +612,7 @@ We thank [Vishal Canumalla](https://homes.cs.washington.edu/~vishalc/) for their excellent contributions to an earlier prototype of Gambit. + [config-examples]: https://github.com/Certora/gambit/blob/master/benchmarks/config-jsons/ [test6]: https://github.com/Certora/gambit/blob/master/benchmarks/config-jsons/test6.json diff --git a/scripts/check_rtd_docs_up_to_date.py b/scripts/check_rtd_docs_up_to_date.py new file mode 100644 index 00000000..0f15236b --- /dev/null +++ b/scripts/check_rtd_docs_up_to_date.py @@ -0,0 +1,83 @@ +#!/usr/bin/env python3 + +from argparse import ArgumentParser +from urllib.request import urlopen +import difflib +import hashlib +import os +import sys +import re +from generate_rtd_markdown import translate_readme_to_rtd + +OUR_README_PATH = os.path.join(os.path.dirname(__file__), "..", "README.md") + +THEIR_README_URL_NO_BRANCH = ( + "https://raw.githubusercontent.com/Certora/Documentation/{}/docs/gambit/gambit.md" +) + + +def main(): + parser = ArgumentParser() + parser.add_argument( + "--branch", default="master", help="Branch to check README from" + ) + args = parser.parse_args() + + exit_code = check_rtd_docs_up_to_date(branch=args.branch) + + sys.exit(exit_code) + + +def find_signature(contents: str) -> str: + pattern = r"" + m = re.search(pattern, contents) + if m is None: + return None + return m.group(1) + + +def check_rtd_docs_up_to_date(branch="master") -> int: + url = THEIR_README_URL_NO_BRANCH.format(branch) + + with open(OUR_README_PATH) as f: + our_readme_contents = f.read() + + our_md5 = hashlib.md5(our_readme_contents.encode()).hexdigest() + + try: + their_readme_contents = urlopen(url).read() + their_md5 = find_signature(their_readme_contents.decode("utf-8")) + + except RuntimeError as e: + print(f"Could not read `gambit.md` from {url}") + print(f"Error: {e}") + return 127 + + print("local md5: ", our_md5) + print("remote md5:", their_md5) + print() + if our_md5 == their_md5: + print(f"MD5 Hashes Match: Documentation is synced") + return 0 + else: + print(f"MD5 Hashes Do Not Match!") + print() + our_translated_readme_contents = translate_readme_to_rtd(OUR_README_PATH) + print("Unified diff: Local vs Remote") + print("=============================") + print() + print( + "".join( + difflib.unified_diff( + our_translated_readme_contents.splitlines(keepends=True), + str(their_readme_contents.decode("utf-8")).splitlines( + keepends=True + ), + ) + ) + ) + return 1 + + +if __name__ == "__main__": + main() diff --git a/scripts/generate_rtd_markdown.py b/scripts/generate_rtd_markdown.py index ef8b2ab9..4cf069fe 100644 --- a/scripts/generate_rtd_markdown.py +++ b/scripts/generate_rtd_markdown.py @@ -56,14 +56,42 @@ def get_anchor(line: str) -> Optional[str]: return anchor -def translate(readme_file_path: str) -> str: +def is_suppress(line: str) -> bool: + return "" == line.upper().replace(" ", "").strip() + + +def is_end_suppress(line: str) -> bool: + return "" == line.upper().replace(" ", "").strip() + + +def is_emit(line: str) -> bool: + return "" and emit_start > -1: + emit_start = -1 + + # Handle escaped comments from inside of an emit + elif is_escaped_open_comment(line) and emit_start > -1: + lines2.append("") + + elif is_suppress(line): + if suppress_start > 0: + raise RuntimeError( + f"Cannot start a new suppression on line {i+1}: already in a suppression tag started at line {suppress_start+1}" + ) + suppress_start = i + elif is_end_suppress(line): + raise RuntimeError( + f"Illegal end suppress on line {i+1}: not currently in a suppress" + ) else: # replace internal links l = replace_internal_references(line) @@ -97,7 +152,7 @@ def main(): parser.add_argument("--output", "-o", default="gambit.md", help="output file") args = parser.parse_args() - rtd = translate(args.readme_file) + rtd = translate_readme_to_rtd(args.readme_file) with open(args.output, "w+") as f: print("Writing to", args.output) f.write(rtd) From dec736d3842e554631e10b326668a203f543a2f4 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 7 Sep 2023 15:44:32 -0700 Subject: [PATCH 118/200] Fix ci --- .github/workflows/gambit.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/gambit.yml b/.github/workflows/gambit.yml index ad4833d2..8dc69c49 100644 --- a/.github/workflows/gambit.yml +++ b/.github/workflows/gambit.yml @@ -132,12 +132,7 @@ jobs: gh release upload $TAG gambit-macos-$TAG/gambit-macos-$TAG fi -name: Check RTD Docs - -on: [push] - -jobs: - test: + check-docs: runs-on: ubuntu-latest steps: - name: Checkout code From fffccee5044b1e0caf5f0b5e0519a1fbf567f59c Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 7 Sep 2023 15:46:36 -0700 Subject: [PATCH 119/200] Testing c --- .github/workflows/gambit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gambit.yml b/.github/workflows/gambit.yml index 8dc69c49..f508e6ce 100644 --- a/.github/workflows/gambit.yml +++ b/.github/workflows/gambit.yml @@ -139,7 +139,7 @@ jobs: uses: actions/checkout@v2 - name: Check that RTD Docs are Up To Date - run: python3 scripts/check_rtd_docs_up_to_date.py + run: python3 scripts/check_rtd_docs_up_to_date.py --branch bkushigian/fix_gambit_readme - name: Check Exit Code run: | From a17fe2751c971d6f382057b656bc41a2b1dbd4c9 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 7 Sep 2023 16:30:03 -0700 Subject: [PATCH 120/200] Updated CI to point documentation checking to master --- .github/workflows/gambit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gambit.yml b/.github/workflows/gambit.yml index f508e6ce..8dc69c49 100644 --- a/.github/workflows/gambit.yml +++ b/.github/workflows/gambit.yml @@ -139,7 +139,7 @@ jobs: uses: actions/checkout@v2 - name: Check that RTD Docs are Up To Date - run: python3 scripts/check_rtd_docs_up_to_date.py --branch bkushigian/fix_gambit_readme + run: python3 scripts/check_rtd_docs_up_to_date.py - name: Check Exit Code run: | From 6273b8950d2cb1a5981177b15c5cbf821157edf2 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 8 Sep 2023 12:13:54 -0700 Subject: [PATCH 121/200] Moved warnings to above header --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 5b82e3a4..76f09ebb 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -# Gambit: Mutant Generation for Solidity - +# Gambit: Mutant Generation for Solidity Gambit is a state-of-the-art mutation system for Solidity. By applying predefined syntax transformations called _mutation operators_ (for From 3d77a535d68277c8acc9869166edf39293283594 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 8 Sep 2023 15:28:26 -0700 Subject: [PATCH 122/200] Fix bug --- src/main.rs | 18 +++++++++++++++--- src/mutator.rs | 30 +++++++++++++++--------------- src/util.rs | 3 +-- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/src/main.rs b/src/main.rs index c6827b81..5f249f50 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,8 +3,8 @@ use std::path::{Path, PathBuf}; use clap::Parser; use gambit::{ default_gambit_output_directory, normalize_mutation_operator_name, normalize_path, - print_deprecation_warning, print_experimental_feature_warning, print_version, print_warning, - run_mutate, run_summary, Command, MutateParams, + print_deprecation_warning, print_error, print_experimental_feature_warning, print_version, + print_warning, run_mutate, run_summary, Command, MutateParams, }; fn main() -> Result<(), Box> { @@ -495,7 +495,19 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box] Resolved params.import_paths: {:?}", import_paths); diff --git a/src/mutator.rs b/src/mutator.rs index ae9792e6..653aaf79 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -107,30 +107,30 @@ impl std::fmt::Debug for Mutator { } impl From<&MutateParams> for Mutator { - fn from(value: &MutateParams) -> Self { - let conf = MutatorConf::from(value); + fn from(params: &MutateParams) -> Self { + let conf = MutatorConf::from(params); let mut solc = Solc::new( - value.solc.clone(), - value + params.solc.clone(), + params .outdir .clone() .unwrap_or(default_gambit_output_directory()) .into(), ); - solc.with_optimize(value.solc_optimize); + solc.with_optimize(params.solc_optimize); - if let Some(basepath) = value.solc_base_path.clone() { + if let Some(basepath) = params.solc_base_path.clone() { solc.with_basepath(basepath); } - if let Some(allowpaths) = value.solc_allow_paths.clone() { + if let Some(allowpaths) = params.solc_allow_paths.clone() { solc.with_allow_paths(allowpaths); } - if let Some(remappings) = value.solc_remappings.clone() { + if let Some(remappings) = params.solc_remappings.clone() { solc.with_remappings(remappings); } let mut filenames: Vec = vec![]; - if let Some(filename) = &value.filename { + if let Some(filename) = ¶ms.filename { log::info!("Creating Source from filename: {}", filename); filenames.push(filename.clone()); } @@ -138,20 +138,20 @@ impl From<&MutateParams> for Mutator { let mut file_resolver = FileResolver::default(); // Add base path to file resolver - if value.import_paths.is_empty() { + if params.import_paths.is_empty() { print_error( "No import paths found", "Tried to create a Mutator without an import path", ); std::process::exit(1); } else { - for import_path in value.import_paths.iter() { + for import_path in params.import_paths.iter() { file_resolver.add_import_path(&PathBuf::from(import_path)); } } // Add any remappings to file resolver - for rm in &value.import_maps { + for rm in ¶ms.import_maps { let split_rm: Vec<&str> = rm.split('=').collect(); if split_rm.len() != 2 { panic!("Invalid remapping: {}", rm); @@ -164,7 +164,7 @@ impl From<&MutateParams> for Mutator { // import paths! Rather than passing in a raw import target, we // will manually resolve our target against any import paths - let target = if let Some(target) = value + let target = if let Some(target) = params .import_paths .iter() .filter_map(|p| PathBuf::from(p).join(path).canonicalize().ok()) @@ -177,7 +177,7 @@ impl From<&MutateParams> for Mutator { format!( "Attempted to resolve {} against one of import paths [{}]", path, - value.import_paths.join(", ") + params.import_paths.join(", ") ) .as_str(), ); @@ -187,7 +187,7 @@ impl From<&MutateParams> for Mutator { file_resolver.add_import_map(OsString::from(map), target); } - if let Some(allow_paths) = &value.solc_allow_paths { + if let Some(allow_paths) = ¶ms.solc_allow_paths { for allow_path in allow_paths.iter() { file_resolver.add_import_path(&PathBuf::from(allow_path)); } diff --git a/src/util.rs b/src/util.rs index 93194387..eee06c31 100644 --- a/src/util.rs +++ b/src/util.rs @@ -329,12 +329,11 @@ pub fn statement_type(stmt: &Statement) -> &str { } } -/// Get the import path, if available, from resolver for the import_no pub fn get_sol_path(resolver: &FileResolver, file: &solang::sema::ast::File) -> Option { let import_paths = resolver.get_import_paths(); let path = &file.path; for import_path in import_paths.iter().filter_map(|p| match p { - (None, ip) => Some(ip), + (None, ip) => ip.canonicalize().ok(), _ => None, }) { if let Ok(rel_path) = path.strip_prefix(import_path) { From e20501421806a2bd47dbf3d4ac084b32076c227d Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 8 Sep 2023 15:41:42 -0700 Subject: [PATCH 123/200] Updated: changed to compare actual contents, no checksum --- scripts/check_rtd_docs_up_to_date.py | 26 +++++--------------------- scripts/generate_rtd_markdown.py | 3 --- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/scripts/check_rtd_docs_up_to_date.py b/scripts/check_rtd_docs_up_to_date.py index 0f15236b..d209743a 100644 --- a/scripts/check_rtd_docs_up_to_date.py +++ b/scripts/check_rtd_docs_up_to_date.py @@ -3,7 +3,6 @@ from argparse import ArgumentParser from urllib.request import urlopen import difflib -import hashlib import os import sys import re @@ -28,39 +27,26 @@ def main(): sys.exit(exit_code) -def find_signature(contents: str) -> str: - pattern = r"" - m = re.search(pattern, contents) - if m is None: - return None - return m.group(1) - - def check_rtd_docs_up_to_date(branch="master") -> int: url = THEIR_README_URL_NO_BRANCH.format(branch) with open(OUR_README_PATH) as f: our_readme_contents = f.read() - our_md5 = hashlib.md5(our_readme_contents.encode()).hexdigest() - try: - their_readme_contents = urlopen(url).read() - their_md5 = find_signature(their_readme_contents.decode("utf-8")) + their_readme_contents = urlopen(url).read().decode("utf-8") except RuntimeError as e: print(f"Could not read `gambit.md` from {url}") print(f"Error: {e}") return 127 - print("local md5: ", our_md5) - print("remote md5:", their_md5) print() - if our_md5 == their_md5: - print(f"MD5 Hashes Match: Documentation is synced") + if our_readme_contents == their_readme_contents: + print(f"Docs are in sync!") return 0 else: - print(f"MD5 Hashes Do Not Match!") + print(f"Docs are out of sync!") print() our_translated_readme_contents = translate_readme_to_rtd(OUR_README_PATH) print("Unified diff: Local vs Remote") @@ -70,9 +56,7 @@ def check_rtd_docs_up_to_date(branch="master") -> int: "".join( difflib.unified_diff( our_translated_readme_contents.splitlines(keepends=True), - str(their_readme_contents.decode("utf-8")).splitlines( - keepends=True - ), + their_readme_contents.splitlines(keepends=True), ) ) ) diff --git a/scripts/generate_rtd_markdown.py b/scripts/generate_rtd_markdown.py index 4cf069fe..aaec4db3 100644 --- a/scripts/generate_rtd_markdown.py +++ b/scripts/generate_rtd_markdown.py @@ -7,7 +7,6 @@ from argparse import ArgumentParser from typing import Optional import re -import hashlib def line_is_anchor(line: str) -> bool: @@ -141,8 +140,6 @@ def translate_readme_to_rtd(readme_file_path: str) -> str: # replace internal links l = replace_internal_references(line) lines2.append(l.strip("\n")) - signature = hashlib.md5(original.encode()).hexdigest() - lines2.append(f"") return "\n".join(lines2) + "\n" From 768e2453d64660059fdfec194db7ae6ab8800be2 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 8 Sep 2023 15:41:52 -0700 Subject: [PATCH 124/200] Updated README --- README.md | 186 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 140 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 76f09ebb..30bbf34e 100644 --- a/README.md +++ b/README.md @@ -136,28 +136,30 @@ <\!-- WARNING: AUTO_GENERATED DOCUMENTATION - The following documentation is automatlically generated from the Gambit + The following documentation is automatically generated from the Gambit README.md located at https://github.com/Certora/Gambit/README.md. Please view this document for instructions on producing this file. --\> --> # Gambit: Mutant Generation for Solidity -Gambit is a state-of-the-art mutation system for Solidity. -By applying predefined syntax transformations called _mutation operators_ (for - example, convert `a + b` to `a - b`) to a Solidity program's source code, Gambit - generates variants of the program called _mutants_. -Mutants can be used to evaluate test suites or specs used for formal - verification: each mutant represents a potential bug in the program, and - stronger test suites and specifications should detect more mutants. +Gambit is a state-of-the-art mutant generation system for Solidity. By applying +predefined syntax transformations called _mutation operators_ (for example, +convert `a + b` to `a - b`) to a Solidity program's source code, Gambit +generates variants of the program called _mutants_. +Mutants are used to evaluate a test suite or a specification: each mutant +represents a potential bug in the program, and stronger test suites and +specifications should detect more mutants as faulty. ## Requirements 1. Gambit is written in Rust. You'll need to [install Rust and Cargo](https://www.rust-lang.org/tools/install) to build Gambit. -2. Gambit uses `solc`, the Solidity compiler, to generate mutants. You'll need - to have a `solc` binary that is compatible with the project you are mutating (see - the `--solc` option in `gambit mutate --help`) +2. Gambit uses the `solc` Solidity compiler to validate generated mutants. By + default Gambit looks for `solc` on `$PATH`. Users can specify a particular + `solc` executable with the `--solc` option, or disable validation entirely + with `gambit mutate --skip_validate` (see `gambit mutate --help` for more + details). ## Installation @@ -174,59 +176,151 @@ from this repository's root. This will build Gambit and install it to a globally location on your `PATH`. You can also build gambit with `cargo build --release` from the root of this -repository. This will create a `gambit` binary in `gambit/target/release/` -which you can manually place on your path or invoke directly (e.g., by calling -`path/to/gambit/target/release/gambit`). +repository. This will create the `target/release/gambit` binary which you can +manually place on your path or invoke directly. ## Usage -Gambit has two main commands: `mutate` and `summary`. `gambit mutate` is -responsible for mutating code, and `gambit summary` is a convenience command for -summarizing generated mutants in a human-readable way. +Gambit has two main commands: `mutate` and `summary`. The `mutate` command is +responsible for mutating code. The `summary` command allows the user to get +a high level summary of the results of an execution of `gambit mutate`. -Running `gambit mutate` will invoke `solc`, so make -sure it is visible on your `PATH`. Alternatively, you can specify where Gambit can -find the Solidity compiler with the option `--solc path/to/solc`, or specify a -`solc` binary (e.g., `solc8.12`) with the option `--solc solc8.12`. + + +## Testing + +Gambit has _unit tests_ and _regression tests_. Run unit tests with `cargo +test`. _**Note:** -All tests (`cargo test`) are currently run using `solc8.13`. Your tests may fail - if your `solc` points at a different version of the compiler. +All unit tests (`cargo test`) are currently run using `solc8.13`. Tests may fail +if `solc` points at a different version of the compiler. _ -### Running `gambit mutate` +Run regression tests with `scripts/run_regressions.sh`. This script runs +`gambit mutate` on all configuration files in `benchmarks/config-jsons` and +compares the output against the expected output in `resources/regressions`. -The `gambit mutate` command expects either a `--filename` argument or a `--json` -argument. Using `--filename` allows you to specify a specific Solidity file to -mutate: +_**Note:** +To update regression tests (e.g., in case of new test cases, new mutation +operators, altered mutation operators, etc), use the +`scripts/make_regressions.sh` script. +- -```bash -gambit mutate --filename file.sol -``` + -However, if you want to mutate multiple files or apply a more complex set of -parameters, we recommend using a configuration file via the `--json` option -instead: +### The `mutate` command -```bash -gambit mutate --json gambit_conf.json -``` +The `mutate` command expects a filename `gambit mutate file.sol` or a +configuration file `gambit mutate --json gambit_conf.json`. The `mutate` command +does the following: -Run `gambit --help` for more information. +1. **Parse:** Gambit begins by parsing the specified Solidity files provided on + command line or in the configuration file -_**Note:** -All relative paths specified in a JSON configuration file are interpreted -to be relative to the configuration file's parent directory. -_ +2. **Function filters:** The `mutate` command provides the `--functions` and + `--contract` to allow users to filter which functions should be mutated. When + `--functions` is specified, Gambit will only mutate functions with a name + contained in the provided list of functions. When `--contract` is specified, + Gambit will only mutate functions within the specified contract. If neither + option is specified, Gambit will mutate all functions. + +3. **Mutation:** Next, Gambit recursively visits the body of each function + retained in (2) and applies a set of mutation operators. If no mutation operators are + specified then Gambit uses a default set of mutation operators; otherwise, + Gambit uses only those mutation operators that are specified. + +4. **Validation:** By default Gambit will _validate_ each + generated mutant by compiling it with the `solc` compiler. If compilation + fails Gambit will not export the mutant. Validation can be skipped with the + `--skip_validate` option. To log invalidated mutants, use the `--log_invalid` + option. + +5. **Down sampling:** If the user provides the `--num_mutants n` argument, + Gambit will randomly down sample to `n` mutants. + +6. **Write to disk:** After all mutants are generated, validated, and optionally + down sampled, the `mutate` writes the results to disk. This includes + as well as specify several + +### The `summary` command + +The `summary` command allows the user to see a summary of a `mutate` run: + +
+$ gambit mutate benchmarks/Ops/AOR/AOR.sol
+Generated 27 mutants in 0.41 seconds
 
-In the following section we provide examples of how to run Gambit using both
-`--filename` and `--json`. We provide more complete documentation in the
-[Configuration Files](#configuration-files) and [CLI-Options](#cli-options) sections below.
+$ gambit summary
+
+STD:      5 ( 18.52%)
+AOR:     22 ( 81.48%)
+---------------------
+TOT:     27 (100.00%)
+
+ +To print the diffs of specific mutants, pass the `--mids` option: + +
+$ gambit summary --mids 1 2
+
+             === Mutant ID: 1 [StatementDeletion] ===
+
+--- original
++++ mutant
+@@ -9,8 +9,9 @@
+     // a * b
+     // a / b
+     // a % b
++    /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`
+     function plus(int256 a, int256 b) public pure returns (int256) {
+-        return a + b;
++        assert(true);
+     }
+
+     // Expect 4 mutants:
+
+Path: mutants/1/benchmarks/Ops/AOR/AOR.sol
+
+
+             === Mutant ID: 2 [ArithmeticOperatorReplacement] ===
+
+--- original
++++ mutant
+@@ -9,8 +9,9 @@
+     // a * b
+     // a / b
+     // a % b
++    /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`
+     function plus(int256 a, int256 b) public pure returns (int256) {
+-        return a + b;
++        return a - b;
+     }
+
+     // Expect 4 mutants:
+
+Path: mutants/2/benchmarks/Ops/AOR/AOR.sol
+
+ +Pass the `--short` option to print a shorter summary of each mutant: + +
+$ gambit summary --mids 1 2 3 4 5 --short
+(1) STD [mutants/1/benchmarks/Ops/AOR/AOR.sol@13:9] return a + b -> assert(true)
+(2) AOR [mutants/2/benchmarks/Ops/AOR/AOR.sol@13:18] + -> -
+(3) AOR [mutants/3/benchmarks/Ops/AOR/AOR.sol@13:18] + -> *
+(4) AOR [mutants/4/benchmarks/Ops/AOR/AOR.sol@13:18] + -> /
+(5) AOR [mutants/5/benchmarks/Ops/AOR/AOR.sol@13:18] + -> %
+
## Examples -Unless otherwise noted, examples use code from [benchmarks/](https://github.com/Certora/gambit/tree/master/benchmarks) -and are run from the root of the [Gambit repository](https://github.com/Certora/gambit). +In this section we provide examples of how to run Gambit. We provide more +complete documentation in the [Configuration Files](#configuration-files) and +[CLI-Options](#cli-options) sections below. Unless otherwise noted, examples +use code from +[benchmarks/](https://github.com/Certora/gambit/tree/master/benchmarks) and are +run from the root of the [Gambit repository](https://github.com/Certora/gambit). ### Example 1: Mutating a single file From 23cfcf5838eae110775cfa0c8215ca936d551808 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 8 Sep 2023 16:32:20 -0700 Subject: [PATCH 125/200] Fixed bugs --- src/mutation.rs | 2 +- src/mutator.rs | 16 ++++++++++++++-- src/util.rs | 8 ++++---- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/mutation.rs b/src/mutation.rs index 15fc0953..64654146 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -51,7 +51,7 @@ impl MutantLoc { let (line_no, col_no) = file.offset_to_line_column(loc.start()); let path = file.path.clone(); - let sol_path = if let Some(sol_path) = get_sol_path(resolver, file) { + let sol_path = if let Some(sol_path) = get_sol_path(resolver, &file.path) { sol_path } else if let Ok(can_path) = file.path.canonicalize() { print_warning( diff --git a/src/mutator.rs b/src/mutator.rs index 653aaf79..f81a8f90 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -1,6 +1,6 @@ use crate::{ - default_gambit_output_directory, mutation::MutationType, normalize_mutation_operator_name, - print_error, Mutant, MutateParams, Mutation, Solc, + default_gambit_output_directory, get_sol_path, mutation::MutationType, + normalize_mutation_operator_name, print_error, Mutant, MutateParams, Mutation, Solc, }; use clap::ValueEnum; use solang::{ @@ -262,6 +262,18 @@ impl Mutator { /// Mutate a single file. fn mutate_file(&mut self, filename: &String) -> Result, Box> { + // Check if we can mutate path + let sol_path = get_sol_path(&self.file_resolver, &PathBuf::from(filename)); + if sol_path.is_none() { + let import_paths: Vec = self + .file_resolver + .get_import_paths() + .iter() + .map(|p| p.1.to_str().unwrap().to_string()) + .collect(); + print_error("File Not In Import Paths", format!("Could not mutate file {}:\nFile could not be resolved against any provided import paths.\nImport Paths: {:?}", filename, import_paths).as_str()); + std::process::exit(1); + } log::info!("Parsing file {}", filename); let ns = Rc::new(parse_and_resolve( OsStr::new(filename), diff --git a/src/util.rs b/src/util.rs index eee06c31..6f2fd2a7 100644 --- a/src/util.rs +++ b/src/util.rs @@ -329,14 +329,14 @@ pub fn statement_type(stmt: &Statement) -> &str { } } -pub fn get_sol_path(resolver: &FileResolver, file: &solang::sema::ast::File) -> Option { +/// Get the import path, if available, from resolver for the import_no +pub fn get_sol_path(resolver: &FileResolver, filepath: &Path) -> Option { let import_paths = resolver.get_import_paths(); - let path = &file.path; for import_path in import_paths.iter().filter_map(|p| match p { - (None, ip) => ip.canonicalize().ok(), + (None, ip) => Some(ip), _ => None, }) { - if let Ok(rel_path) = path.strip_prefix(import_path) { + if let Ok(rel_path) = filepath.strip_prefix(import_path) { return Some(rel_path.to_path_buf()); } } From db98acd41bfbf7849fd6ce299f78c2f84316e3f2 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 8 Sep 2023 19:18:37 -0700 Subject: [PATCH 126/200] tmp commit: modified readme --- README.md | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 30bbf34e..bc904f2c 100644 --- a/README.md +++ b/README.md @@ -324,22 +324,43 @@ run from the root of the [Gambit repository](https://github.com/Certora/gambit). ### Example 1: Mutating a single file -To mutate a single file, use the `--filename` option (or `-f`), followed by the -file to mutate. +To mutate a single file, call `gambit mutate` with the filename as an argument: ```bash -gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol +gambit mutate -f benchmarks/Ops/AOR/AOR.sol ```
-Generated 34 mutants in 0.69 seconds
+Generated 27 mutants in 0.42 seconds
 
-_**Note:** -The mutated file must be located within your current working directory or -one of its subdirectories. If you want to mutate code in an arbitrary directory, -use the `--sourceroot` option. -_ +If the mutated file is not located in your current working directory (or one of +its subdirectories), you will need to specify an import path. Running: + + +``` +mkdir tmp +cd tmp +gambit mutate ../benchmarks/Ops/AOR/AOR.sol +``` + +
+Error: File Not In Import Paths
+   Could not mutate file /Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol:
+   File could not be resolved against any provided import paths.
+   Import Paths: ["/Users/benku/Gambit/tmp"]
+
+ +By specifying an import path that contains the mutated file with `-I ..` , +Gambit is able to resolve the provided filename. + +``` +gambit mutate ../benchmarks/Ops/AOR/AOR.sol -I .. +``` + +
+Generated 27 mutants in 0.42 seconds
+
### Example 2: Mutating and downsampling @@ -347,9 +368,10 @@ The above command produced 34 mutants which may be more than you need. Gambit provides a way to randomly downsample the number of mutants with the `--num_mutants` or `-n` option: -```bash -gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -n 3 ``` +gambit mutate benchmarks/Ops/AOR/AOR.sol --num_mutants 3 +``` +
 Generated 3 mutants in 0.15 seconds
 
From fc60e2d7ecdd1c7138f9847d9a28ded9d7d20300 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 8 Sep 2023 19:51:38 -0700 Subject: [PATCH 127/200] tmp commit: updates to README --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index bc904f2c..ceef77fc 100644 --- a/README.md +++ b/README.md @@ -243,6 +243,30 @@ does the following: down sampled, the `mutate` writes the results to disk. This includes as well as specify several +#### Specifying Import Paths and Remappings + +Gambit resolves imports while parsing, and this requires that you specify any +import paths and remappings that you would pass to `solc`. + +Instead of `solc`'s `--base-name` and `--input-path` arguments, Gambit uses +a simpler scheme and replaces both of these with `--import_path` (`-I`). For instance, +if the `solc` invocation is `solc C.sol --base-name . --input-path modules` , +then the Gambit invocation becomes `gambit mutate C.sol -I . -I modules`. + +Remappings are specified with the `--import_map` (`-m`) argument. If the `solc` +invocation is `solc C.sol @openzeppelin=node_modules/@openzeppelin`, then the +Gambit invocation becomes `gambit mutate C.sol -m +@openzeppelin=node_modules/@openzeppelin`. + +#### Performing Mutant Validation + +Gambit uses provided import paths and import remappings to invoke `solc`. For +instance, if you invoke `gambit mutate C.sol -I A/ -I B/ -I C/ -m @x=y/@x`, then +Gambit will validate a generated mutant by calling +`solc MutatedC.sol --base-path A/ --include-path B/ --include-path C/ @x=y/@x`. +If you need to specify a solc `--allow-paths` argument, use the `mutate` +command's `--solc_allow_paths` argument. + ### The `summary` command The `summary` command allows the user to see a summary of a `mutate` run: @@ -313,6 +337,11 @@ $ gambit summary --mids 1 2 3 4 5 --short (5) AOR [mutants/5/benchmarks/Ops/AOR/AOR.sol@13:18] + -> % +_**Note:** +The `summary` command is currently experimental, and its output and interface +may change in future releases. +_ + ## Examples In this section we provide examples of how to run Gambit. We provide more From e36730348a57e28bcdc7ebaadda326440bd60ad1 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 8 Sep 2023 20:09:59 -0700 Subject: [PATCH 128/200] Fixed readme translation syntax, updates to readme --- README.md | 18 ++++++------------ scripts/generate_rtd_markdown.py | 13 ++++++++++++- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index ceef77fc..789edd77 100644 --- a/README.md +++ b/README.md @@ -194,8 +194,7 @@ test`. _**Note:** All unit tests (`cargo test`) are currently run using `solc8.13`. Tests may fail -if `solc` points at a different version of the compiler. -_ +if `solc` points at a different version of the compiler._ Run regression tests with `scripts/run_regressions.sh`. This script runs `gambit mutate` on all configuration files in `benchmarks/config-jsons` and @@ -204,8 +203,7 @@ compares the output against the expected output in `resources/regressions`. _**Note:** To update regression tests (e.g., in case of new test cases, new mutation operators, altered mutation operators, etc), use the -`scripts/make_regressions.sh` script. -- +`scripts/make_regressions.sh` script.- @@ -339,8 +337,7 @@ $ gambit summary --mids 1 2 3 4 5 --short _**Note:** The `summary` command is currently experimental, and its output and interface -may change in future releases. -_ +may change in future releases._ ## Examples @@ -407,8 +404,7 @@ Generated 3 mutants in 0.15 seconds ### Example 3: Viewing Gambit results _**Note:** -This example assumes you've just completed Example 2. -_ +This example assumes you've just completed Example 2._ Gambit outputs all of its results in `gambit_out`: @@ -502,8 +498,7 @@ paths (both original and mutated) are reported relative to this source root. _**Note:** If Gambit encounters a source file that does not belong to the source root it -will print an error message and exit. -_ +will print an error message and exit._ _When running `gambit mutate` with the `--filename` option, source root defaults to the current working directory. @@ -597,8 +592,7 @@ examples. _**Note:** Any paths provided by the configuration file are resolved relative to the -configuration file's parent directory. -_ +configuration file's parent directory._ ## Configuration Files diff --git a/scripts/generate_rtd_markdown.py b/scripts/generate_rtd_markdown.py index aaec4db3..5f0747f3 100644 --- a/scripts/generate_rtd_markdown.py +++ b/scripts/generate_rtd_markdown.py @@ -71,6 +71,16 @@ def is_escaped_open_comment(line: str) -> bool: return line.strip() == r"<\!--" +def is_note_end(line: str) -> bool: + """ + A note ends when a line is ended by an underscore. We double check to ensure + that the line doesn't end with two underscores. + """ + l = line.strip() + if l.endswith("_"): + return len(l) == 1 or l[-2] != "_" + + def is_escaped_closed_comment(line: str) -> bool: return line.strip() == r"--\>" @@ -106,8 +116,9 @@ def translate_readme_to_rtd(readme_file_path: str) -> str: f"Illegal note start on line {i+1}: new note tags '_**Note:**' and their closing '_' must be on their own lines" ) - elif note_start > -1 and line.strip() == "_": + elif is_note_end(line): note_start = -1 + lines2.append(line.rstrip("\n").rstrip("_")) lines2.append("```") elif is_emit(line): From 875b8c6b38293d96bf724be698dc2978dd20abe8 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 8 Sep 2023 20:11:52 -0700 Subject: [PATCH 129/200] Fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 789edd77..c26cd2bf 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ compares the output against the expected output in `resources/regressions`. _**Note:** To update regression tests (e.g., in case of new test cases, new mutation operators, altered mutation operators, etc), use the -`scripts/make_regressions.sh` script.- +`scripts/make_regressions.sh` script._ From 562c608b99ce006e981743fc7e73d3a0fcc100bb Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 8 Sep 2023 20:13:02 -0700 Subject: [PATCH 130/200] Typo --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c26cd2bf..d8b90fa5 100644 --- a/README.md +++ b/README.md @@ -217,11 +217,11 @@ does the following: command line or in the configuration file 2. **Function filters:** The `mutate` command provides the `--functions` and - `--contract` to allow users to filter which functions should be mutated. When - `--functions` is specified, Gambit will only mutate functions with a name - contained in the provided list of functions. When `--contract` is specified, - Gambit will only mutate functions within the specified contract. If neither - option is specified, Gambit will mutate all functions. + `--contract` filters to allow users to filter which functions should be + mutated. When `--functions` is specified, Gambit will only mutate functions + with a name contained in the provided list of functions. When `--contract` is + specified, Gambit will only mutate functions within the specified contract. If + neither option is specified, Gambit will mutate all functions. 3. **Mutation:** Next, Gambit recursively visits the body of each function retained in (2) and applies a set of mutation operators. If no mutation operators are From 472dd16e91b7c06c178898129feda60570ca8400 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 8 Sep 2023 20:14:26 -0700 Subject: [PATCH 131/200] Typo --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d8b90fa5..045e0cf3 100644 --- a/README.md +++ b/README.md @@ -224,9 +224,9 @@ does the following: neither option is specified, Gambit will mutate all functions. 3. **Mutation:** Next, Gambit recursively visits the body of each function - retained in (2) and applies a set of mutation operators. If no mutation operators are - specified then Gambit uses a default set of mutation operators; otherwise, - Gambit uses only those mutation operators that are specified. + retained in (2) and applies the mutation operators specified by the user; + if no mutation operators were specified then Gambit uses a default set of + mutation operators. 4. **Validation:** By default Gambit will _validate_ each generated mutant by compiling it with the `solc` compiler. If compilation From a0d6b3c8f9d7ecc980f8945da06ad3d0c2fd22c0 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 8 Sep 2023 20:15:14 -0700 Subject: [PATCH 132/200] Small update --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 045e0cf3..c689a518 100644 --- a/README.md +++ b/README.md @@ -223,10 +223,10 @@ does the following: specified, Gambit will only mutate functions within the specified contract. If neither option is specified, Gambit will mutate all functions. -3. **Mutation:** Next, Gambit recursively visits the body of each function - retained in (2) and applies the mutation operators specified by the user; - if no mutation operators were specified then Gambit uses a default set of - mutation operators. +3. **Mutation:** Gambit recursively visits the body of each function retained in + (2) and applies the mutation operators specified by the user; if no mutation + operators were specified then Gambit uses a default set of mutation + operators. 4. **Validation:** By default Gambit will _validate_ each generated mutant by compiling it with the `solc` compiler. If compilation From af995aef2d185769b4a4e797f2c823ad49281175 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Fri, 8 Sep 2023 20:16:35 -0700 Subject: [PATCH 133/200] Small updates to README --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c689a518..19bcf3b4 100644 --- a/README.md +++ b/README.md @@ -230,10 +230,11 @@ does the following: 4. **Validation:** By default Gambit will _validate_ each generated mutant by compiling it with the `solc` compiler. If compilation - fails Gambit will not export the mutant. Validation can be skipped with the + fails Gambit will not export the mutant to disk or report it in + `gambit_results.json` or `mutants.log`. Validation can be skipped with the `--skip_validate` option. To log invalidated mutants, use the `--log_invalid` option. - + 5. **Down sampling:** If the user provides the `--num_mutants n` argument, Gambit will randomly down sample to `n` mutants. From 852a6b9290874ba4060602060de2fe9cb4040aa6 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 9 Sep 2023 14:53:35 -0700 Subject: [PATCH 134/200] Improved doc checks --- scripts/check_rtd_docs_up_to_date.py | 61 ++++++++++++++++------------ scripts/generate_rtd_markdown.py | 16 ++++++-- 2 files changed, 46 insertions(+), 31 deletions(-) diff --git a/scripts/check_rtd_docs_up_to_date.py b/scripts/check_rtd_docs_up_to_date.py index 0f15236b..da0158b0 100644 --- a/scripts/check_rtd_docs_up_to_date.py +++ b/scripts/check_rtd_docs_up_to_date.py @@ -3,7 +3,6 @@ from argparse import ArgumentParser from urllib.request import urlopen import difflib -import hashlib import os import sys import re @@ -21,60 +20,68 @@ def main(): parser.add_argument( "--branch", default="master", help="Branch to check README from" ) + parser.add_argument( + "--no_colors", action="store_true", help="Do not use ansi color on outputs" + ) args = parser.parse_args() - exit_code = check_rtd_docs_up_to_date(branch=args.branch) + exit_code = check_rtd_docs_up_to_date(branch=args.branch, colors=not args.no_colors) sys.exit(exit_code) -def find_signature(contents: str) -> str: - pattern = r"" - m = re.search(pattern, contents) - if m is None: - return None - return m.group(1) +def print_unified_diff(diff, colors=True): + color_fn = {} + if colors: + try: + from ansi.color import fg + + color_fn = {"+": fg.green, "-": fg.red, "@": fg.blue} + except ImportError: + colors = False + for line in diff: + l: str = line + if colors: + if l.startswith("+++") or l.startswith("---"): + l = fg.yellow(l) + else: + f = color_fn.get(l[0], str) + l = f(l) + print(l, end="") -def check_rtd_docs_up_to_date(branch="master") -> int: + +def check_rtd_docs_up_to_date(branch="master", colors=True) -> int: url = THEIR_README_URL_NO_BRANCH.format(branch) with open(OUR_README_PATH) as f: our_readme_contents = f.read() - our_md5 = hashlib.md5(our_readme_contents.encode()).hexdigest() - try: - their_readme_contents = urlopen(url).read() - their_md5 = find_signature(their_readme_contents.decode("utf-8")) + their_readme_contents = urlopen(url).read().decode("utf-8") except RuntimeError as e: print(f"Could not read `gambit.md` from {url}") print(f"Error: {e}") return 127 - print("local md5: ", our_md5) - print("remote md5:", their_md5) print() - if our_md5 == their_md5: - print(f"MD5 Hashes Match: Documentation is synced") + if our_readme_contents == their_readme_contents: + print(f"Docs are in sync!") return 0 else: - print(f"MD5 Hashes Do Not Match!") + print(f"Docs are out of sync!") print() our_translated_readme_contents = translate_readme_to_rtd(OUR_README_PATH) print("Unified diff: Local vs Remote") print("=============================") print() - print( - "".join( - difflib.unified_diff( - our_translated_readme_contents.splitlines(keepends=True), - str(their_readme_contents.decode("utf-8")).splitlines( - keepends=True - ), - ) - ) + print_unified_diff( + difflib.unified_diff( + our_translated_readme_contents.splitlines(keepends=True), + their_readme_contents.splitlines(keepends=True), + ), + colors=colors, ) return 1 diff --git a/scripts/generate_rtd_markdown.py b/scripts/generate_rtd_markdown.py index 4cf069fe..5f0747f3 100644 --- a/scripts/generate_rtd_markdown.py +++ b/scripts/generate_rtd_markdown.py @@ -7,7 +7,6 @@ from argparse import ArgumentParser from typing import Optional import re -import hashlib def line_is_anchor(line: str) -> bool: @@ -72,6 +71,16 @@ def is_escaped_open_comment(line: str) -> bool: return line.strip() == r"<\!--" +def is_note_end(line: str) -> bool: + """ + A note ends when a line is ended by an underscore. We double check to ensure + that the line doesn't end with two underscores. + """ + l = line.strip() + if l.endswith("_"): + return len(l) == 1 or l[-2] != "_" + + def is_escaped_closed_comment(line: str) -> bool: return line.strip() == r"--\>" @@ -107,8 +116,9 @@ def translate_readme_to_rtd(readme_file_path: str) -> str: f"Illegal note start on line {i+1}: new note tags '_**Note:**' and their closing '_' must be on their own lines" ) - elif note_start > -1 and line.strip() == "_": + elif is_note_end(line): note_start = -1 + lines2.append(line.rstrip("\n").rstrip("_")) lines2.append("```") elif is_emit(line): @@ -141,8 +151,6 @@ def translate_readme_to_rtd(readme_file_path: str) -> str: # replace internal links l = replace_internal_references(line) lines2.append(l.strip("\n")) - signature = hashlib.md5(original.encode()).hexdigest() - lines2.append(f"") return "\n".join(lines2) + "\n" From e4b8b7380f73a2478079a03733f7560fc4612509 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 9 Sep 2023 14:56:06 -0700 Subject: [PATCH 135/200] workflow --- .github/workflows/gambit.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/gambit.yml b/.github/workflows/gambit.yml index 8dc69c49..346092de 100644 --- a/.github/workflows/gambit.yml +++ b/.github/workflows/gambit.yml @@ -138,6 +138,9 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: PIP install + run: pip install ansi + - name: Check that RTD Docs are Up To Date run: python3 scripts/check_rtd_docs_up_to_date.py From 51623b6bafa02050726b958c44657af5ab211c9d Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 9 Sep 2023 15:11:30 -0700 Subject: [PATCH 136/200] Fixes --- README.md | 53 ++++++++++++++------------------ scripts/generate_rtd_markdown.py | 4 +-- 2 files changed, 25 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 5b82e3a4..7e1d597e 100644 --- a/README.md +++ b/README.md @@ -31,28 +31,26 @@ 3. Create a new PR in https://github.com/Certora/Documentation with the new Gambit docs + 4. Create a new PR in Gambit repo. Note that CI will check that the RTD + documentation is up to date (see section "Checking RTDs are Up To Date" + below). If this fails, CI will also fail, and you will be unable to merge + into `master` until changes to the Gambit README are propagated to the RTD + docs. + + 5. Once the PR from (3) is merged and CI is passing in this repository, merge + the PR from (4) into master. ## Checking RTDs are Up To Date - - In addition to translating this document to the RTD format, - `generate_rtd_markdown.py` also adds the md5 checksum of the original - `README.md` contents to an HTML comment in the translated `gambit.md`: - - ``` - <\!-- signature: CHECKSUM --\> - ``` - - You can check to ensure that the current version of `docs/gambit/gambit.md` in - the Certora Documentation repo is up to date with the version of the - `README.md` in your working tree by running - - To check that this file and RTD Gambit docs are in sync, run: + To check that the RTD Gambit docs are in sync with Gambit's README, run ``` python scripts/check_rtd_docs_upt_to_date.py ``` + + This will translate the Gambit README to a string, pull the RTD docs from the + Github Repo, and do a equality check on the two strings. You can optionally specify a `--branch` argument to choose another branch in the Certora Documentation repo (default is `'master'`) @@ -109,17 +107,17 @@ Some note goes here ``` - We don't have access tho this here, so I've implemented a simple system, + We don't have access to this here, so I've implemented a simple system, where all notes begin with a line containing: ```markdown _**Note:** ``` - and end with a line containing only: + and end with a line ending with `_`: ```markdown - _ + and this is the last line of my note._ ``` So, a full note would look like: @@ -127,7 +125,8 @@ ```markdown _**Note:** This is a note. The opening tag is on its own line, and the closing italic - is on its own line. This is to make parsing easy, and to keep diffs minimal! + is at the end of the final line. This is to make parsing easy, and to keep + diffs minimal!_ ``` --> @@ -192,8 +191,7 @@ find the Solidity compiler with the option `--solc path/to/solc`, or specify a _**Note:** All tests (`cargo test`) are currently run using `solc8.13`. Your tests may fail - if your `solc` points at a different version of the compiler. -_ + if your `solc` points at a different version of the compiler._ ### Running `gambit mutate` @@ -217,8 +215,7 @@ Run `gambit --help` for more information. _**Note:** All relative paths specified in a JSON configuration file are interpreted -to be relative to the configuration file's parent directory. -_ +to be relative to the configuration file's parent directory._ In the following section we provide examples of how to run Gambit using both `--filename` and `--json`. We provide more complete documentation in the @@ -245,8 +242,7 @@ Generated 34 mutants in 0.69 seconds _**Note:** The mutated file must be located within your current working directory or one of its subdirectories. If you want to mutate code in an arbitrary directory, -use the `--sourceroot` option. -_ +use the `--sourceroot` option._ ### Example 2: Mutating and downsampling @@ -263,8 +259,7 @@ Generated 3 mutants in 0.15 seconds ### Example 3: Viewing Gambit results _**Note:** -This example assumes you've just completed Example 2. -_ +This example assumes you've just completed Example 2._ Gambit outputs all of its results in `gambit_out`: @@ -358,8 +353,7 @@ paths (both original and mutated) are reported relative to this source root. _**Note:** If Gambit encounters a source file that does not belong to the source root it -will print an error message and exit. -_ +will print an error message and exit._ _When running `gambit mutate` with the `--filename` option, source root defaults to the current working directory. @@ -453,8 +447,7 @@ examples. _**Note:** Any paths provided by the configuration file are resolved relative to the -configuration file's parent directory. -_ +configuration file's parent directory._ ## Configuration Files diff --git a/scripts/generate_rtd_markdown.py b/scripts/generate_rtd_markdown.py index 5f0747f3..366e1a02 100644 --- a/scripts/generate_rtd_markdown.py +++ b/scripts/generate_rtd_markdown.py @@ -116,9 +116,9 @@ def translate_readme_to_rtd(readme_file_path: str) -> str: f"Illegal note start on line {i+1}: new note tags '_**Note:**' and their closing '_' must be on their own lines" ) - elif is_note_end(line): + elif note_start > -1 and is_note_end(line): note_start = -1 - lines2.append(line.rstrip("\n").rstrip("_")) + lines2.append(line.rstrip().rstrip("_")) lines2.append("```") elif is_emit(line): From 44831a93f2032704dbebe3b13862636ecbb4d924 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 9 Sep 2023 15:19:23 -0700 Subject: [PATCH 137/200] Fix bug --- scripts/check_rtd_docs_up_to_date.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/check_rtd_docs_up_to_date.py b/scripts/check_rtd_docs_up_to_date.py index da0158b0..1ea55457 100644 --- a/scripts/check_rtd_docs_up_to_date.py +++ b/scripts/check_rtd_docs_up_to_date.py @@ -66,13 +66,13 @@ def check_rtd_docs_up_to_date(branch="master", colors=True) -> int: return 127 print() - if our_readme_contents == their_readme_contents: + our_translated_readme_contents = translate_readme_to_rtd(OUR_README_PATH) + if our_translated_readme_contents == their_readme_contents: print(f"Docs are in sync!") return 0 else: print(f"Docs are out of sync!") print() - our_translated_readme_contents = translate_readme_to_rtd(OUR_README_PATH) print("Unified diff: Local vs Remote") print("=============================") print() From 78e4300c2138ff03a995b4b60f3927b9c2737106 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 9 Sep 2023 15:30:44 -0700 Subject: [PATCH 138/200] Pulled in updates to README preamble from fix_readme branch --- README.md | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 19bcf3b4..773401d3 100644 --- a/README.md +++ b/README.md @@ -29,28 +29,26 @@ 3. Create a new PR in https://github.com/Certora/Documentation with the new Gambit docs + 4. Create a new PR in Gambit repo. Note that CI will check that the RTD + documentation is up to date (see section "Checking RTDs are Up To Date" + below). If this fails, CI will also fail, and you will be unable to merge + into `master` until changes to the Gambit README are propagated to the RTD + docs. + + 5. Once the PR from (3) is merged and CI is passing in this repository, merge + the PR from (4) into master. ## Checking RTDs are Up To Date - - In addition to translating this document to the RTD format, - `generate_rtd_markdown.py` also adds the md5 checksum of the original - `README.md` contents to an HTML comment in the translated `gambit.md`: - - ``` - <\!-- signature: CHECKSUM --\> - ``` - - You can check to ensure that the current version of `docs/gambit/gambit.md` in - the Certora Documentation repo is up to date with the version of the - `README.md` in your working tree by running - - To check that this file and RTD Gambit docs are in sync, run: + To check that the RTD Gambit docs are in sync with Gambit's README, run ``` python scripts/check_rtd_docs_upt_to_date.py ``` + + This will translate the Gambit README to a string, pull the RTD docs from the + Github Repo, and do a equality check on the two strings. You can optionally specify a `--branch` argument to choose another branch in the Certora Documentation repo (default is `'master'`) @@ -107,17 +105,17 @@ Some note goes here ``` - We don't have access tho this here, so I've implemented a simple system, + We don't have access to this here, so I've implemented a simple system, where all notes begin with a line containing: ```markdown _**Note:** ``` - and end with a line containing only: + and end with a line ending with `_`: ```markdown - _ + and this is the last line of my note._ ``` So, a full note would look like: @@ -125,7 +123,8 @@ ```markdown _**Note:** This is a note. The opening tag is on its own line, and the closing italic - is on its own line. This is to make parsing easy, and to keep diffs minimal! + is at the end of the final line. This is to make parsing easy, and to keep + diffs minimal!_ ``` --> From 5bbb07fc3b999cb7e13fdf3cbcdc6b893d3f5b23 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 9 Sep 2023 15:33:41 -0700 Subject: [PATCH 139/200] Fixed scripts (pulled changes from fix_readme) --- scripts/check_rtd_docs_up_to_date.py | 45 +++++++++++++++++++++------- scripts/generate_rtd_markdown.py | 4 +-- 2 files changed, 36 insertions(+), 13 deletions(-) diff --git a/scripts/check_rtd_docs_up_to_date.py b/scripts/check_rtd_docs_up_to_date.py index d209743a..1ea55457 100644 --- a/scripts/check_rtd_docs_up_to_date.py +++ b/scripts/check_rtd_docs_up_to_date.py @@ -20,14 +20,38 @@ def main(): parser.add_argument( "--branch", default="master", help="Branch to check README from" ) + parser.add_argument( + "--no_colors", action="store_true", help="Do not use ansi color on outputs" + ) args = parser.parse_args() - exit_code = check_rtd_docs_up_to_date(branch=args.branch) + exit_code = check_rtd_docs_up_to_date(branch=args.branch, colors=not args.no_colors) sys.exit(exit_code) -def check_rtd_docs_up_to_date(branch="master") -> int: +def print_unified_diff(diff, colors=True): + color_fn = {} + if colors: + try: + from ansi.color import fg + + color_fn = {"+": fg.green, "-": fg.red, "@": fg.blue} + except ImportError: + colors = False + + for line in diff: + l: str = line + if colors: + if l.startswith("+++") or l.startswith("---"): + l = fg.yellow(l) + else: + f = color_fn.get(l[0], str) + l = f(l) + print(l, end="") + + +def check_rtd_docs_up_to_date(branch="master", colors=True) -> int: url = THEIR_README_URL_NO_BRANCH.format(branch) with open(OUR_README_PATH) as f: @@ -42,23 +66,22 @@ def check_rtd_docs_up_to_date(branch="master") -> int: return 127 print() - if our_readme_contents == their_readme_contents: + our_translated_readme_contents = translate_readme_to_rtd(OUR_README_PATH) + if our_translated_readme_contents == their_readme_contents: print(f"Docs are in sync!") return 0 else: print(f"Docs are out of sync!") print() - our_translated_readme_contents = translate_readme_to_rtd(OUR_README_PATH) print("Unified diff: Local vs Remote") print("=============================") print() - print( - "".join( - difflib.unified_diff( - our_translated_readme_contents.splitlines(keepends=True), - their_readme_contents.splitlines(keepends=True), - ) - ) + print_unified_diff( + difflib.unified_diff( + our_translated_readme_contents.splitlines(keepends=True), + their_readme_contents.splitlines(keepends=True), + ), + colors=colors, ) return 1 diff --git a/scripts/generate_rtd_markdown.py b/scripts/generate_rtd_markdown.py index 5f0747f3..366e1a02 100644 --- a/scripts/generate_rtd_markdown.py +++ b/scripts/generate_rtd_markdown.py @@ -116,9 +116,9 @@ def translate_readme_to_rtd(readme_file_path: str) -> str: f"Illegal note start on line {i+1}: new note tags '_**Note:**' and their closing '_' must be on their own lines" ) - elif is_note_end(line): + elif note_start > -1 and is_note_end(line): note_start = -1 - lines2.append(line.rstrip("\n").rstrip("_")) + lines2.append(line.rstrip().rstrip("_")) lines2.append("```") elif is_emit(line): From f9de05804209ff3886f53a192029b4be903b48ec Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sat, 9 Sep 2023 16:02:31 -0700 Subject: [PATCH 140/200] Updates to README --- README.md | 194 ++++++++++++++++-------------------------------------- 1 file changed, 55 insertions(+), 139 deletions(-) diff --git a/README.md b/README.md index 773401d3..9c459b09 100644 --- a/README.md +++ b/README.md @@ -353,15 +353,21 @@ run from the root of the [Gambit repository](https://github.com/Certora/gambit). To mutate a single file, call `gambit mutate` with the filename as an argument: ```bash -gambit mutate -f benchmarks/Ops/AOR/AOR.sol +gambit mutate benchmarks/Ops/AOR/AOR.sol ```
 Generated 27 mutants in 0.42 seconds
 
-If the mutated file is not located in your current working directory (or one of -its subdirectories), you will need to specify an import path. Running: +### Example 2: Running from a different directory + +Mutated files must be contained in an import path. Gambit uses the current +working directory (`"."`) as the default import path. If the mutated file is not +located in your current working directory (or one of its subdirectories), you +will need to specify an import path that contains the file. For instance, +suppose you wanted to run Example 1, but from a `tmp` directory contained at the +root of this repository: ``` @@ -377,8 +383,7 @@ Error: File Not In Import Paths Import Paths: ["/Users/benku/Gambit/tmp"] -By specifying an import path that contains the mutated file with `-I ..` , -Gambit is able to resolve the provided filename. +To fix this errory, specify `..` as an import path: ``` gambit mutate ../benchmarks/Ops/AOR/AOR.sol -I .. @@ -388,11 +393,11 @@ gambit mutate ../benchmarks/Ops/AOR/AOR.sol -I .. Generated 27 mutants in 0.42 seconds -### Example 2: Mutating and downsampling +### Example 3: Mutating and downsampling -The above command produced 34 mutants which may be more than you need. Gambit -provides a way to randomly downsample the number of mutants with the -`--num_mutants` or `-n` option: +To randomly downsample the number of mutants generated, use the `--num_mutants`. +For instance, if you only wanted 3 of the 27 mutants generated from Example 1, +you would run: ``` gambit mutate benchmarks/Ops/AOR/AOR.sol --num_mutants 3 @@ -402,11 +407,16 @@ gambit mutate benchmarks/Ops/AOR/AOR.sol --num_mutants 3 Generated 3 mutants in 0.15 seconds -### Example 3: Viewing Gambit results -_**Note:** -This example assumes you've just completed Example 2._ +### Example 4: Viewing Gambit results +By default, Gambit outputs all of its results in `gambit_out` : -Gambit outputs all of its results in `gambit_out`: +``` +gambit mutate benchmarks/Ops/AOR/AOR.sol --num_mutants 3 +``` + +
+Generated 3 mutants in 0.15 seconds
+
```bash tree -L 2 gambit_out @@ -415,71 +425,55 @@ tree -L 2 gambit_out
 gambit_out
 ├── gambit_results.json
-├── input_json
-│   ├── BinaryOpMutation.sol_json.ast
-│   └── BinaryOpMutation.sol_json.ast.json
 ├── mutants
-│   ├── 1
-│   ├── 2
-│   └── 3
+│   ├── 1
+│   ├── 2
+│   └── 3
 └── mutants.log
 
See the [Results Directory](#results-directory) section for a detailed -explanation of this layout. The `gambit summary` command -pretty prints each mutant for easy inspection: +explanation of this layout. The `gambit summary` command prints high level +statistics of the output of a `mutate` command: -![The output of `gambit summary`](doc/gambit-summary.png) +``` +gambit summary +``` + +
+AOR:      3 (100.00%)
+---------------------
+TOT:      3 (100.00%)
+
-By default `gambit summary` prints info on all mutants. If you are interested in -particular mutants you can specify a subset of mutant ids with the `--mids` flag. -For instance, `gambit summary --mids 3 4 5` will only print info for mutant ids -3 through 5. +You can also pretty-print particular mutant diffs by specifying their mutant ids +with `--mids`: +![The output of `gambit summary --mids 1`](doc/gambit-summary-mids.png) -### Example 4: Specifying `solc` pass-through arguments -The Solidity compiler (`solc`) may need some extra information to successfully -run on a file or a project. Gambit enables this with _pass-through arguments_ -that, as the name suggests, are passed directly through to the `solc` compiler. - -For projects that have complex dependencies and imports, you may need to: -* **Specify base paths**: To specify the Solidity [`--base-path`][basepath] - argument, use `--solc_base_path`: +For shorter summaries, use the `--short` option: - ```bash - gambit mutate --filename path/to/file.sol --solc_base_path base/path/dir - ``` +![The output of `gambit summary --mids 1 2 3 --short`](doc/gambit-summary-mids-short.png) -* **Specify remappings:** To indicate where Solidity should find libraries, - use `solc`'s [import remapping][remapping] syntax with `--solc_remappings`: - - ```bash - gambit mutate --filename path/to/file.sol \ - --solc_remappings @openzeppelin=node_modules/@openzeppelin @foo=node_modules/@foo - ``` -* **Specify allow paths:** To include additional allowed paths via `solc`'s - [`--allow-paths`][allowed] argument, use `--solc_allow_paths`: +### Example 5: Specifying `solc` pass-through arguments - ```bash - gambit mutate --filename path/to/file.sol \ - --solc_allow_paths PATH1 --solc_allow_paths PATH2 ... - ``` +The Solidity compiler (`solc`) may need some extra information to successfully +run on a file or a project. Gambit enables this with _pass-through arguments_ +that, as the name suggests, are passed directly through to the `solc` compiler. -* **Specify include-path:** To make an additional source directory available - to the default import callback via `solc`'s [--include-path][included] argument, - use `--solc_include_path`: +For projects that have complex dependencies and imports, you may need to +specify the `--allow-path` argument: - ```bash - gambit mutate --filename path/to/file.sol --solc_include_path PATH - ``` +```bash +gambit mutate path/to/file.sol --solc_allow_paths base/path/dir +``` -* **Use optimization:** To run the solidity compiler with optimizations - (`solc`'s `--optimize` argument), use `--solc_optimize`: +If you want to run `solc` with optimizations enabled, use the `--solc_optimize` flag: - ```bash - gambit mutate --filename path/to/file.sol --solc_optimize - ``` +```bash +gambit mutate path/to/file.sol --solc_optimize +``` [remapping]: https://docs.soliditylang.org/en/v0.8.17/path-resolution.html#import-remapping [basepath]: https://docs.soliditylang.org/en/v0.8.17/path-resolution.html#base-path-and-include-paths @@ -487,84 +481,6 @@ For projects that have complex dependencies and imports, you may need to: -### Example 5: The `--sourceroot` option - -Gambit needs to track the location of source files that it mutates within a -project: for instance, imagine there are files `foo/Foo.sol` and `bar/Foo.sol`. -These are separate files, and their path prefixes are needed to determine this. -Gambit addresses this with the `--sourceroot` option: the source root indicates -to Gambit the root of the files that are being mutated, and all source file -paths (both original and mutated) are reported relative to this source root. - -_**Note:** -If Gambit encounters a source file that does not belong to the source root it -will print an error message and exit._ - -_When running `gambit mutate` with the `--filename` option, -source root defaults to the current working directory. -When running `gambit mutate` with the `--json` option, -source root defaults to the directory containing the configuration JSON._ - -Here are some examples of using the `--sourceroot` option. - -1. From the root of the Gambit repository, run: - - ```bash - gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -n 1 - cat gambit_out/mutants.log - find gambit_out/mutants -name "*.sol" - ``` - - This should output the following: - -
-   Generated 1 mutants in 0.13 seconds
-   1,BinaryOpMutation,benchmarks/BinaryOpMutation/BinaryOpMutation.sol,23:10, % ,*
-   gambit_out/mutants/1/benchmarks/BinaryOpMutation/BinaryOpMutation.sol
-   
- - The first command generates a single mutant, and its source path is relative to `.`, - the default source root. We can see that the reported paths in `mutants.log`, - and the mutant file path in `gambit_out/mutants/1`, are the relative to this - source root: `benchmarks/BinaryOpMutation/BinaryOpMutation.sol` - -2. Suppose we want our paths to be reported relative to - `benchmarks/BinaryOpMutation`. We can run - - ```bash - gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -n 1 --sourceroot benchmarks/BinaryOpMutation - cat gambit_out/mutants.log - find gambit_out/mutants -name "*.sol" - ``` - - which will output: - - -
-   Generated 1 mutants in 0.13 seconds
-   1,BinaryOpMutation,BinaryOpMutation.sol,23:10, % ,*
-   gambit_out/mutants/1/BinaryOpMutation.sol
-   
- - The reported filenames, and the offset path inside of - `gambit_out/mutants/1/`, are now relative to the source root that we - specified. - -3. Finally, suppose we use a source root that doesn't contain the source file: - - ```bash - gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -n 1 --sourceroot scripts - ``` - This will try to find the specified file inside of `scripts`, and since it - doesn't exist Gambit reports the error: - - -
-   [ERROR gambit] [!!] Illegal Configuration: Resolved filename `/Users/USER/Gambit/benchmarks/BinaryOpMutation/BinaryOpMutation.sol` is not prefixed by the derived source root /Users/USER/Gambit/scripts
-   
- - Gambit prints an error and exits. - ### Example 6: Running Gambit using a configuration file To run gambit with a configuration file, use the `--json` argument: From 05247e5ebe3b33e64deccdfab8927ea066982689 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sun, 10 Sep 2023 13:34:51 -0700 Subject: [PATCH 141/200] Updated README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7e1d597e..6487d95e 100644 --- a/README.md +++ b/README.md @@ -329,7 +329,7 @@ For projects that have complex dependencies and imports, you may need to: gambit mutate --filename path/to/file.sol --solc_include_path PATH ``` -* **Use optimization:** To run the solidity compiler with optimizations +* **Use optimization:** To run the Solidity compiler with optimizations (`solc`'s `--optimize` argument), use `--solc_optimize`: ```bash @@ -442,7 +442,7 @@ The configuration file is a JSON file containing the command line arguments for In addition to specifying the command line arguments, you can list the specific mutants that you want to apply, the specific functions you wish to mutate, and -more. See the [`benchmark/config-jsons` directory][config-examples] for +more. See the [`benchmark/config-jsons` directory][config-examples] for examples. _**Note:** @@ -566,15 +566,15 @@ This has the following structure: | `--skip_validate` | only generate mutants without validating them by compilation | Gambit also supports _pass-through arguments_, which are arguments that are -passed directly to the solidity compiler. All pass-through arguments are +passed directly to the Solidity compiler. All pass-through arguments are prefixed with `solc_`: | Option | Description | | :-------------------- | :------------------------------------------------------------------------------ | +| `--solc_allow_paths` | passes a value to `solc`'s `--allow-paths` argument | | `--solc_base_path` | passes a value to `solc`'s `--base-path` argument | | `--solc_include_path` | passes a value to `solc`'s `--include-path` argument | | `--solc_remappings` | passes a value to directly to `solc`: this should be of the form `prefix=path`. | -| `--solc_allow_paths` | passes a value to `solc`'s `--allow-paths` argument | ## Mutation Operators Gambit implements the following mutation operators From 81fca9438812f2acd669f4f27f6fc68f9b67ec6c Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sun, 10 Sep 2023 13:43:06 -0700 Subject: [PATCH 142/200] merge again, first time didn't take --- README.md | 133 ------------------------------------------------------ 1 file changed, 133 deletions(-) diff --git a/README.md b/README.md index fedb1c6e..efaa98c4 100644 --- a/README.md +++ b/README.md @@ -192,27 +192,17 @@ Gambit has _unit tests_ and _regression tests_. Run unit tests with `cargo test`. _**Note:** -<<<<<<< HEAD All unit tests (`cargo test`) are currently run using `solc8.13`. Tests may fail if `solc` points at a different version of the compiler._ -======= -All tests (`cargo test`) are currently run using `solc8.13`. Your tests may fail - if your `solc` points at a different version of the compiler._ ->>>>>>> fix_readme Run regression tests with `scripts/run_regressions.sh`. This script runs `gambit mutate` on all configuration files in `benchmarks/config-jsons` and compares the output against the expected output in `resources/regressions`. _**Note:** -<<<<<<< HEAD To update regression tests (e.g., in case of new test cases, new mutation operators, altered mutation operators, etc), use the `scripts/make_regressions.sh` script._ -======= -All relative paths specified in a JSON configuration file are interpreted -to be relative to the configuration file's parent directory._ ->>>>>>> fix_readme @@ -346,14 +336,8 @@ $ gambit summary --mids 1 2 3 4 5 --short _**Note:** -<<<<<<< HEAD The `summary` command is currently experimental, and its output and interface may change in future releases._ -======= -The mutated file must be located within your current working directory or -one of its subdirectories. If you want to mutate code in an arbitrary directory, -use the `--sourceroot` option._ ->>>>>>> fix_readme ## Examples @@ -423,14 +407,8 @@ gambit mutate benchmarks/Ops/AOR/AOR.sol --num_mutants 3 Generated 3 mutants in 0.15 seconds -<<<<<<< HEAD ### Example 4: Viewing Gambit results By default, Gambit outputs all of its results in `gambit_out` : -======= -### Example 3: Viewing Gambit results -_**Note:** -This example assumes you've just completed Example 2._ ->>>>>>> fix_readme ``` gambit mutate benchmarks/Ops/AOR/AOR.sol --num_mutants 3 @@ -493,39 +471,9 @@ gambit mutate path/to/file.sol --solc_allow_paths base/path/dir If you want to run `solc` with optimizations enabled, use the `--solc_optimize` flag: -<<<<<<< HEAD ```bash gambit mutate path/to/file.sol --solc_optimize ``` -======= - ```bash - gambit mutate --filename path/to/file.sol \ - --solc_remappings @openzeppelin=node_modules/@openzeppelin @foo=node_modules/@foo - ``` - -* **Specify allow paths:** To include additional allowed paths via `solc`'s - [`--allow-paths`][allowed] argument, use `--solc_allow_paths`: - - ```bash - gambit mutate --filename path/to/file.sol \ - --solc_allow_paths PATH1 --solc_allow_paths PATH2 ... - ``` - -* **Specify include-path:** To make an additional source directory available - to the default import callback via `solc`'s [--include-path][included] argument, - use `--solc_include_path`: - - ```bash - gambit mutate --filename path/to/file.sol --solc_include_path PATH - ``` - -* **Use optimization:** To run the Solidity compiler with optimizations - (`solc`'s `--optimize` argument), use `--solc_optimize`: - - ```bash - gambit mutate --filename path/to/file.sol --solc_optimize - ``` ->>>>>>> fix_readme [remapping]: https://docs.soliditylang.org/en/v0.8.17/path-resolution.html#import-remapping [basepath]: https://docs.soliditylang.org/en/v0.8.17/path-resolution.html#base-path-and-include-paths @@ -533,87 +481,6 @@ gambit mutate path/to/file.sol --solc_optimize -<<<<<<< HEAD -======= -### Example 5: The `--sourceroot` option - -Gambit needs to track the location of source files that it mutates within a -project: for instance, imagine there are files `foo/Foo.sol` and `bar/Foo.sol`. -These are separate files, and their path prefixes are needed to determine this. -Gambit addresses this with the `--sourceroot` option: the source root indicates -to Gambit the root of the files that are being mutated, and all source file -paths (both original and mutated) are reported relative to this source root. - -_**Note:** -If Gambit encounters a source file that does not belong to the source root it -will print an error message and exit._ - -_When running `gambit mutate` with the `--filename` option, -source root defaults to the current working directory. -When running `gambit mutate` with the `--json` option, -source root defaults to the directory containing the configuration JSON._ - -Here are some examples of using the `--sourceroot` option. - -1. From the root of the Gambit repository, run: - - ```bash - gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -n 1 - cat gambit_out/mutants.log - find gambit_out/mutants -name "*.sol" - ``` - - This should output the following: - -
-   Generated 1 mutants in 0.13 seconds
-   1,BinaryOpMutation,benchmarks/BinaryOpMutation/BinaryOpMutation.sol,23:10, % ,*
-   gambit_out/mutants/1/benchmarks/BinaryOpMutation/BinaryOpMutation.sol
-   
- - The first command generates a single mutant, and its source path is relative to `.`, - the default source root. We can see that the reported paths in `mutants.log`, - and the mutant file path in `gambit_out/mutants/1`, are the relative to this - source root: `benchmarks/BinaryOpMutation/BinaryOpMutation.sol` - -2. Suppose we want our paths to be reported relative to - `benchmarks/BinaryOpMutation`. We can run - - ```bash - gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -n 1 --sourceroot benchmarks/BinaryOpMutation - cat gambit_out/mutants.log - find gambit_out/mutants -name "*.sol" - ``` - - which will output: - - -
-   Generated 1 mutants in 0.13 seconds
-   1,BinaryOpMutation,BinaryOpMutation.sol,23:10, % ,*
-   gambit_out/mutants/1/BinaryOpMutation.sol
-   
- - The reported filenames, and the offset path inside of - `gambit_out/mutants/1/`, are now relative to the source root that we - specified. - -3. Finally, suppose we use a source root that doesn't contain the source file: - - ```bash - gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -n 1 --sourceroot scripts - ``` - This will try to find the specified file inside of `scripts`, and since it - doesn't exist Gambit reports the error: - - -
-   [ERROR gambit] [!!] Illegal Configuration: Resolved filename `/Users/USER/Gambit/benchmarks/BinaryOpMutation/BinaryOpMutation.sol` is not prefixed by the derived source root /Users/USER/Gambit/scripts
-   
- - Gambit prints an error and exits. - ->>>>>>> fix_readme ### Example 6: Running Gambit using a configuration file To run gambit with a configuration file, use the `--json` argument: From 9b81ad74bddac7354e317a04d5b42e0eeb5456e6 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sun, 10 Sep 2023 15:34:11 -0700 Subject: [PATCH 143/200] tmp commit --- README.md | 295 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 165 insertions(+), 130 deletions(-) diff --git a/README.md b/README.md index efaa98c4..9c9125e1 100644 --- a/README.md +++ b/README.md @@ -185,32 +185,17 @@ responsible for mutating code. The `summary` command allows the user to get a high level summary of the results of an execution of `gambit mutate`. - -## Testing + +## The `mutate` Command -Gambit has _unit tests_ and _regression tests_. Run unit tests with `cargo -test`. +Gambit's `mutate` command expects mutation parameters. By default, mutation +parameters are specified with [command line +arguments](#running-mutate-with-command-line-arguments), but users can also +supply a [configuration file](#running-mutate-with-a-configuration-file) with +the `--json` argument. -_**Note:** -All unit tests (`cargo test`) are currently run using `solc8.13`. Tests may fail -if `solc` points at a different version of the compiler._ -Run regression tests with `scripts/run_regressions.sh`. This script runs -`gambit mutate` on all configuration files in `benchmarks/config-jsons` and -compares the output against the expected output in `resources/regressions`. - -_**Note:** -To update regression tests (e.g., in case of new test cases, new mutation -operators, altered mutation operators, etc), use the -`scripts/make_regressions.sh` script._ - - - -### The `mutate` command - -The `mutate` command expects a filename `gambit mutate file.sol` or a -configuration file `gambit mutate --json gambit_conf.json`. The `mutate` command -does the following: +When a user invokes `mutate`, Gambit does the following: 1. **Parse:** Gambit begins by parsing the specified Solidity files provided on command line or in the configuration file @@ -241,6 +226,141 @@ does the following: down sampled, the `mutate` writes the results to disk. This includes as well as specify several + +### Running `mutate` with Command Line Arguments + +By default the `mutate` command expects mutation parameters to be specified +on the command line. + +``` +gambit mutate FILENAME [ARGS...] +``` + +Gambit's `mutate` CLI supports the following options: + +TODO: Fix this + +| Option | Description | +| :------------------- | :--------------------------------------------------------------------------------------------------------------------------- | +| `--outdir` | specify Gambit's output directory (defaults to `gambit_out`) | +| `--no_overwrite` | do not overwrite an output directory; if the output directory exists, print an error and exit | +| `--num_mutants` | randomly downsample to a given number of mutants. | +| `--seed` | specify a random seed. For reproducibility, Gambit defaults to using the seed `0`. To randomize the seed use `--random_seed` | +| `--random_seed` | use a random seed. Note that this overrides any value specified by `--seed` | +| `--contract` | specify a specific contract name to mutate; by default mutate all contracts | +| `--functions` | specify one or more functions to mutate; by default mutate all functions | +| `--mutations` | specify one or more mutation operators to use; only generates mutants that are created using the specified operators | +| `--skip_validate` | only generate mutants without validating them by compilation | +| `--solc_allow_paths` | passes a value to `solc`'s `--allow-paths` argument | + + + + + + +### Running `mutate` with a Configuration File + +Gambit allows the user to specify mutation parameters in a JSON file, allowing +the user to store complex parameters, or even multiple parameters at once. +To run `mutate` with a configuration file, use: + +``` +gambit mutate --json CONFIGURATION_JSON +``` + + +A set of mutate parameters are stored as a JSON object mapping option names to values: + +```json +{ + "filename": "contracts/ERC20.sol", + "outdir": "gambit_out", + "no_overwrite": true, + "num_mutants": 5, + "import_paths": ["contracts/imports"], + "import_maps": ["@openzeppelin=node_modules/@openzeppelin"] +} +``` + +Configuration files allow you to save complex configurations and perform +multiple mutations at once. Gambit uses a simple JSON object format to store +mutation options, where each `--option VALUE` specified on the CLI is +represented as a `"option": VALUE` key/value pair in the JSON object. Boolean +`--flag`s are enabled by storing them as true: `"flag": true`. For instance, +`--no_overwrite` would be written as `"no_overwrite": true`. + +Gambit also supports using multiple configurations in the same file: instead of +a single JSON object, your configuration file should contain an array of objects: + +```json +[ + { + "filename": "Foo.sol", + "contract": "C", + "functions": ["bar", "baz"], + "solc": "solc8.12", + "solc_optimize": true + }, + { + "filename": "Blip.sol", + "contract": "D", + "functions": ["bang"], + "solc": "solc8.12" + "mutations": [ + "binary-op-mutation", + "swap-arguments-operator-mutation" + ] + } +] +``` + +This configuration file will perform all mutations on `Foo.sol`'s functions +`bar` and `baz` in the contract `C`, and only `binary-op-mutation` and +`swap-arguments-operator-mutation` mutations on the function `bang` in the +contract `D`. Both will compile using the Solidity compiler version `solc5.12`. + +#### Paths in Configuration Files + +Relative paths in a Gambit configuration file are _relative to the parent +directory of the configuration file_. So if the JSON file listed above was moved +to the `benchmarks/` directory the `"filename"` would need to be updated to +`BinaryOpMutation/BinaryOpMutation.sol`. + + +## Results Directory + +`gambit mutate` produces all results in an output directory (default: +`gambit_out`). Here is an example: + +```bash +gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -n 5 +tree gambit_out -L 2 +``` + +
+Generated 5 mutants in 0.15 seconds
+
+gambit_out
+├── gambit_results.json
+├── input_json
+├── mutants
+│   ├── 1
+│   ├── 2
+│   ├── 3
+│   ├── 4
+│   └── 5
+└── mutants.log
+
+
+ +This has the following structure: ++ `gambit_results.json`: a JSON file with detailed results ++ `input_json/`: intermediate files produced by `solc` that are used during mutation ++ `mutants/`: exported mutants. Each mutant is in its own directory named after + its mutant ID (mid) 1, 2, 3, ... ++ `mutants.log`: a log file with all mutant information. This is similar to + `results.json` but in a different format and with different information + #### Specifying Import Paths and Remappings Gambit resolves imports while parsing, and this requires that you specify any @@ -339,6 +459,27 @@ _**Note:** The `summary` command is currently experimental, and its output and interface may change in future releases._ + +## Testing + +Gambit has _unit tests_ and _regression tests_. Run unit tests with `cargo +test`. + +_**Note:** +All unit tests (`cargo test`) are currently run using `solc8.13`. Tests may fail +if `solc` points at a different version of the compiler._ + +Run regression tests with `scripts/run_regressions.sh`. This script runs +`gambit mutate` on all configuration files in `benchmarks/config-jsons` and +compares the output against the expected output in `resources/regressions`. + +_**Note:** +To update regression tests (e.g., in case of new test cases, new mutation +operators, altered mutation operators, etc), use the +`scripts/make_regressions.sh` script._ + + + ## Examples In this section we provide examples of how to run Gambit. We provide more @@ -510,103 +651,6 @@ _**Note:** Any paths provided by the configuration file are resolved relative to the configuration file's parent directory._ - -## Configuration Files -Configuration files allow you to save complex configurations and perform -multiple mutations at once. Gambit uses a simple JSON object format to store -mutation options, where each `--option VALUE` specified on the CLI is -represented as a `"option": VALUE` key/value pair in the JSON object. Boolean -`--flag`s are enabled by storing them as true: `"flag": true`. For instance, -`--no_overwrite` would be written as `"no_overwrite": true`. - -As an example, consider the command from Example 1: - -```bash -gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -``` - -To execute this using a configuration file you would write the following to -`example-1.json` to the root of this repository and run `gambit mutate --json -example-1.json` - -```json -{ - "filename": "benchmarks/BinaryOpMutation/BinaryOpMutation.sol" -} -``` - -Gambit also supports using multiple configurations in the same file: instead of -a single JSON object, your configuration file should contain an array of objects: - -```json -[ - { - "filename": "Foo.sol", - "contract": "C", - "functions": ["bar", "baz"], - "solc": "solc8.12", - "solc_optimize": true - }, - { - "filename": "Blip.sol", - "contract": "D", - "functions": ["bang"], - "solc": "solc8.12" - "mutations": [ - "binary-op-mutation", - "swap-arguments-operator-mutation" - ] - } -] -``` - -This configuration file will perform all mutations on `Foo.sol`'s functions -`bar` and `baz` in the contract `C`, and only `binary-op-mutation` and -`swap-arguments-operator-mutation` mutations on the function `bang` in the -contract `D`. Both will compile using the Solidity compiler version `solc5.12`. - -### Paths in Configuration Files - -Relative paths in a Gambit configuration file are _relative to the parent -directory of the configuration file_. So if the JSON file listed above was moved -to the `benchmarks/` directory the `"filename"` would need to be updated to -`BinaryOpMutation/BinaryOpMutation.sol`. - - -## Results Directory - -`gambit mutate` produces all results in an output directory (default: -`gambit_out`). Here is an example: - -```bash -gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -n 5 -tree gambit_out -L 2 -``` - -
-Generated 5 mutants in 0.15 seconds
-
-gambit_out
-├── gambit_results.json
-├── input_json
-├── mutants
-│   ├── 1
-│   ├── 2
-│   ├── 3
-│   ├── 4
-│   └── 5
-└── mutants.log
-
-
- -This has the following structure: -+ `gambit_results.json`: a JSON file with detailed results -+ `input_json/`: intermediate files produced by `solc` that are used during mutation -+ `mutants/`: exported mutants. Each mutant is in its own directory named after - its mutant ID (mid) 1, 2, 3, ... -+ `mutants.log`: a log file with all mutant information. This is similar to - `results.json` but in a different format and with different information - ## CLI Options @@ -625,17 +669,8 @@ This has the following structure: | `--functions` | specify one or more functions to mutate; by default mutate all functions | | `--mutations` | specify one or more mutation operators to use; only generates mutants that are created using the specified operators | | `--skip_validate` | only generate mutants without validating them by compilation | +| `--solc_allow_paths` | passes a value to `solc`'s `--allow-paths` argument | -Gambit also supports _pass-through arguments_, which are arguments that are -passed directly to the Solidity compiler. All pass-through arguments are -prefixed with `solc_`: - -| Option | Description | -| :-------------------- | :------------------------------------------------------------------------------ | -| `--solc_allow_paths` | passes a value to `solc`'s `--allow-paths` argument | -| `--solc_base_path` | passes a value to `solc`'s `--base-path` argument | -| `--solc_include_path` | passes a value to `solc`'s `--include-path` argument | -| `--solc_remappings` | passes a value to directly to `solc`: this should be of the form `prefix=path`. | ## Mutation Operators Gambit implements the following mutation operators From 39619d883b6e7f5184322600c4508b9224e2eb39 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sun, 10 Sep 2023 16:01:26 -0700 Subject: [PATCH 144/200] README --- README.md | 90 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 9c9125e1..fb79de30 100644 --- a/README.md +++ b/README.md @@ -188,14 +188,15 @@ a high level summary of the results of an execution of `gambit mutate`. ## The `mutate` Command -Gambit's `mutate` command expects mutation parameters. By default, mutation -parameters are specified with [command line -arguments](#running-mutate-with-command-line-arguments), but users can also -supply a [configuration file](#running-mutate-with-a-configuration-file) with -the `--json` argument. +Gambit's `mutate` command expects user-provided _mutation parameters_ describing +which files to mutate, which mutation operators to apply, and several other +options. By default, these mutation parameters are specified by the user with +[command line arguments](#running-mutate-with-command-line-arguments). To handle +more complex use cases, and to allow for easy reproducibility, Gambit +can read mutation parameters from a [JSON configuration +file](#running-mutate-with-a-configuration-file) with the `--json` argument. - -When a user invokes `mutate`, Gambit does the following: +The `mutate` command does the following: 1. **Parse:** Gambit begins by parsing the specified Solidity files provided on command line or in the configuration file @@ -236,6 +237,10 @@ on the command line. gambit mutate FILENAME [ARGS...] ``` + + +#### `mutate` CLI Arguments + Gambit's `mutate` CLI supports the following options: TODO: Fix this @@ -254,9 +259,6 @@ TODO: Fix this | `--solc_allow_paths` | passes a value to `solc`'s `--allow-paths` argument | - - - ### Running `mutate` with a Configuration File @@ -269,7 +271,8 @@ gambit mutate --json CONFIGURATION_JSON ``` -A set of mutate parameters are stored as a JSON object mapping option names to values: +A set of mutation parameters are stored as a JSON object mapping option names to +values: ```json { @@ -277,20 +280,51 @@ A set of mutate parameters are stored as a JSON object mapping option names to v "outdir": "gambit_out", "no_overwrite": true, "num_mutants": 5, - "import_paths": ["contracts/imports"], - "import_maps": ["@openzeppelin=node_modules/@openzeppelin"] + "import_paths": ["imports1", "imports2"], + "import_maps": ["a=x/a", "b=x/b"] } ``` -Configuration files allow you to save complex configurations and perform -multiple mutations at once. Gambit uses a simple JSON object format to store -mutation options, where each `--option VALUE` specified on the CLI is -represented as a `"option": VALUE` key/value pair in the JSON object. Boolean -`--flag`s are enabled by storing them as true: `"flag": true`. For instance, -`--no_overwrite` would be written as `"no_overwrite": true`. +Each key in the above JSON object corresponds to a [CLI +argument](#mutate-cli-arguments) describe above with the following exceptions: + +1. `--import_path` vs `"import_paths"`: The CLI expects import paths to be given + one at a time: + + ``` + gambit mutate --import_path path1 --import_path path2 + ``` + + The JSON format takes a vector of import paths: -Gambit also supports using multiple configurations in the same file: instead of -a single JSON object, your configuration file should contain an array of objects: + ```json + { + "import_paths": ["imports1", "imports2"] + } + ``` + + _Notice that `--import_path` is singular and `"import_paths"` is plural._ + +2. `--import_map` vs `"import_maps"`: Like import paths, The CLI expects import + maps to be given one at a time: + + ``` + gambit mutate --import_map a=x/a --import_map b=x/b + ``` + + The JSON format takes a vector of import maps: + + ```json + { + "import_maps": ["a=x/a", "b=x/b"] + } + ``` + + _Notice that `--import_map` is singular and `"import_maps"` is plural._ + +Gambit also supports specifying multiple sets of mutation parameters in a file. +Instead of a single JSON object, your configuration file should contain an +array of objects: ```json [ @@ -306,25 +340,15 @@ a single JSON object, your configuration file should contain an array of objects "contract": "D", "functions": ["bang"], "solc": "solc8.12" - "mutations": [ - "binary-op-mutation", - "swap-arguments-operator-mutation" - ] } ] ``` -This configuration file will perform all mutations on `Foo.sol`'s functions -`bar` and `baz` in the contract `C`, and only `binary-op-mutation` and -`swap-arguments-operator-mutation` mutations on the function `bang` in the -contract `D`. Both will compile using the Solidity compiler version `solc5.12`. - #### Paths in Configuration Files Relative paths in a Gambit configuration file are _relative to the parent -directory of the configuration file_. So if the JSON file listed above was moved -to the `benchmarks/` directory the `"filename"` would need to be updated to -`BinaryOpMutation/BinaryOpMutation.sol`. +directory of the configuration file_. This allows Gambit to be run from any +location without affecting the build configuration. ## Results Directory From 36ad3d292d306cd5fae8477fd3da4cfe7936d573 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sun, 10 Sep 2023 16:06:35 -0700 Subject: [PATCH 145/200] README --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fb79de30..07808a09 100644 --- a/README.md +++ b/README.md @@ -247,18 +247,22 @@ TODO: Fix this | Option | Description | | :------------------- | :--------------------------------------------------------------------------------------------------------------------------- | -| `--outdir` | specify Gambit's output directory (defaults to `gambit_out`) | -| `--no_overwrite` | do not overwrite an output directory; if the output directory exists, print an error and exit | -| `--num_mutants` | randomly downsample to a given number of mutants. | -| `--seed` | specify a random seed. For reproducibility, Gambit defaults to using the seed `0`. To randomize the seed use `--random_seed` | -| `--random_seed` | use a random seed. Note that this overrides any value specified by `--seed` | | `--contract` | specify a specific contract name to mutate; by default mutate all contracts | | `--functions` | specify one or more functions to mutate; by default mutate all functions | +| `--log_invalid` | log any invalid mutants found during validation | | `--mutations` | specify one or more mutation operators to use; only generates mutants that are created using the specified operators | +| `--no_export` | do not export mutant sources to output directory | +| `--no_overwrite` | do not overwrite an output directory; if the output directory exists, print an error and exit | +| `--num_mutants` | randomly downsample to a given number of mutants. | +| `--outdir` | specify Gambit's output directory (defaults to `gambit_out`) | +| `--random_seed` | use a random seed. Note that this overrides any value specified by `--seed` | +| `--seed` | specify a random seed. For reproducibility, Gambit defaults to using the seed `0`. To randomize the seed use `--random_seed` | | `--skip_validate` | only generate mutants without validating them by compilation | +| `--solc` | specify a `solc` binary to use during validation | | `--solc_allow_paths` | passes a value to `solc`'s `--allow-paths` argument | + ### Running `mutate` with a Configuration File From e34912448a5b3412220b8a6e5d7e6046aae60317 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sun, 10 Sep 2023 16:14:12 -0700 Subject: [PATCH 146/200] README --- README.md | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 07808a09..e3667ba0 100644 --- a/README.md +++ b/README.md @@ -361,7 +361,7 @@ location without affecting the build configuration. `gambit_out`). Here is an example: ```bash -gambit mutate -f benchmarks/BinaryOpMutation/BinaryOpMutation.sol -n 5 +gambit mutate benchmarks/Ops/AOR/AOR.sol -n 5 tree gambit_out -L 2 ``` @@ -404,7 +404,7 @@ invocation is `solc C.sol @openzeppelin=node_modules/@openzeppelin`, then the Gambit invocation becomes `gambit mutate C.sol -m @openzeppelin=node_modules/@openzeppelin`. -#### Performing Mutant Validation +#### Mutant Validation Gambit uses provided import paths and import remappings to invoke `solc`. For instance, if you invoke `gambit mutate C.sol -I A/ -I B/ -I C/ -m @x=y/@x`, then @@ -417,12 +417,19 @@ command's `--solc_allow_paths` argument. The `summary` command allows the user to see a summary of a `mutate` run: +``` +gambit mutate benchmarks/Ops/AOR/AOR.sol +``` +
-$ gambit mutate benchmarks/Ops/AOR/AOR.sol
 Generated 27 mutants in 0.41 seconds
+
-$ gambit summary - +``` +gambit summary +``` + +
 STD:      5 ( 18.52%)
 AOR:     22 ( 81.48%)
 ---------------------
@@ -431,9 +438,11 @@ TOT:     27 (100.00%)
 
 To print the diffs of specific mutants, pass the `--mids` option:
 
-
+```
 $ gambit summary --mids 1 2
-
+```
+
+
              === Mutant ID: 1 [StatementDeletion] ===
 
 --- original
@@ -474,8 +483,11 @@ Path: mutants/2/benchmarks/Ops/AOR/AOR.sol
 
 Pass the `--short` option to print a shorter summary of each mutant:
 
-
+```
 $ gambit summary --mids 1 2 3 4 5 --short
+```
+
+
 (1) STD [mutants/1/benchmarks/Ops/AOR/AOR.sol@13:9] return a + b -> assert(true)
 (2) AOR [mutants/2/benchmarks/Ops/AOR/AOR.sol@13:18] + -> -
 (3) AOR [mutants/3/benchmarks/Ops/AOR/AOR.sol@13:18] + -> *

From ea407e29312c1dd8a8360c93bcaec1770ea6509c Mon Sep 17 00:00:00 2001
From: Ben Kushigian 
Date: Sun, 10 Sep 2023 16:19:18 -0700
Subject: [PATCH 147/200] README

---
 README.md | 47 ++++++++++++++++++++++++-----------------------
 1 file changed, 24 insertions(+), 23 deletions(-)

diff --git a/README.md b/README.md
index e3667ba0..42d77a12 100644
--- a/README.md
+++ b/README.md
@@ -354,6 +354,30 @@ Relative paths in a Gambit configuration file are _relative to the parent
 directory of the configuration file_. This allows Gambit to be run from any
 location without affecting the build configuration.
 
+### Import Paths and Remappings
+
+Gambit resolves imports while parsing, and this requires that you specify any
+import paths and remappings that you would pass to `solc`.
+
+Instead of `solc`'s `--base-name` and `--input-path` arguments, Gambit uses
+a simpler scheme and replaces both of these with `--import_path` (`-I`). For instance,
+if the `solc` invocation is `solc C.sol --base-name . --input-path modules` ,
+then the Gambit invocation becomes `gambit mutate C.sol -I . -I modules`.
+
+Remappings are specified with the `--import_map` (`-m`) argument. If the `solc`
+invocation is `solc C.sol @openzeppelin=node_modules/@openzeppelin`, then the
+Gambit invocation becomes `gambit mutate C.sol -m
+@openzeppelin=node_modules/@openzeppelin`.
+
+### Mutant Validation
+
+Gambit uses provided import paths and import remappings to invoke `solc`. For
+instance, if you invoke `gambit mutate C.sol -I A/ -I B/ -I C/ -m @x=y/@x`, then
+Gambit will validate a generated mutant by calling
+`solc MutatedC.sol --base-path A/ --include-path B/ --include-path C/ @x=y/@x`.
+If you need to specify a solc `--allow-paths` argument, use the `mutate`
+command's `--solc_allow_paths` argument.
+
 
 ## Results Directory
 
@@ -389,29 +413,6 @@ This has the following structure:
 + `mutants.log`: a log file with all mutant information. This is similar to
   `results.json` but in a different format and with different information
 
-#### Specifying Import Paths and Remappings
-
-Gambit resolves imports while parsing, and this requires that you specify any
-import paths and remappings that you would pass to `solc`.
-
-Instead of `solc`'s `--base-name` and `--input-path` arguments, Gambit uses
-a simpler scheme and replaces both of these with `--import_path` (`-I`). For instance,
-if the `solc` invocation is `solc C.sol --base-name . --input-path modules` ,
-then the Gambit invocation becomes `gambit mutate C.sol -I . -I modules`.
-
-Remappings are specified with the `--import_map` (`-m`) argument. If the `solc`
-invocation is `solc C.sol @openzeppelin=node_modules/@openzeppelin`, then the
-Gambit invocation becomes `gambit mutate C.sol -m
-@openzeppelin=node_modules/@openzeppelin`.
-
-#### Mutant Validation
-
-Gambit uses provided import paths and import remappings to invoke `solc`. For
-instance, if you invoke `gambit mutate C.sol -I A/ -I B/ -I C/ -m @x=y/@x`, then
-Gambit will validate a generated mutant by calling
-`solc MutatedC.sol --base-path A/ --include-path B/ --include-path C/ @x=y/@x`.
-If you need to specify a solc `--allow-paths` argument, use the `mutate`
-command's `--solc_allow_paths` argument.
 
 ### The `summary` command
 

From 497fe4f63f6ca8b725dbcacb563da02d75bc9dd2 Mon Sep 17 00:00:00 2001
From: Ben Kushigian 
Date: Sun, 10 Sep 2023 16:22:30 -0700
Subject: [PATCH 148/200] README

---
 README.md | 82 ++++++++++++++++++++++++++++---------------------------
 1 file changed, 42 insertions(+), 40 deletions(-)

diff --git a/README.md b/README.md
index 42d77a12..c0d631fb 100644
--- a/README.md
+++ b/README.md
@@ -180,9 +180,10 @@ manually place on your path or invoke directly.
 
 ## Usage
 
-Gambit has two main commands: `mutate` and `summary`. The `mutate` command is
-responsible for mutating code. The `summary` command allows the user to get
-a high level summary of the results of an execution of `gambit mutate`.
+Gambit has two main commands: the [`mutate` command](#the-mutate-command) and 
+the [`summary` command](#the-summary-command). The `mutate` command is
+responsible for mutating code. The `summary` command allows the user to get a
+high level summary of the results of an execution of `gambit mutate`.
 
 
 
@@ -378,43 +379,8 @@ Gambit will validate a generated mutant by calling
 If you need to specify a solc `--allow-paths` argument, use the `mutate`
 command's `--solc_allow_paths` argument.
 
-
-## Results Directory
-
-`gambit mutate` produces all results in an output directory (default:
-`gambit_out`). Here is an example:
-
-```bash
-gambit mutate benchmarks/Ops/AOR/AOR.sol -n 5
-tree gambit_out -L 2
-```
-
-
-Generated 5 mutants in 0.15 seconds
-
-gambit_out
-├── gambit_results.json
-├── input_json
-├── mutants
-│   ├── 1
-│   ├── 2
-│   ├── 3
-│   ├── 4
-│   └── 5
-└── mutants.log
-
-
- -This has the following structure: -+ `gambit_results.json`: a JSON file with detailed results -+ `input_json/`: intermediate files produced by `solc` that are used during mutation -+ `mutants/`: exported mutants. Each mutant is in its own directory named after - its mutant ID (mid) 1, 2, 3, ... -+ `mutants.log`: a log file with all mutant information. This is similar to - `results.json` but in a different format and with different information - - -### The `summary` command + +## The `summary` command The `summary` command allows the user to see a summary of a `mutate` run: @@ -500,6 +466,42 @@ _**Note:** The `summary` command is currently experimental, and its output and interface may change in future releases._ + +## Results Directory + +`gambit mutate` produces all results in an output directory (default: +`gambit_out`). Here is an example: + +```bash +gambit mutate benchmarks/Ops/AOR/AOR.sol -n 5 +tree gambit_out -L 2 +``` + +
+Generated 5 mutants in 0.15 seconds
+
+gambit_out
+├── gambit_results.json
+├── input_json
+├── mutants
+│   ├── 1
+│   ├── 2
+│   ├── 3
+│   ├── 4
+│   └── 5
+└── mutants.log
+
+
+ +This has the following structure: ++ `gambit_results.json`: a JSON file with detailed results ++ `input_json/`: intermediate files produced by `solc` that are used during mutation ++ `mutants/`: exported mutants. Each mutant is in its own directory named after + its mutant ID (mid) 1, 2, 3, ... ++ `mutants.log`: a log file with all mutant information. This is similar to + `results.json` but in a different format and with different information + + ## Testing From 4caf73509271eac77935d7c22f365d1123de6596 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sun, 10 Sep 2023 16:25:23 -0700 Subject: [PATCH 149/200] Removed examples from README --- README.md | 191 ------------------------------------------------------ 1 file changed, 191 deletions(-) diff --git a/README.md b/README.md index c0d631fb..4ca5fff3 100644 --- a/README.md +++ b/README.md @@ -523,197 +523,6 @@ operators, altered mutation operators, etc), use the -## Examples - -In this section we provide examples of how to run Gambit. We provide more -complete documentation in the [Configuration Files](#configuration-files) and -[CLI-Options](#cli-options) sections below. Unless otherwise noted, examples -use code from -[benchmarks/](https://github.com/Certora/gambit/tree/master/benchmarks) and are -run from the root of the [Gambit repository](https://github.com/Certora/gambit). - -### Example 1: Mutating a single file - -To mutate a single file, call `gambit mutate` with the filename as an argument: - -```bash -gambit mutate benchmarks/Ops/AOR/AOR.sol -``` - -
-Generated 27 mutants in 0.42 seconds
-
- -### Example 2: Running from a different directory - -Mutated files must be contained in an import path. Gambit uses the current -working directory (`"."`) as the default import path. If the mutated file is not -located in your current working directory (or one of its subdirectories), you -will need to specify an import path that contains the file. For instance, -suppose you wanted to run Example 1, but from a `tmp` directory contained at the -root of this repository: - - -``` -mkdir tmp -cd tmp -gambit mutate ../benchmarks/Ops/AOR/AOR.sol -``` - -
-Error: File Not In Import Paths
-   Could not mutate file /Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol:
-   File could not be resolved against any provided import paths.
-   Import Paths: ["/Users/benku/Gambit/tmp"]
-
- -To fix this errory, specify `..` as an import path: - -``` -gambit mutate ../benchmarks/Ops/AOR/AOR.sol -I .. -``` - -
-Generated 27 mutants in 0.42 seconds
-
- -### Example 3: Mutating and downsampling - -To randomly downsample the number of mutants generated, use the `--num_mutants`. -For instance, if you only wanted 3 of the 27 mutants generated from Example 1, -you would run: - -``` -gambit mutate benchmarks/Ops/AOR/AOR.sol --num_mutants 3 -``` - -
-Generated 3 mutants in 0.15 seconds
-
- -### Example 4: Viewing Gambit results -By default, Gambit outputs all of its results in `gambit_out` : - -``` -gambit mutate benchmarks/Ops/AOR/AOR.sol --num_mutants 3 -``` - -
-Generated 3 mutants in 0.15 seconds
-
- -```bash -tree -L 2 gambit_out -``` - -
-gambit_out
-├── gambit_results.json
-├── mutants
-│   ├── 1
-│   ├── 2
-│   └── 3
-└── mutants.log
-
- -See the [Results Directory](#results-directory) section for a detailed -explanation of this layout. The `gambit summary` command prints high level -statistics of the output of a `mutate` command: - -``` -gambit summary -``` - -
-AOR:      3 (100.00%)
----------------------
-TOT:      3 (100.00%)
-
- -You can also pretty-print particular mutant diffs by specifying their mutant ids -with `--mids`: - -![The output of `gambit summary --mids 1`](doc/gambit-summary-mids.png) - -For shorter summaries, use the `--short` option: - -![The output of `gambit summary --mids 1 2 3 --short`](doc/gambit-summary-mids-short.png) - - -### Example 5: Specifying `solc` pass-through arguments - -The Solidity compiler (`solc`) may need some extra information to successfully -run on a file or a project. Gambit enables this with _pass-through arguments_ -that, as the name suggests, are passed directly through to the `solc` compiler. - -For projects that have complex dependencies and imports, you may need to -specify the `--allow-path` argument: - -```bash -gambit mutate path/to/file.sol --solc_allow_paths base/path/dir -``` - -If you want to run `solc` with optimizations enabled, use the `--solc_optimize` flag: - -```bash -gambit mutate path/to/file.sol --solc_optimize -``` - -[remapping]: https://docs.soliditylang.org/en/v0.8.17/path-resolution.html#import-remapping -[basepath]: https://docs.soliditylang.org/en/v0.8.17/path-resolution.html#base-path-and-include-paths -[allowed]: https://docs.soliditylang.org/en/v0.8.17/path-resolution.html#allowed-paths - - - -### Example 6: Running Gambit using a configuration file - -To run gambit with a configuration file, use the `--json` argument: -```bash -gambit mutate --json benchmarks/config-jsons/test1.json -``` - -The configuration file is a JSON file containing the command line arguments for -`gambit` and additional configuration options: - -```json -{ - "filename": "../10Power/TenPower.sol", - "sourceroot": "..", - "solc_remappings": [ - "@openzeppelin=node_modules/@openzeppelin" - ], -} -``` - -In addition to specifying the command line arguments, you can list the specific -mutants that you want to apply, the specific functions you wish to mutate, and -more. See the [`benchmark/config-jsons` directory][config-examples] for -examples. - -_**Note:** -Any paths provided by the configuration file are resolved relative to the -configuration file's parent directory._ - - -## CLI Options - - `gambit mutate` supports the following options; for a comprehensive list, run - `gambit mutate --help`: - - -| Option | Description | -| :-------------------- | :--------------------------------------------------------------------------------------------------------------------------- | -| `-o`, `--outdir` | specify Gambit's output directory (defaults to `gambit_out`) | -| `--no_overwrite` | do not overwrite an output directory; if the output directory exists, print an error and exit | -| `-n`, `--num_mutants` | randomly downsample to a given number of mutants. | -| `-s`, `--seed` | specify a random seed. For reproducibility, Gambit defaults to using the seed `0`. To randomize the seed use `--random_seed` | -| `--random_seed` | use a random seed. Note that this overrides any value specified by `--seed` | -| `--contract` | specify a specific contract name to mutate; by default mutate all contracts | -| `--functions` | specify one or more functions to mutate; by default mutate all functions | -| `--mutations` | specify one or more mutation operators to use; only generates mutants that are created using the specified operators | -| `--skip_validate` | only generate mutants without validating them by compilation | -| `--solc_allow_paths` | passes a value to `solc`'s `--allow-paths` argument | - ## Mutation Operators Gambit implements the following mutation operators From e2055254ab8b57d50a653829bd227b3e5b3ed8e6 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Sun, 10 Sep 2023 18:19:24 -0700 Subject: [PATCH 150/200] Updated CLI to --import_maps and --import_paths --- README.md | 55 ++++++++++-------------------------------------------- src/cli.rs | 4 ++-- 2 files changed, 12 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 4ca5fff3..10ac3f87 100644 --- a/README.md +++ b/README.md @@ -290,42 +290,6 @@ values: } ``` -Each key in the above JSON object corresponds to a [CLI -argument](#mutate-cli-arguments) describe above with the following exceptions: - -1. `--import_path` vs `"import_paths"`: The CLI expects import paths to be given - one at a time: - - ``` - gambit mutate --import_path path1 --import_path path2 - ``` - - The JSON format takes a vector of import paths: - - ```json - { - "import_paths": ["imports1", "imports2"] - } - ``` - - _Notice that `--import_path` is singular and `"import_paths"` is plural._ - -2. `--import_map` vs `"import_maps"`: Like import paths, The CLI expects import - maps to be given one at a time: - - ``` - gambit mutate --import_map a=x/a --import_map b=x/b - ``` - - The JSON format takes a vector of import maps: - - ```json - { - "import_maps": ["a=x/a", "b=x/b"] - } - ``` - - _Notice that `--import_map` is singular and `"import_maps"` is plural._ Gambit also supports specifying multiple sets of mutation parameters in a file. Instead of a single JSON object, your configuration file should contain an @@ -361,22 +325,23 @@ Gambit resolves imports while parsing, and this requires that you specify any import paths and remappings that you would pass to `solc`. Instead of `solc`'s `--base-name` and `--input-path` arguments, Gambit uses -a simpler scheme and replaces both of these with `--import_path` (`-I`). For instance, -if the `solc` invocation is `solc C.sol --base-name . --input-path modules` , -then the Gambit invocation becomes `gambit mutate C.sol -I . -I modules`. +a simpler scheme and replaces both of these with a single `--import_paths` +argument. For instance, if the `solc` invocation is `solc C.sol --base-name . +--input-path modules` , then the Gambit invocation becomes `gambit mutate C.sol +--import_paths . modules`. -Remappings are specified with the `--import_map` (`-m`) argument. If the `solc` +Remappings are specified with the `--import_maps` argument. If the `solc` invocation is `solc C.sol @openzeppelin=node_modules/@openzeppelin`, then the -Gambit invocation becomes `gambit mutate C.sol -m +Gambit invocation becomes `gambit mutate C.sol --import_maps @openzeppelin=node_modules/@openzeppelin`. ### Mutant Validation Gambit uses provided import paths and import remappings to invoke `solc`. For -instance, if you invoke `gambit mutate C.sol -I A/ -I B/ -I C/ -m @x=y/@x`, then -Gambit will validate a generated mutant by calling -`solc MutatedC.sol --base-path A/ --include-path B/ --include-path C/ @x=y/@x`. -If you need to specify a solc `--allow-paths` argument, use the `mutate` +instance, if you invoke `gambit mutate C.sol --import_paths A B C --import_maps +@x=y/@x`, then Gambit will validate a generated mutant by calling `solc +MutatedC.sol --base-path A/ --include-path B/ --include-path C/ @x=y/@x`. If +you need to specify a solc `--allow-paths` argument, use the `mutate` command's `--solc_allow_paths` argument. diff --git a/src/cli.rs b/src/cli.rs index b594c04e..d087db04 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -156,12 +156,12 @@ pub struct MutateParams { pub contract: Option, /// Specify a directory to search for solidity files during import - #[arg(long = "import_path", short = 'I', conflicts_with = "json")] + #[arg(long, num_args(1..), conflicts_with = "json")] #[serde(default = "default_import_paths")] pub import_paths: Vec, /// Map directory to search for solidity files [format: map=path] - #[arg(long = "import_map", short = 'm', conflicts_with = "json")] + #[arg(long, num_args(1..), conflicts_with = "json")] #[serde(default = "default_import_paths")] pub import_maps: Vec, From 0927a7933537508214cda962856557f66885f310 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 10:17:41 -0700 Subject: [PATCH 151/200] Updated Rust docs to say --import_paths --import_maps --- src/main.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5f249f50..bb7cb804 100644 --- a/src/main.rs +++ b/src/main.rs @@ -460,7 +460,7 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box p.to_str().unwrap().to_string(), Err(_) => { @@ -475,11 +475,7 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box p.to_str().unwrap().to_string(), @@ -518,7 +514,7 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box Date: Mon, 11 Sep 2023 13:23:22 -0700 Subject: [PATCH 152/200] README --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 10ac3f87..67541023 100644 --- a/README.md +++ b/README.md @@ -492,18 +492,18 @@ operators, altered mutation operators, etc), use the ## Mutation Operators Gambit implements the following mutation operators -| Mutation Operator | Description | Example | -| ------------------------------------ | -------------------------------------------------------- | ---------------------------------------------- | -| **binary-op-mutation** | Replace a binary operator with another | `a+b` -> `a-b` | -| **unary-operator-mutation** | Replace a unary operator with another | `~a` -> `-a` | -| **require-mutation** | Alter the condition of a `require` statement | `require(some_condition())` -> `require(true)` | -| **assignment-mutation** | Replaces the right hand side of an assignment | `x = foo();` -> `x = -1;` | -| **delete-expression-mutation** | Replaces an expression with a no-op (`assert(true)`) | `foo();` -> `assert(true);` | -| **if-cond-mutation** | Mutate the conditional of an `if` statement | `if (C) {...}` -> `if (true) {...}` | -| **swap-arguments-operator-mutation** | Swap the order of non-commutative operators | `a - b` -> `b - a` | -| **elim-delegate-mutation** | Change a `delegatecall()` to a `call()` | `_c.delegatecall(...)` -> `_c.call(...)` | -| **function-call-mutation** | **(Disabled)** Changes arguments of a function | `add(a, b)` -> `add(a, a)` | -| **swap-arguments-function-mutation** | **(Disabled)** Swaps the order of a function's arguments | `add(a, b)` -> `add(b, a)` | +| Mutation Operator | Description | Example | +| ----------------------------------- | --------------------------------------------------------------- | -------------------------------------------- | +| **arithmetic-operator-replacement** | Replace an arithmetic operator with another | `a + b` -> `a - b` | +| **bitwise-operator-replacement** | Replace a bitwise operator with another | `a ^ b` -> `a & b` | +| **elim-delegate-call** | Change a `delegatecall()` to a `call()` | `_c.delegatecall(...)` -> `_c.call(...)` | +| **expression-value-repalcement** | **(Experimental)** Replace expression with a value of same type | `a + b * 3` -> `0` | +| **literal-value-replacement** | Replace a literal value with another | `1` -> `0` | +| **logical-operator-replacement** | Replace a logical expression | `a && b` -> `false` | +| **relational-operator-replacement** | Replace a relational expression | `a < b` -> `true` | +| **shift-operator-replacement** | Replace a shift operator with another | `a << b` -> `a >> b` | +| **unary-operator-replacement** | Replace a unary operator with another | `-b` -> `~b` | +| **statement-deletion** | Replace a statement with a no-op (`assert(true)`) | `self.checkInvariants();` -> `assert(true);` | For more details on each mutation type, refer to the [full documentation](https://docs.certora.com/en/latest/docs/gambit/gambit.html#mutation-types). From 311ad066cdf48a221e5759b2cd96560d461f52b8 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 13:46:10 -0700 Subject: [PATCH 153/200] Reorder, bug fix --- src/mutation.rs | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/src/mutation.rs b/src/mutation.rs index 64654146..1f814f34 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -266,17 +266,16 @@ pub enum MutationType { impl ToString for MutationType { fn to_string(&self) -> String { let str = match self { - MutationType::LiteralValueReplacement => "LiteralValueReplacement", - MutationType::BitwiseOperatorReplacement => "ConditionalOperatorReplacement", - MutationType::RelationalOperatorReplacement => "RelationalOperatorReplacement", MutationType::ArithmeticOperatorReplacement => "ArithmeticOperatorReplacement", + MutationType::BitwiseOperatorReplacement => "ConditionalOperatorReplacement", + MutationType::ElimDelegateCall => "ElimDelegateCall", + MutationType::ExpressionValueReplacement => "ExpressionValueReplacement", + MutationType::LiteralValueReplacement => "LiteralValueReplacement", MutationType::LogicalOperatorReplacement => "LogicalOperatorReplacement", + MutationType::RelationalOperatorReplacement => "RelationalOperatorReplacement", MutationType::ShiftOperatorReplacement => "ShiftOperatorReplacement", - MutationType::UnaryOperatorReplacement => "UnaryOperatorReplacement", - MutationType::ExpressionValueReplacement => "ExpressionValueReplacement", MutationType::StatementDeletion => "StatementDeletion", - - MutationType::ElimDelegateCall => "ElimDelegateCall", + MutationType::UnaryOperatorReplacement => "UnaryOperatorReplacement", }; str.into() } @@ -477,19 +476,16 @@ fn get_op_loc(expr: &Expression, source: &Arc) -> Loc { let op_end = op_start + op.len(); base.loc().with_start(op_start).with_end(op_end) } - Expression::PreIncrement { loc, expr, .. } | Expression::PreDecrement { loc, expr, .. } => { + Expression::PreIncrement { loc, .. } | Expression::PreDecrement { loc, .. } => { loc.with_end(loc.start() + get_operator(expr).len()) } - Expression::PostIncrement { loc, expr, .. } - | Expression::PostDecrement { loc, expr, .. } => { + Expression::PostIncrement { loc, .. } | Expression::PostDecrement { loc, .. } => { loc.with_start(loc.end() - get_operator(expr).len()) } - Expression::Not { loc, expr, .. } - | Expression::BitwiseNot { loc, expr, .. } - | Expression::Negate { loc, expr, .. } => { - loc.with_end(loc.start() + get_operator(expr).len()) - } + Expression::Not { loc, .. } + | Expression::BitwiseNot { loc, .. } + | Expression::Negate { loc, .. } => loc.with_end(loc.start() + get_operator(expr).len()), Expression::ConditionalOperator { cond, true_option, .. @@ -967,14 +963,14 @@ fn unary_op_replacement( source: &Arc, ) -> Vec { let loc = expr.loc(); - let unary_op = get_operator(expr); - let replacements: Vec<&&str> = ["-", "~"].iter().filter(|x| **x != unary_op).collect(); if loc.try_file_no().is_none() { return vec![]; } let muts = match expr { Expression::BitwiseNot { .. } | Expression::Negate { .. } => { + let unary_op = get_operator(expr); + let replacements: Vec<&&str> = ["-", "~"].iter().filter(|x| **x != unary_op).collect(); let op_loc = get_op_loc(expr, source); let muts = replacements .iter() @@ -984,8 +980,8 @@ fn unary_op_replacement( namespace.clone(), op_loc, *op, - "~".to_string(), - format!(" {} ", r), + unary_op.to_string(), + format!("{}", r), ) }) .collect(); From c5303abb9ba8edbef1f9bb8001481c9972c82c25 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 13:54:38 -0700 Subject: [PATCH 154/200] Updated regressions after fixing/modifying mutation operators --- benchmarks/Ops/LOR/LOR.sol | 4 + .../all_ops.json/gambit_results.json | 196 ++++++++++-------- .../regressions/all_ops.json/mutants.log | 80 +++---- .../all_ops.json/mutants/27/LOR/LOR.sol | 4 + .../all_ops.json/mutants/28/LOR/LOR.sol | 4 + .../all_ops.json/mutants/29/LOR/LOR.sol | 4 + .../all_ops.json/mutants/30/LOR/LOR.sol | 4 + .../all_ops.json/mutants/31/LOR/LOR.sol | 4 + .../all_ops.json/mutants/32/LOR/LOR.sol | 4 + .../all_ops.json/mutants/33/LOR/LOR.sol | 4 + .../all_ops.json/mutants/34/LOR/LOR.sol | 4 + .../all_ops.json/mutants/35/LOR/LOR.sol | 4 + .../all_ops.json/mutants/36/LOR/LOR.sol | 26 +++ .../all_ops.json/mutants/37/LOR/LOR.sol | 26 +++ .../all_ops.json/mutants/38/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/39/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/40/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/41/LVR/LVR.sol | 4 +- .../all_ops.json/mutants/42/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/43/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/44/LVR/LVR.sol | 4 +- .../all_ops.json/mutants/45/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/46/LVR/LVR.sol | 6 +- .../mutants/{36 => 47}/LVR/LVR.sol | 6 +- .../mutants/{37 => 48}/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/49/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/50/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/51/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/52/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/53/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/54/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/55/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/56/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/57/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/58/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/59/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/60/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/61/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/62/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/63/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/64/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/65/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/66/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/67/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/68/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/69/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/70/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/71/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/72/ROR/ROR.sol | 4 +- .../mutants/73}/ROR/ROR.sol | 6 +- .../mutants/{47 => 74}/ROR/ROR.sol | 6 +- .../mutants/75}/UOR/UOR.sol | 4 +- .../mutants/76}/UOR/UOR.sol | 4 +- .../regressions/lor.json/gambit_results.json | 30 ++- resources/regressions/lor.json/mutants.log | 2 + .../lor.json/mutants/1/Ops/LOR/LOR.sol | 4 + .../lor.json/mutants/10/Ops/LOR/LOR.sol | 26 +++ .../lor.json/mutants/11/Ops/LOR/LOR.sol | 26 +++ .../lor.json/mutants/2/Ops/LOR/LOR.sol | 4 + .../lor.json/mutants/3/Ops/LOR/LOR.sol | 4 + .../lor.json/mutants/4/Ops/LOR/LOR.sol | 4 + .../lor.json/mutants/5/Ops/LOR/LOR.sol | 4 + .../lor.json/mutants/6/Ops/LOR/LOR.sol | 4 + .../lor.json/mutants/7/Ops/LOR/LOR.sol | 4 + .../lor.json/mutants/8/Ops/LOR/LOR.sol | 4 + .../lor.json/mutants/9/Ops/LOR/LOR.sol | 4 + .../test_log_invalid.json/gambit_results.json | 196 ++++++++++-------- .../test_log_invalid.json/invalid.log | 2 +- .../test_log_invalid.json/mutants.log | 80 +++---- .../mutants/27/LOR/LOR.sol | 4 + .../mutants/28/LOR/LOR.sol | 4 + .../mutants/29/LOR/LOR.sol | 4 + .../mutants/30/LOR/LOR.sol | 4 + .../mutants/31/LOR/LOR.sol | 4 + .../mutants/32/LOR/LOR.sol | 4 + .../mutants/33/LOR/LOR.sol | 4 + .../mutants/34/LOR/LOR.sol | 4 + .../mutants/35/LOR/LOR.sol | 4 + .../mutants/36/LOR/LOR.sol | 26 +++ .../mutants/37/LOR/LOR.sol | 26 +++ .../mutants/38/LVR/LVR.sol | 6 +- .../mutants/39/LVR/LVR.sol | 6 +- .../mutants/40/LVR/LVR.sol | 6 +- .../mutants/41/LVR/LVR.sol | 4 +- .../mutants/42/LVR/LVR.sol | 6 +- .../mutants/43/LVR/LVR.sol | 6 +- .../mutants/44/LVR/LVR.sol | 4 +- .../mutants/45/LVR/LVR.sol | 6 +- .../mutants/46/LVR/LVR.sol | 6 +- .../mutants/{36 => 47}/LVR/LVR.sol | 6 +- .../mutants/{37 => 48}/LVR/LVR.sol | 6 +- .../mutants/49/ROR/ROR.sol | 4 +- .../mutants/50/ROR/ROR.sol | 6 +- .../mutants/51/ROR/ROR.sol | 6 +- .../mutants/52/ROR/ROR.sol | 4 +- .../mutants/53/ROR/ROR.sol | 6 +- .../mutants/54/ROR/ROR.sol | 6 +- .../mutants/55/ROR/ROR.sol | 4 +- .../mutants/56/ROR/ROR.sol | 6 +- .../mutants/57/ROR/ROR.sol | 6 +- .../mutants/58/ROR/ROR.sol | 4 +- .../mutants/59/ROR/ROR.sol | 6 +- .../mutants/60/ROR/ROR.sol | 6 +- .../mutants/61/ROR/ROR.sol | 4 +- .../mutants/62/ROR/ROR.sol | 6 +- .../mutants/63/ROR/ROR.sol | 6 +- .../mutants/64/ROR/ROR.sol | 6 +- .../mutants/65/ROR/ROR.sol | 4 +- .../mutants/66/ROR/ROR.sol | 6 +- .../mutants/67/ROR/ROR.sol | 6 +- .../mutants/68/ROR/ROR.sol | 6 +- .../mutants/69/ROR/ROR.sol | 4 +- .../mutants/70/ROR/ROR.sol | 6 +- .../mutants/71/ROR/ROR.sol | 6 +- .../mutants/72/ROR/ROR.sol | 4 +- .../mutants/{48 => 73}/ROR/ROR.sol | 6 +- .../mutants/74}/ROR/ROR.sol | 6 +- .../mutants/75}/UOR/UOR.sol | 4 +- .../mutants/76}/UOR/UOR.sol | 4 +- .../regressions/uor.json/gambit_results.json | 10 +- resources/regressions/uor.json/mutants.log | 4 +- .../uor.json/mutants/1/Ops/UOR/UOR.sol | 4 +- .../uor.json/mutants/2/Ops/UOR/UOR.sol | 4 +- src/mutation.rs | 3 + 124 files changed, 824 insertions(+), 475 deletions(-) create mode 100644 resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol create mode 100644 resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol rename resources/regressions/all_ops.json/mutants/{36 => 47}/LVR/LVR.sol (89%) rename resources/regressions/all_ops.json/mutants/{37 => 48}/LVR/LVR.sol (89%) rename resources/regressions/{test_log_invalid.json/mutants/47 => all_ops.json/mutants/73}/ROR/ROR.sol (93%) rename resources/regressions/all_ops.json/mutants/{47 => 74}/ROR/ROR.sol (92%) rename resources/regressions/{test_log_invalid.json/mutants/73 => all_ops.json/mutants/75}/UOR/UOR.sol (86%) rename resources/regressions/{test_log_invalid.json/mutants/74 => all_ops.json/mutants/76}/UOR/UOR.sol (86%) create mode 100644 resources/regressions/lor.json/mutants/10/Ops/LOR/LOR.sol create mode 100644 resources/regressions/lor.json/mutants/11/Ops/LOR/LOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol rename resources/regressions/test_log_invalid.json/mutants/{36 => 47}/LVR/LVR.sol (89%) rename resources/regressions/test_log_invalid.json/mutants/{37 => 48}/LVR/LVR.sol (89%) rename resources/regressions/test_log_invalid.json/mutants/{48 => 73}/ROR/ROR.sol (93%) rename resources/regressions/{all_ops.json/mutants/48 => test_log_invalid.json/mutants/74}/ROR/ROR.sol (92%) rename resources/regressions/{all_ops.json/mutants/73 => test_log_invalid.json/mutants/75}/UOR/UOR.sol (86%) rename resources/regressions/{all_ops.json/mutants/74 => test_log_invalid.json/mutants/76}/UOR/UOR.sol (86%) diff --git a/benchmarks/Ops/LOR/LOR.sol b/benchmarks/Ops/LOR/LOR.sol index d6f58fcc..7612c703 100644 --- a/benchmarks/Ops/LOR/LOR.sol +++ b/benchmarks/Ops/LOR/LOR.sol @@ -18,4 +18,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/all_ops.json/gambit_results.json b/resources/regressions/all_ops.json/gambit_results.json index 8d7f063e..ff8134f5 100644 --- a/resources/regressions/all_ops.json/gambit_results.json +++ b/resources/regressions/all_ops.json/gambit_results.json @@ -386,7 +386,7 @@ { "col": 16, "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n \n function not(bool a) public pure returns (bool) {\n", "id": "33", "line": 19, "name": "mutants/33/LOR/LOR.sol", @@ -398,7 +398,7 @@ { "col": 16, "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n \n function not(bool a) public pure returns (bool) {\n", "id": "34", "line": 19, "name": "mutants/34/LOR/LOR.sol", @@ -410,7 +410,7 @@ { "col": 16, "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n \n function not(bool a) public pure returns (bool) {\n", "id": "35", "line": 19, "name": "mutants/35/LOR/LOR.sol", @@ -419,13 +419,37 @@ "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", "repl": "true" }, + { + "col": 16, + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,7 +19,8 @@\n return (x < y) || (a != (x >= y));\n }\n \n+ /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;`\n function not(bool a) public pure returns (bool) {\n- return !a;\n+ return true;\n }\n }\n", + "id": "36", + "line": 23, + "name": "mutants/36/LOR/LOR.sol", + "op": "LOR", + "orig": "!a", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "true" + }, + { + "col": 16, + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,7 +19,8 @@\n return (x < y) || (a != (x >= y));\n }\n \n+ /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;`\n function not(bool a) public pure returns (bool) {\n- return !a;\n+ return false;\n }\n }\n", + "id": "37", + "line": 23, + "name": "mutants/37/LOR/LOR.sol", + "op": "LOR", + "orig": "!a", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "false" + }, { "col": 24, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", - "id": "36", + "id": "38", "line": 15, - "name": "mutants/36/LVR/LVR.sol", + "name": "mutants/38/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -435,9 +459,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", - "id": "37", + "id": "39", "line": 21, - "name": "mutants/37/LVR/LVR.sol", + "name": "mutants/39/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -447,9 +471,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", - "id": "38", + "id": "40", "line": 21, - "name": "mutants/38/LVR/LVR.sol", + "name": "mutants/40/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -459,9 +483,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", - "id": "39", + "id": "41", "line": 27, - "name": "mutants/39/LVR/LVR.sol", + "name": "mutants/41/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -471,9 +495,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", - "id": "40", + "id": "42", "line": 27, - "name": "mutants/40/LVR/LVR.sol", + "name": "mutants/42/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -483,9 +507,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", - "id": "41", + "id": "43", "line": 27, - "name": "mutants/41/LVR/LVR.sol", + "name": "mutants/43/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -495,9 +519,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", - "id": "42", + "id": "44", "line": 33, - "name": "mutants/42/LVR/LVR.sol", + "name": "mutants/44/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -507,9 +531,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", - "id": "43", + "id": "45", "line": 33, - "name": "mutants/43/LVR/LVR.sol", + "name": "mutants/45/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -519,9 +543,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", - "id": "44", + "id": "46", "line": 33, - "name": "mutants/44/LVR/LVR.sol", + "name": "mutants/46/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -531,9 +555,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", - "id": "45", + "id": "47", "line": 39, - "name": "mutants/45/LVR/LVR.sol", + "name": "mutants/47/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -543,9 +567,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", - "id": "46", + "id": "48", "line": 39, - "name": "mutants/46/LVR/LVR.sol", + "name": "mutants/48/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -555,9 +579,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "47", + "id": "49", "line": 9, - "name": "mutants/47/ROR/ROR.sol", + "name": "mutants/49/ROR/ROR.sol", "op": "ROR", "orig": "<", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -567,9 +591,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "48", + "id": "50", "line": 9, - "name": "mutants/48/ROR/ROR.sol", + "name": "mutants/50/ROR/ROR.sol", "op": "ROR", "orig": "<", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -579,9 +603,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "49", + "id": "51", "line": 9, - "name": "mutants/49/ROR/ROR.sol", + "name": "mutants/51/ROR/ROR.sol", "op": "ROR", "orig": "x < y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -591,9 +615,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "50", + "id": "52", "line": 14, - "name": "mutants/50/ROR/ROR.sol", + "name": "mutants/52/ROR/ROR.sol", "op": "ROR", "orig": "<=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -603,9 +627,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "51", + "id": "53", "line": 14, - "name": "mutants/51/ROR/ROR.sol", + "name": "mutants/53/ROR/ROR.sol", "op": "ROR", "orig": "<=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -615,9 +639,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "52", + "id": "54", "line": 14, - "name": "mutants/52/ROR/ROR.sol", + "name": "mutants/54/ROR/ROR.sol", "op": "ROR", "orig": "x <= y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -627,9 +651,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "53", + "id": "55", "line": 19, - "name": "mutants/53/ROR/ROR.sol", + "name": "mutants/55/ROR/ROR.sol", "op": "ROR", "orig": ">", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -639,9 +663,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "54", + "id": "56", "line": 19, - "name": "mutants/54/ROR/ROR.sol", + "name": "mutants/56/ROR/ROR.sol", "op": "ROR", "orig": ">", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -651,9 +675,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "55", + "id": "57", "line": 19, - "name": "mutants/55/ROR/ROR.sol", + "name": "mutants/57/ROR/ROR.sol", "op": "ROR", "orig": "x > y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -663,9 +687,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "56", + "id": "58", "line": 24, - "name": "mutants/56/ROR/ROR.sol", + "name": "mutants/58/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -675,9 +699,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "57", + "id": "59", "line": 24, - "name": "mutants/57/ROR/ROR.sol", + "name": "mutants/59/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -687,9 +711,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "58", + "id": "60", "line": 24, - "name": "mutants/58/ROR/ROR.sol", + "name": "mutants/60/ROR/ROR.sol", "op": "ROR", "orig": "x >= y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -699,9 +723,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "59", + "id": "61", "line": 29, - "name": "mutants/59/ROR/ROR.sol", + "name": "mutants/61/ROR/ROR.sol", "op": "ROR", "orig": "==", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -711,9 +735,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "60", + "id": "62", "line": 29, - "name": "mutants/60/ROR/ROR.sol", + "name": "mutants/62/ROR/ROR.sol", "op": "ROR", "orig": "==", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -723,9 +747,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "61", + "id": "63", "line": 29, - "name": "mutants/61/ROR/ROR.sol", + "name": "mutants/63/ROR/ROR.sol", "op": "ROR", "orig": "x == y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -735,9 +759,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", - "id": "62", + "id": "64", "line": 34, - "name": "mutants/62/ROR/ROR.sol", + "name": "mutants/64/ROR/ROR.sol", "op": "ROR", "orig": "x == y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -747,9 +771,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "63", + "id": "65", "line": 39, - "name": "mutants/63/ROR/ROR.sol", + "name": "mutants/65/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -759,9 +783,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "64", + "id": "66", "line": 39, - "name": "mutants/64/ROR/ROR.sol", + "name": "mutants/66/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -771,9 +795,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "65", + "id": "67", "line": 39, - "name": "mutants/65/ROR/ROR.sol", + "name": "mutants/67/ROR/ROR.sol", "op": "ROR", "orig": "x != y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -783,9 +807,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", - "id": "66", + "id": "68", "line": 44, - "name": "mutants/66/ROR/ROR.sol", + "name": "mutants/68/ROR/ROR.sol", "op": "ROR", "orig": "x != y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -795,9 +819,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "67", + "id": "69", "line": 53, - "name": "mutants/67/ROR/ROR.sol", + "name": "mutants/69/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -807,9 +831,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "68", + "id": "70", "line": 53, - "name": "mutants/68/ROR/ROR.sol", + "name": "mutants/70/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -819,9 +843,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "69", + "id": "71", "line": 53, - "name": "mutants/69/ROR/ROR.sol", + "name": "mutants/71/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) >= z", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -831,9 +855,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", - "id": "70", + "id": "72", "line": 62, - "name": "mutants/70/ROR/ROR.sol", + "name": "mutants/72/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -843,9 +867,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", - "id": "71", + "id": "73", "line": 62, - "name": "mutants/71/ROR/ROR.sol", + "name": "mutants/73/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -855,9 +879,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", - "id": "72", + "id": "74", "line": 62, - "name": "mutants/72/ROR/ROR.sol", + "name": "mutants/74/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) != z", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -866,25 +890,25 @@ { "col": 16, "description": "UnaryOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", - "id": "73", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return -x;\n }\n \n // Expect a single mutant: ~x\n", + "id": "75", "line": 14, - "name": "mutants/73/UOR/UOR.sol", + "name": "mutants/75/UOR/UOR.sol", "op": "UOR", "orig": "~", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", - "repl": " - " + "repl": "-" }, { "col": 16, "description": "UnaryOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", - "id": "74", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~x;\n }\n }\n", + "id": "76", "line": 19, - "name": "mutants/74/UOR/UOR.sol", + "name": "mutants/76/UOR/UOR.sol", "op": "UOR", - "orig": "~", + "orig": "-", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", - "repl": " ~ " + "repl": "~" } ] \ No newline at end of file diff --git a/resources/regressions/all_ops.json/mutants.log b/resources/regressions/all_ops.json/mutants.log index abc080e6..72462c57 100644 --- a/resources/regressions/all_ops.json/mutants.log +++ b/resources/regressions/all_ops.json/mutants.log @@ -33,42 +33,44 @@ 33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y 34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) 35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true -36,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 -37,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 -38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 -39,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 -40,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 -41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 -42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 -43,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 -44,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 -45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 -46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 -47,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,<= -48,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,!= -49,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:16,x < y,false -50,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,< -51,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,== -52,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:16,x <= y,true -53,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,>= -54,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,!= -55,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:16,x > y,false -56,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,> -57,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,== -58,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:16,x >= y,true -59,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,<= -60,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,>= -61,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:16,x == y,false -62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,34:16,x == y,false -63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,< -64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,> -65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:16,x != y,true -66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,44:16,x != y,true -67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,> -68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,== -69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:16,(x + y) >= z,true -70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,< -71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,> -72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:16,(x + y) != z,true -73,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~, - -74,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,~, ~ +36,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,23:16,!a,true +37,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,23:16,!a,false +38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 +39,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 +40,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 +41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 +42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 +43,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 +44,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 +45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 +46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 +47,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 +48,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 +49,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,<= +50,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,!= +51,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:16,x < y,false +52,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,< +53,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,== +54,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:16,x <= y,true +55,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,>= +56,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,!= +57,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:16,x > y,false +58,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,> +59,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,== +60,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:16,x >= y,true +61,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,<= +62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,>= +63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:16,x == y,false +64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,34:16,x == y,false +65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,< +66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,> +67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:16,x != y,true +68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,44:16,x != y,true +69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,> +70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,== +71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:16,(x + y) >= z,true +72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,< +73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,> +74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:16,(x + y) != z,true +75,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~,- +76,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,-,~ diff --git a/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol index 67f4f5df..01536cd6 100644 --- a/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol index d63286bb..c97e8675 100644 --- a/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol index 0e5805db..492dc45c 100644 --- a/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol index 06fbf70c..7f62ba05 100644 --- a/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol index 620f1630..efb5d5a8 100644 --- a/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol index 29afb982..7d3c811a 100644 --- a/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol index eb339ae7..4ceda907 100644 --- a/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return x < y; } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol index fb49fdaf..690fae8d 100644 --- a/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return a != (x >= y); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol index 0d9c28b2..2ef15642 100644 --- a/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return true; } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol new file mode 100644 index 00000000..be0e75f4 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } + + /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;` + function not(bool a) public pure returns (bool) { + return true; + } +} diff --git a/resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol new file mode 100644 index 00000000..35ee5751 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } + + /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;` + function not(bool a) public pure returns (bool) { + return false; + } +} diff --git a/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol index d18c6c48..e06271e2 100644 --- a/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol @@ -11,15 +11,15 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; + uint256 zero = 1; return zero; } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 2; + uint256 one = 1; return one; } diff --git a/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol index 173dc540..f2cb8295 100644 --- a/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 0; return one; } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol index 72ffaedf..d18c6c48 100644 --- a/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 2; return one; } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 1; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol index 1e24417f..173dc540 100644 --- a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol @@ -23,9 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -2; + int256 neg_one = 0; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol index e088a4e3..72ffaedf 100644 --- a/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol @@ -23,15 +23,15 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 1; return neg_one; } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 0; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol index 2407079e..1e24417f 100644 --- a/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol @@ -23,15 +23,15 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = -2; return neg_one; } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = -1; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol index a5082f3b..e088a4e3 100644 --- a/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol @@ -29,9 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 2; + int256 pos_one = 0; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol index 22af4185..2407079e 100644 --- a/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol @@ -29,15 +29,15 @@ contract LVR { } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = -1; return pos_one; } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = -1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol index e241973d..a5082f3b 100644 --- a/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol @@ -29,15 +29,15 @@ contract LVR { } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = 2; return pos_one; } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol similarity index 89% rename from resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol rename to resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol index e06271e2..22af4185 100644 --- a/resources/regressions/all_ops.json/mutants/36/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol @@ -11,9 +11,8 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 1; + uint256 zero = 0; return zero; } @@ -36,8 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = -1; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol similarity index 89% rename from resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol rename to resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol index f2cb8295..e241973d 100644 --- a/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol @@ -17,9 +17,8 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 0; + uint256 one = 1; return one; } @@ -36,8 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = 1; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol index 6141947b..dec84f24 100644 --- a/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x <= y; } // Expect 3 mutants: x < y, x == y, true diff --git a/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol index 9f8ccd04..0c05265c 100644 --- a/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x != y; } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol index 18e38f34..6141947b 100644 --- a/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return false; } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol index 55dd7c79..9f8ccd04 100644 --- a/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol @@ -10,9 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x < y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol index 52949d03..18e38f34 100644 --- a/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol @@ -10,14 +10,14 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x == y; } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x > y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol index a3e16320..55dd7c79 100644 --- a/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol @@ -10,14 +10,14 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return true; } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x > y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol index a9024427..52949d03 100644 --- a/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol @@ -15,9 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x >= y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol index 337c9a92..a3e16320 100644 --- a/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol @@ -15,14 +15,14 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x != y; } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol index 7c02b73b..a9024427 100644 --- a/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol @@ -15,14 +15,14 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return false; } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol index 3d299dfb..337c9a92 100644 --- a/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol @@ -20,9 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x > y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol index c865469b..7c02b73b 100644 --- a/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol @@ -20,14 +20,14 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x == y; } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x == y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol index 8cdc1c10..3d299dfb 100644 --- a/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol @@ -20,14 +20,14 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return true; } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x == y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol index de6a4360..c865469b 100644 --- a/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol @@ -25,9 +25,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` + /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x <= y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol index ab40e6c9..8cdc1c10 100644 --- a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol @@ -25,14 +25,14 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x >= y; } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x == y; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol index f42e7b7e..de6a4360 100644 --- a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol @@ -25,8 +25,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return false; } // Expect 2 mutants: true, false @@ -35,9 +36,8 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol index e5f50322..ab40e6c9 100644 --- a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol @@ -30,14 +30,14 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; + return false; } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol index 83684484..f42e7b7e 100644 --- a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x < y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol index 3ae92133..e5f50322 100644 --- a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol @@ -35,14 +35,14 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x > y; } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol index bdeac3af..83684484 100644 --- a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol @@ -35,8 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return true; } // Expect 2 mutants: true, false @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol index 430379f6..3ae92133 100644 --- a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol @@ -40,8 +40,9 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) == z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol index 3d67c155..bdeac3af 100644 --- a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol @@ -49,9 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return true; + return (x + y) > z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol index 13612614..430379f6 100644 --- a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol @@ -49,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) == z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true @@ -58,8 +59,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) < z; + return (x + y) != z; } } diff --git a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol index dd0c83ca..3d67c155 100644 --- a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol @@ -49,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true @@ -58,8 +59,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) != z; } } diff --git a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol index 84889114..13612614 100644 --- a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol @@ -58,8 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return true; + return (x + y) < z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol similarity index 93% rename from resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol index dec84f24..dd0c83ca 100644 --- a/resources/regressions/test_log_invalid.json/mutants/47/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) > z; } } diff --git a/resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol similarity index 92% rename from resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol index dec84f24..84889114 100644 --- a/resources/regressions/all_ops.json/mutants/47/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return true; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/73/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol similarity index 86% rename from resources/regressions/test_log_invalid.json/mutants/73/UOR/UOR.sol rename to resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol index 5697ce92..50d09571 100644 --- a/resources/regressions/test_log_invalid.json/mutants/73/UOR/UOR.sol +++ b/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol @@ -10,9 +10,9 @@ contract UOR { } // Expect a single mutant: -x - /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;` + /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;` function signed_bw_not(int256 x) public pure returns (int256) { - return - ~x; + return -x; } // Expect a single mutant: ~x diff --git a/resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol similarity index 86% rename from resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol rename to resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol index 8a21a9d0..84eae0ca 100644 --- a/resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol +++ b/resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol @@ -15,8 +15,8 @@ contract UOR { } // Expect a single mutant: ~x - /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;` + /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;` function signed_neg(int256 x) public pure returns (int256) { - return ~ -x; + return ~x; } } diff --git a/resources/regressions/lor.json/gambit_results.json b/resources/regressions/lor.json/gambit_results.json index 56abd64a..94d6dc4f 100644 --- a/resources/regressions/lor.json/gambit_results.json +++ b/resources/regressions/lor.json/gambit_results.json @@ -74,7 +74,7 @@ { "col": 16, "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n \n function not(bool a) public pure returns (bool) {\n", "id": "7", "line": 19, "name": "mutants/7/Ops/LOR/LOR.sol", @@ -86,7 +86,7 @@ { "col": 16, "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n \n function not(bool a) public pure returns (bool) {\n", "id": "8", "line": 19, "name": "mutants/8/Ops/LOR/LOR.sol", @@ -98,7 +98,7 @@ { "col": 16, "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n \n function not(bool a) public pure returns (bool) {\n", "id": "9", "line": 19, "name": "mutants/9/Ops/LOR/LOR.sol", @@ -106,5 +106,29 @@ "orig": "(x < y) || (a != (x >= y))", "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", "repl": "true" + }, + { + "col": 16, + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,7 +19,8 @@\n return (x < y) || (a != (x >= y));\n }\n \n+ /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;`\n function not(bool a) public pure returns (bool) {\n- return !a;\n+ return true;\n }\n }\n", + "id": "10", + "line": 23, + "name": "mutants/10/Ops/LOR/LOR.sol", + "op": "LOR", + "orig": "!a", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "true" + }, + { + "col": 16, + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,7 +19,8 @@\n return (x < y) || (a != (x >= y));\n }\n \n+ /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;`\n function not(bool a) public pure returns (bool) {\n- return !a;\n+ return false;\n }\n }\n", + "id": "11", + "line": 23, + "name": "mutants/11/Ops/LOR/LOR.sol", + "op": "LOR", + "orig": "!a", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "false" } ] \ No newline at end of file diff --git a/resources/regressions/lor.json/mutants.log b/resources/regressions/lor.json/mutants.log index 792279c0..40cb0dd7 100644 --- a/resources/regressions/lor.json/mutants.log +++ b/resources/regressions/lor.json/mutants.log @@ -7,3 +7,5 @@ 7,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y 8,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) 9,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true +10,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,23:16,!a,true +11,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,23:16,!a,false diff --git a/resources/regressions/lor.json/mutants/1/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/1/Ops/LOR/LOR.sol index 67f4f5df..01536cd6 100644 --- a/resources/regressions/lor.json/mutants/1/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/1/Ops/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/lor.json/mutants/10/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/10/Ops/LOR/LOR.sol new file mode 100644 index 00000000..be0e75f4 --- /dev/null +++ b/resources/regressions/lor.json/mutants/10/Ops/LOR/LOR.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } + + /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;` + function not(bool a) public pure returns (bool) { + return true; + } +} diff --git a/resources/regressions/lor.json/mutants/11/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/11/Ops/LOR/LOR.sol new file mode 100644 index 00000000..35ee5751 --- /dev/null +++ b/resources/regressions/lor.json/mutants/11/Ops/LOR/LOR.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } + + /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;` + function not(bool a) public pure returns (bool) { + return false; + } +} diff --git a/resources/regressions/lor.json/mutants/2/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/2/Ops/LOR/LOR.sol index d63286bb..c97e8675 100644 --- a/resources/regressions/lor.json/mutants/2/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/2/Ops/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/lor.json/mutants/3/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/3/Ops/LOR/LOR.sol index 0e5805db..492dc45c 100644 --- a/resources/regressions/lor.json/mutants/3/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/3/Ops/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/lor.json/mutants/4/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/4/Ops/LOR/LOR.sol index 06fbf70c..7f62ba05 100644 --- a/resources/regressions/lor.json/mutants/4/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/4/Ops/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/lor.json/mutants/5/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/5/Ops/LOR/LOR.sol index 620f1630..efb5d5a8 100644 --- a/resources/regressions/lor.json/mutants/5/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/5/Ops/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/lor.json/mutants/6/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/6/Ops/LOR/LOR.sol index 29afb982..7d3c811a 100644 --- a/resources/regressions/lor.json/mutants/6/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/6/Ops/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/lor.json/mutants/7/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/7/Ops/LOR/LOR.sol index eb339ae7..4ceda907 100644 --- a/resources/regressions/lor.json/mutants/7/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/7/Ops/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return x < y; } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/lor.json/mutants/8/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/8/Ops/LOR/LOR.sol index fb49fdaf..690fae8d 100644 --- a/resources/regressions/lor.json/mutants/8/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/8/Ops/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return a != (x >= y); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/lor.json/mutants/9/Ops/LOR/LOR.sol b/resources/regressions/lor.json/mutants/9/Ops/LOR/LOR.sol index 0d9c28b2..2ef15642 100644 --- a/resources/regressions/lor.json/mutants/9/Ops/LOR/LOR.sol +++ b/resources/regressions/lor.json/mutants/9/Ops/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return true; } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/test_log_invalid.json/gambit_results.json b/resources/regressions/test_log_invalid.json/gambit_results.json index 8d7f063e..ff8134f5 100644 --- a/resources/regressions/test_log_invalid.json/gambit_results.json +++ b/resources/regressions/test_log_invalid.json/gambit_results.json @@ -386,7 +386,7 @@ { "col": 16, "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n \n function not(bool a) public pure returns (bool) {\n", "id": "33", "line": 19, "name": "mutants/33/LOR/LOR.sol", @@ -398,7 +398,7 @@ { "col": 16, "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n \n function not(bool a) public pure returns (bool) {\n", "id": "34", "line": 19, "name": "mutants/34/LOR/LOR.sol", @@ -410,7 +410,7 @@ { "col": 16, "description": "LogicalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n \n function not(bool a) public pure returns (bool) {\n", "id": "35", "line": 19, "name": "mutants/35/LOR/LOR.sol", @@ -419,13 +419,37 @@ "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", "repl": "true" }, + { + "col": 16, + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,7 +19,8 @@\n return (x < y) || (a != (x >= y));\n }\n \n+ /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;`\n function not(bool a) public pure returns (bool) {\n- return !a;\n+ return true;\n }\n }\n", + "id": "36", + "line": 23, + "name": "mutants/36/LOR/LOR.sol", + "op": "LOR", + "orig": "!a", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "true" + }, + { + "col": 16, + "description": "LogicalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,7 +19,8 @@\n return (x < y) || (a != (x >= y));\n }\n \n+ /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;`\n function not(bool a) public pure returns (bool) {\n- return !a;\n+ return false;\n }\n }\n", + "id": "37", + "line": 23, + "name": "mutants/37/LOR/LOR.sol", + "op": "LOR", + "orig": "!a", + "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "repl": "false" + }, { "col": 24, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", - "id": "36", + "id": "38", "line": 15, - "name": "mutants/36/LVR/LVR.sol", + "name": "mutants/38/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -435,9 +459,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", - "id": "37", + "id": "39", "line": 21, - "name": "mutants/37/LVR/LVR.sol", + "name": "mutants/39/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -447,9 +471,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", - "id": "38", + "id": "40", "line": 21, - "name": "mutants/38/LVR/LVR.sol", + "name": "mutants/40/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -459,9 +483,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", - "id": "39", + "id": "41", "line": 27, - "name": "mutants/39/LVR/LVR.sol", + "name": "mutants/41/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -471,9 +495,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", - "id": "40", + "id": "42", "line": 27, - "name": "mutants/40/LVR/LVR.sol", + "name": "mutants/42/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -483,9 +507,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", - "id": "41", + "id": "43", "line": 27, - "name": "mutants/41/LVR/LVR.sol", + "name": "mutants/43/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -495,9 +519,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", - "id": "42", + "id": "44", "line": 33, - "name": "mutants/42/LVR/LVR.sol", + "name": "mutants/44/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -507,9 +531,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", - "id": "43", + "id": "45", "line": 33, - "name": "mutants/43/LVR/LVR.sol", + "name": "mutants/45/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -519,9 +543,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", - "id": "44", + "id": "46", "line": 33, - "name": "mutants/44/LVR/LVR.sol", + "name": "mutants/46/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -531,9 +555,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", - "id": "45", + "id": "47", "line": 39, - "name": "mutants/45/LVR/LVR.sol", + "name": "mutants/47/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -543,9 +567,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", - "id": "46", + "id": "48", "line": 39, - "name": "mutants/46/LVR/LVR.sol", + "name": "mutants/48/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", @@ -555,9 +579,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "47", + "id": "49", "line": 9, - "name": "mutants/47/ROR/ROR.sol", + "name": "mutants/49/ROR/ROR.sol", "op": "ROR", "orig": "<", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -567,9 +591,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "48", + "id": "50", "line": 9, - "name": "mutants/48/ROR/ROR.sol", + "name": "mutants/50/ROR/ROR.sol", "op": "ROR", "orig": "<", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -579,9 +603,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "49", + "id": "51", "line": 9, - "name": "mutants/49/ROR/ROR.sol", + "name": "mutants/51/ROR/ROR.sol", "op": "ROR", "orig": "x < y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -591,9 +615,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "50", + "id": "52", "line": 14, - "name": "mutants/50/ROR/ROR.sol", + "name": "mutants/52/ROR/ROR.sol", "op": "ROR", "orig": "<=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -603,9 +627,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "51", + "id": "53", "line": 14, - "name": "mutants/51/ROR/ROR.sol", + "name": "mutants/53/ROR/ROR.sol", "op": "ROR", "orig": "<=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -615,9 +639,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "52", + "id": "54", "line": 14, - "name": "mutants/52/ROR/ROR.sol", + "name": "mutants/54/ROR/ROR.sol", "op": "ROR", "orig": "x <= y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -627,9 +651,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "53", + "id": "55", "line": 19, - "name": "mutants/53/ROR/ROR.sol", + "name": "mutants/55/ROR/ROR.sol", "op": "ROR", "orig": ">", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -639,9 +663,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "54", + "id": "56", "line": 19, - "name": "mutants/54/ROR/ROR.sol", + "name": "mutants/56/ROR/ROR.sol", "op": "ROR", "orig": ">", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -651,9 +675,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "55", + "id": "57", "line": 19, - "name": "mutants/55/ROR/ROR.sol", + "name": "mutants/57/ROR/ROR.sol", "op": "ROR", "orig": "x > y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -663,9 +687,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "56", + "id": "58", "line": 24, - "name": "mutants/56/ROR/ROR.sol", + "name": "mutants/58/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -675,9 +699,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "57", + "id": "59", "line": 24, - "name": "mutants/57/ROR/ROR.sol", + "name": "mutants/59/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -687,9 +711,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "58", + "id": "60", "line": 24, - "name": "mutants/58/ROR/ROR.sol", + "name": "mutants/60/ROR/ROR.sol", "op": "ROR", "orig": "x >= y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -699,9 +723,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "59", + "id": "61", "line": 29, - "name": "mutants/59/ROR/ROR.sol", + "name": "mutants/61/ROR/ROR.sol", "op": "ROR", "orig": "==", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -711,9 +735,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "60", + "id": "62", "line": 29, - "name": "mutants/60/ROR/ROR.sol", + "name": "mutants/62/ROR/ROR.sol", "op": "ROR", "orig": "==", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -723,9 +747,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "61", + "id": "63", "line": 29, - "name": "mutants/61/ROR/ROR.sol", + "name": "mutants/63/ROR/ROR.sol", "op": "ROR", "orig": "x == y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -735,9 +759,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", - "id": "62", + "id": "64", "line": 34, - "name": "mutants/62/ROR/ROR.sol", + "name": "mutants/64/ROR/ROR.sol", "op": "ROR", "orig": "x == y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -747,9 +771,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "63", + "id": "65", "line": 39, - "name": "mutants/63/ROR/ROR.sol", + "name": "mutants/65/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -759,9 +783,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "64", + "id": "66", "line": 39, - "name": "mutants/64/ROR/ROR.sol", + "name": "mutants/66/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -771,9 +795,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "65", + "id": "67", "line": 39, - "name": "mutants/65/ROR/ROR.sol", + "name": "mutants/67/ROR/ROR.sol", "op": "ROR", "orig": "x != y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -783,9 +807,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", - "id": "66", + "id": "68", "line": 44, - "name": "mutants/66/ROR/ROR.sol", + "name": "mutants/68/ROR/ROR.sol", "op": "ROR", "orig": "x != y", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -795,9 +819,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "67", + "id": "69", "line": 53, - "name": "mutants/67/ROR/ROR.sol", + "name": "mutants/69/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -807,9 +831,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "68", + "id": "70", "line": 53, - "name": "mutants/68/ROR/ROR.sol", + "name": "mutants/70/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -819,9 +843,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "69", + "id": "71", "line": 53, - "name": "mutants/69/ROR/ROR.sol", + "name": "mutants/71/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) >= z", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -831,9 +855,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", - "id": "70", + "id": "72", "line": 62, - "name": "mutants/70/ROR/ROR.sol", + "name": "mutants/72/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -843,9 +867,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", - "id": "71", + "id": "73", "line": 62, - "name": "mutants/71/ROR/ROR.sol", + "name": "mutants/73/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -855,9 +879,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", - "id": "72", + "id": "74", "line": 62, - "name": "mutants/72/ROR/ROR.sol", + "name": "mutants/74/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) != z", "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", @@ -866,25 +890,25 @@ { "col": 16, "description": "UnaryOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", - "id": "73", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return -x;\n }\n \n // Expect a single mutant: ~x\n", + "id": "75", "line": 14, - "name": "mutants/73/UOR/UOR.sol", + "name": "mutants/75/UOR/UOR.sol", "op": "UOR", "orig": "~", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", - "repl": " - " + "repl": "-" }, { "col": 16, "description": "UnaryOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", - "id": "74", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~x;\n }\n }\n", + "id": "76", "line": 19, - "name": "mutants/74/UOR/UOR.sol", + "name": "mutants/76/UOR/UOR.sol", "op": "UOR", - "orig": "~", + "orig": "-", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", - "repl": " ~ " + "repl": "~" } ] \ No newline at end of file diff --git a/resources/regressions/test_log_invalid.json/invalid.log b/resources/regressions/test_log_invalid.json/invalid.log index 28d86ae5..19c39fa9 100644 --- a/resources/regressions/test_log_invalid.json/invalid.log +++ b/resources/regressions/test_log_invalid.json/invalid.log @@ -1 +1 @@ -1,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,8:15,~, - +1,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,8:15,~,- diff --git a/resources/regressions/test_log_invalid.json/mutants.log b/resources/regressions/test_log_invalid.json/mutants.log index abc080e6..72462c57 100644 --- a/resources/regressions/test_log_invalid.json/mutants.log +++ b/resources/regressions/test_log_invalid.json/mutants.log @@ -33,42 +33,44 @@ 33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y 34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) 35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true -36,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 -37,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 -38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 -39,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 -40,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 -41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 -42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 -43,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 -44,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 -45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 -46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 -47,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,<= -48,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,!= -49,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:16,x < y,false -50,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,< -51,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,== -52,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:16,x <= y,true -53,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,>= -54,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,!= -55,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:16,x > y,false -56,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,> -57,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,== -58,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:16,x >= y,true -59,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,<= -60,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,>= -61,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:16,x == y,false -62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,34:16,x == y,false -63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,< -64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,> -65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:16,x != y,true -66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,44:16,x != y,true -67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,> -68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,== -69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:16,(x + y) >= z,true -70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,< -71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,> -72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:16,(x + y) != z,true -73,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~, - -74,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,~, ~ +36,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,23:16,!a,true +37,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,23:16,!a,false +38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 +39,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 +40,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 +41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 +42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 +43,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 +44,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 +45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 +46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 +47,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 +48,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 +49,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,<= +50,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,!= +51,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:16,x < y,false +52,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,< +53,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,== +54,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:16,x <= y,true +55,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,>= +56,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,!= +57,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:16,x > y,false +58,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,> +59,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,== +60,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:16,x >= y,true +61,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,<= +62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,>= +63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:16,x == y,false +64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,34:16,x == y,false +65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,< +66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,> +67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:16,x != y,true +68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,44:16,x != y,true +69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,> +70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,== +71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:16,(x + y) >= z,true +72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,< +73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,> +74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:16,(x + y) != z,true +75,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~,- +76,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,-,~ diff --git a/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol index 67f4f5df..01536cd6 100644 --- a/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol index d63286bb..c97e8675 100644 --- a/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol index 0e5805db..492dc45c 100644 --- a/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol index 06fbf70c..7f62ba05 100644 --- a/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol index 620f1630..efb5d5a8 100644 --- a/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol index 29afb982..7d3c811a 100644 --- a/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return (x < y) || (a != (x >= y)); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol index eb339ae7..4ceda907 100644 --- a/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return x < y; } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol index fb49fdaf..690fae8d 100644 --- a/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return a != (x >= y); } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol index 0d9c28b2..2ef15642 100644 --- a/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol @@ -19,4 +19,8 @@ contract LOR { function more_or(bool a, int x, int y) public pure returns (bool) { return true; } + + function not(bool a) public pure returns (bool) { + return !a; + } } diff --git a/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol new file mode 100644 index 00000000..be0e75f4 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } + + /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;` + function not(bool a) public pure returns (bool) { + return true; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol new file mode 100644 index 00000000..35ee5751 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >0.7.0; +pragma experimental ABIEncoderV2; + +// This contract provides test functions for relational operator replacement (ROR) +contract LOR { + // Expect three mutants: a, b, false + function and(bool a, bool b) public pure returns (bool) { + return a && b; + } + + // Expect three mutants: a, b, true + function or(bool a, bool b) public pure returns (bool) { + return a || b; + } + + // Expect three mutants, x < y, a != (x >= y), true + function more_or(bool a, int x, int y) public pure returns (bool) { + return (x < y) || (a != (x >= y)); + } + + /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;` + function not(bool a) public pure returns (bool) { + return false; + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol index d18c6c48..e06271e2 100644 --- a/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol @@ -11,15 +11,15 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; + uint256 zero = 1; return zero; } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 2; + uint256 one = 1; return one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol index 173dc540..f2cb8295 100644 --- a/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 0; return one; } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol index 72ffaedf..d18c6c48 100644 --- a/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 2; return one; } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 1; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol index 1e24417f..173dc540 100644 --- a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol @@ -23,9 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -2; + int256 neg_one = 0; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol index e088a4e3..72ffaedf 100644 --- a/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol @@ -23,15 +23,15 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 1; return neg_one; } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 0; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol index 2407079e..1e24417f 100644 --- a/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol @@ -23,15 +23,15 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = -2; return neg_one; } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = -1; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol index a5082f3b..e088a4e3 100644 --- a/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol @@ -29,9 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 2; + int256 pos_one = 0; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol index 22af4185..2407079e 100644 --- a/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol @@ -29,15 +29,15 @@ contract LVR { } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = -1; return pos_one; } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = -1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol index e241973d..a5082f3b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol @@ -29,15 +29,15 @@ contract LVR { } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = 2; return pos_one; } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol similarity index 89% rename from resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol rename to resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol index e06271e2..22af4185 100644 --- a/resources/regressions/test_log_invalid.json/mutants/36/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol @@ -11,9 +11,8 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 1; + uint256 zero = 0; return zero; } @@ -36,8 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = -1; return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol similarity index 89% rename from resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol rename to resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol index f2cb8295..e241973d 100644 --- a/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol @@ -17,9 +17,8 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 0; + uint256 one = 1; return one; } @@ -36,8 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = 1; return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol index 6141947b..dec84f24 100644 --- a/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x <= y; } // Expect 3 mutants: x < y, x == y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol index 9f8ccd04..0c05265c 100644 --- a/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x != y; } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol index 18e38f34..6141947b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return false; } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol index 55dd7c79..9f8ccd04 100644 --- a/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol @@ -10,9 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x < y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol index 52949d03..18e38f34 100644 --- a/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol @@ -10,14 +10,14 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x == y; } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x > y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol index a3e16320..55dd7c79 100644 --- a/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol @@ -10,14 +10,14 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return true; } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x > y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol index a9024427..52949d03 100644 --- a/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol @@ -15,9 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x >= y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol index 337c9a92..a3e16320 100644 --- a/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol @@ -15,14 +15,14 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x != y; } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol index 7c02b73b..a9024427 100644 --- a/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol @@ -15,14 +15,14 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return false; } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol index 3d299dfb..337c9a92 100644 --- a/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol @@ -20,9 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x > y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol index c865469b..7c02b73b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol @@ -20,14 +20,14 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x == y; } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x == y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol index 8cdc1c10..3d299dfb 100644 --- a/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol @@ -20,14 +20,14 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return true; } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x == y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol index de6a4360..c865469b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol @@ -25,9 +25,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` + /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x <= y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol index ab40e6c9..8cdc1c10 100644 --- a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol @@ -25,14 +25,14 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x >= y; } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x == y; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol index f42e7b7e..de6a4360 100644 --- a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol @@ -25,8 +25,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return false; } // Expect 2 mutants: true, false @@ -35,9 +36,8 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol index e5f50322..ab40e6c9 100644 --- a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol @@ -30,14 +30,14 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; + return false; } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol index 83684484..f42e7b7e 100644 --- a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x < y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol index 3ae92133..e5f50322 100644 --- a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol @@ -35,14 +35,14 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x > y; } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol index bdeac3af..83684484 100644 --- a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol @@ -35,8 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return true; } // Expect 2 mutants: true, false @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol index 430379f6..3ae92133 100644 --- a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol @@ -40,8 +40,9 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) == z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol index 3d67c155..bdeac3af 100644 --- a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol @@ -49,9 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return true; + return (x + y) > z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol index 13612614..430379f6 100644 --- a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol @@ -49,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) == z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true @@ -58,8 +59,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) < z; + return (x + y) != z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol index dd0c83ca..3d67c155 100644 --- a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol @@ -49,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true @@ -58,8 +59,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) != z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol index 84889114..13612614 100644 --- a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol @@ -58,8 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return true; + return (x + y) < z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol similarity index 93% rename from resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol index 0c05265c..dd0c83ca 100644 --- a/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) > z; } } diff --git a/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol similarity index 92% rename from resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol index 0c05265c..84889114 100644 --- a/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return true; } } diff --git a/resources/regressions/all_ops.json/mutants/73/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol similarity index 86% rename from resources/regressions/all_ops.json/mutants/73/UOR/UOR.sol rename to resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol index 5697ce92..50d09571 100644 --- a/resources/regressions/all_ops.json/mutants/73/UOR/UOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol @@ -10,9 +10,9 @@ contract UOR { } // Expect a single mutant: -x - /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;` + /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;` function signed_bw_not(int256 x) public pure returns (int256) { - return - ~x; + return -x; } // Expect a single mutant: ~x diff --git a/resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol similarity index 86% rename from resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol rename to resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol index 8a21a9d0..84eae0ca 100644 --- a/resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol @@ -15,8 +15,8 @@ contract UOR { } // Expect a single mutant: ~x - /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;` + /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;` function signed_neg(int256 x) public pure returns (int256) { - return ~ -x; + return ~x; } } diff --git a/resources/regressions/uor.json/gambit_results.json b/resources/regressions/uor.json/gambit_results.json index b793a020..3c8a447c 100644 --- a/resources/regressions/uor.json/gambit_results.json +++ b/resources/regressions/uor.json/gambit_results.json @@ -2,25 +2,25 @@ { "col": 16, "description": "UnaryOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return - ~x;\n }\n \n // Expect a single mutant: ~x\n", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return -x;\n }\n \n // Expect a single mutant: ~x\n", "id": "1", "line": 14, "name": "mutants/1/Ops/UOR/UOR.sol", "op": "UOR", "orig": "~", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", - "repl": " - " + "repl": "-" }, { "col": 16, "description": "UnaryOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~ -x;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~x;\n }\n }\n", "id": "2", "line": 19, "name": "mutants/2/Ops/UOR/UOR.sol", "op": "UOR", - "orig": "~", + "orig": "-", "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", - "repl": " ~ " + "repl": "~" } ] \ No newline at end of file diff --git a/resources/regressions/uor.json/mutants.log b/resources/regressions/uor.json/mutants.log index e8f32017..7cb9ea71 100644 --- a/resources/regressions/uor.json/mutants.log +++ b/resources/regressions/uor.json/mutants.log @@ -1,2 +1,2 @@ -1,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~, - -2,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,~, ~ +1,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~,- +2,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,-,~ diff --git a/resources/regressions/uor.json/mutants/1/Ops/UOR/UOR.sol b/resources/regressions/uor.json/mutants/1/Ops/UOR/UOR.sol index 5697ce92..50d09571 100644 --- a/resources/regressions/uor.json/mutants/1/Ops/UOR/UOR.sol +++ b/resources/regressions/uor.json/mutants/1/Ops/UOR/UOR.sol @@ -10,9 +10,9 @@ contract UOR { } // Expect a single mutant: -x - /// UnaryOperatorReplacement(`` |==> ` - `) of: `return ~x;` + /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;` function signed_bw_not(int256 x) public pure returns (int256) { - return - ~x; + return -x; } // Expect a single mutant: ~x diff --git a/resources/regressions/uor.json/mutants/2/Ops/UOR/UOR.sol b/resources/regressions/uor.json/mutants/2/Ops/UOR/UOR.sol index 8a21a9d0..84eae0ca 100644 --- a/resources/regressions/uor.json/mutants/2/Ops/UOR/UOR.sol +++ b/resources/regressions/uor.json/mutants/2/Ops/UOR/UOR.sol @@ -15,8 +15,8 @@ contract UOR { } // Expect a single mutant: ~x - /// UnaryOperatorReplacement(`` |==> ` ~ `) of: `return -x;` + /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;` function signed_neg(int256 x) public pure returns (int256) { - return ~ -x; + return ~x; } } diff --git a/src/mutation.rs b/src/mutation.rs index 1f814f34..507858a0 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -742,6 +742,9 @@ fn logical_op_replacement( Expression::Or { left, right, .. } => { vec![("LHS", left.loc()), ("RHS", right.loc()), ("true", loc)] } + Expression::Not { .. } => { + vec![("true", expr.loc()), ("false", expr.loc())] + } _ => { return vec![]; } From c20ad99c51ad9bd32a07725d314763a683b830c2 Mon Sep 17 00:00:00 2001 From: Chandrakana Nandi Date: Mon, 11 Sep 2023 14:56:18 -0700 Subject: [PATCH 155/200] nits --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index bb7cb804..315d515a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -72,7 +72,7 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box` based on this. let json_path = ¶ms.json.ok_or("No JSON Path")?; @@ -412,7 +412,7 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box) -> Result<(), Box Date: Mon, 11 Sep 2023 17:12:12 -0700 Subject: [PATCH 156/200] Refactor main to modularize warnings --- src/main.rs | 165 ++++++++++++++++++++++++++-------------------------- 1 file changed, 81 insertions(+), 84 deletions(-) diff --git a/src/main.rs b/src/main.rs index 315d515a..74296515 100644 --- a/src/main.rs +++ b/src/main.rs @@ -63,6 +63,82 @@ fn resolve_config_file_paths( Ok(result) } +fn print_experimental_feature_warnings(params: &MutateParams) { + // First, check for fallback mutations + if params.fallback_mutations.is_some() { + print_experimental_feature_warning("fallback_mutations", "1.0.0"); + } + + let experimental_mutation_operators = vec![("evr", "1.0.0")] + .iter() + .map(|item| (normalize_mutation_operator_name(item.0), item.1)) + .collect::>(); + + // Collect all mutation operators + let all_mutations = match (¶ms.mutations, ¶ms.fallback_mutations) { + (Some(mutations), None) => mutations.clone(), + (None, Some(fallback_mutations)) => fallback_mutations.clone(), + (Some(r1), Some(r2)) => r1.into_iter().chain(r2).cloned().collect(), + _ => vec![], + } + .iter() + .map(|name| normalize_mutation_operator_name(name)) + .collect::>(); + + for (mutation, version) in experimental_mutation_operators + .iter() + .filter(|(experimental_op, _)| all_mutations.contains(experimental_op)) + { + print_experimental_feature_warning( + format!("{}:{}", "MutationType", mutation).as_str(), + version, + ) + } +} + +fn print_deprecation_warnings(params: &MutateParams, is_cli: bool) { + // We want to format parameter names differently depending on if this + // parameter was from a CLI invocation or a configuration file + let format_param = |p: &str| { + if is_cli { + format!("--{}", p) + } else { + p.to_string() + } + }; + if params.sourceroot.is_some() { + print_deprecation_warning( + format_param("sourceroot").as_str(), + "1.0.0", + "sourceroot is no longer used and will be ignored", + ); + } + + if params.solc_base_path.is_some() { + print_deprecation_warning( + format_param("solc_base_path").as_str(), + "1.0.0", + "Use import_path instead", + ); + } + + if !params.solc_include_paths.is_empty() { + print_deprecation_warning( + format_param("solc_include_path").as_str(), + "1.0.0", + "Use import_path instead", + ); + } + + if params.solc_remappings.is_some() { + print_deprecation_warning( + format_param("solc_remapping").as_str(), + "1.0.0", + "Use import_path instead", + ); + } +} + fn run_mutate_on_json(params: Box) -> Result<(), Box> { // The user has specified a configuration file. // @@ -121,14 +197,6 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box) -> Result<(), Box) -> Result<(), Box p.to_str().unwrap().to_string(), Err(_) => { @@ -291,7 +326,6 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box) -> Result<(), Box) -> Result<(), Box) -> Result<(), Box) -> Result<(), Box> { log::info!("Running CLI MutateParams: {:#?}", ¶ms); - // Check for experimental arguments - if params.fallback_mutations.is_some() { - print_experimental_feature_warning("--fallback_mutations", "1.0.0"); - } - if let Some(ref mutations) = params.mutations { - let evr = normalize_mutation_operator_name("evr"); - for mutation in mutations { - if normalize_mutation_operator_name(mutation) == evr { - print_experimental_feature_warning( - "MutationType::ExpressionValueReplacement", - "1.0.0", - ); - } - } - } - if let Some(ref mutations) = params.fallback_mutations { - let evr = normalize_mutation_operator_name("evr"); - for mutation in mutations { - if normalize_mutation_operator_name(mutation) == evr { - print_experimental_feature_warning( - "MutationType::ExpressionValueReplacement", - "1.0.0", - ); - } - } - } - // # Path Resolution for CLI Provided Parameters - log::info!(" Performing File Resolution"); + print_deprecation_warnings(¶ms, true); + print_experimental_feature_warnings(¶ms); log::debug!(" [.] Resolving params.filename"); let filename = match params.filename { @@ -394,13 +401,6 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box) -> Result<(), Box p.to_str().unwrap().to_string(), Err(_) => { @@ -475,7 +474,6 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box p.to_str().unwrap().to_string(), @@ -514,7 +512,6 @@ fn run_mutate_on_filename(mut params: Box) -> Result<(), Box Date: Mon, 11 Sep 2023 17:42:08 -0700 Subject: [PATCH 157/200] Added warnings about deprecated mutate params --- src/mutator.rs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/mutator.rs b/src/mutator.rs index f81a8f90..c7934a46 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -1,6 +1,7 @@ use crate::{ default_gambit_output_directory, get_sol_path, mutation::MutationType, - normalize_mutation_operator_name, print_error, Mutant, MutateParams, Mutation, Solc, + normalize_mutation_operator_name, print_error, print_warning, Mutant, MutateParams, Mutation, + Solc, }; use clap::ValueEnum; use solang::{ @@ -119,15 +120,23 @@ impl From<&MutateParams> for Mutator { ); solc.with_optimize(params.solc_optimize); - if let Some(basepath) = params.solc_base_path.clone() { - solc.with_basepath(basepath); + if params.solc_base_path.is_some() { + print_warning( + "Invalid MutateParams: solc_base_path", + "solc_base_path is ignored. Use import_paths instead", + ); + } + + if params.solc_remappings.is_some() { + print_warning( + "Invalid MutateParams: solc_remappings", + "solc_remappings is ignored. Use import_maps instead", + ); } + if let Some(allowpaths) = params.solc_allow_paths.clone() { solc.with_allow_paths(allowpaths); } - if let Some(remappings) = params.solc_remappings.clone() { - solc.with_remappings(remappings); - } let mut filenames: Vec = vec![]; if let Some(filename) = ¶ms.filename { From dc30fc44f19b702c74531d957795e980147a8f65 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 17:44:29 -0700 Subject: [PATCH 158/200] comment --- src/mutator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mutator.rs b/src/mutator.rs index c7934a46..d8b10642 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -146,7 +146,7 @@ impl From<&MutateParams> for Mutator { let mut file_resolver = FileResolver::default(); - // Add base path to file resolver + // Add import paths to file resolver if params.import_paths.is_empty() { print_error( "No import paths found", From a9c74b9623121a49c453ca3cf4c0c5f1a09a3af8 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 17:45:51 -0700 Subject: [PATCH 159/200] comments --- src/mutator.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mutator.rs b/src/mutator.rs index d8b10642..700f0822 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -144,6 +144,9 @@ impl From<&MutateParams> for Mutator { filenames.push(filename.clone()); } + // Every mutator has a FileResolver. A FileResolver is a solang-provided + // struct that resolves files, performs import resolution, and then + // performs type resolution. let mut file_resolver = FileResolver::default(); // Add import paths to file resolver From c7afc9fc86559e53265b00dd5d0daf5007890659 Mon Sep 17 00:00:00 2001 From: Chandrakana Nandi Date: Mon, 11 Sep 2023 18:13:39 -0700 Subject: [PATCH 160/200] minor nit --- src/mutator.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mutator.rs b/src/mutator.rs index 700f0822..39627926 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -287,8 +287,9 @@ impl Mutator { std::process::exit(1); } log::info!("Parsing file {}", filename); + let os_filename = OsStr::new(filename); let ns = Rc::new(parse_and_resolve( - OsStr::new(filename), + os_filename, &mut self.file_resolver, solang::Target::EVM, )); @@ -298,7 +299,7 @@ impl Mutator { log::info!(" {} functions", ns.functions.len()); self.namespace = Some(ns.clone()); - let resolved = match self.file_resolver.resolve_file(None, OsStr::new(filename)) { + let resolved = match self.file_resolver.resolve_file(None, os_filename) { Ok(resolved) => resolved, Err(e) => { print_error( From b546868248450dc51e1ccc15693091aaa9ff1816 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 18:14:39 -0700 Subject: [PATCH 161/200] Cleaned up a thing --- src/mutator.rs | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/src/mutator.rs b/src/mutator.rs index 39627926..19273117 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -332,27 +332,28 @@ impl Mutator { continue; } } - if function.has_body { - let contract_name = if let Some(contract_no) = function.contract_no { - let contract = ns.contracts.get(contract_no).unwrap(); - format!("{}::", &contract.name) - } else { - "".to_string() - }; - log::info!( - "Processing function body for {}{}...", - contract_name, - &function.signature - ); - for statement in function.body.iter() { - statement.recurse(self, mutate_statement); - } - let end_no_mutants = self.mutants.len(); - log::info!( - " ...generated {} mutants", - end_no_mutants - start_no_mutants - ); + if function.is_accessor || function.is_virtual || !function.has_body { + continue; + } + let contract_name = if let Some(contract_no) = function.contract_no { + let contract = ns.contracts.get(contract_no).unwrap(); + format!("{}::", &contract.name) + } else { + "".to_string() + }; + log::info!( + "Processing function body for {}{}...", + contract_name, + &function.signature + ); + for statement in function.body.iter() { + statement.recurse(self, mutate_statement); } + let end_no_mutants = self.mutants.len(); + log::info!( + " ...generated {} mutants", + end_no_mutants - start_no_mutants + ); } self.namespace = None; Ok(self.mutants.clone()) From f935fdbe76bf114d5c4df097312db5f5213f49c1 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 18:31:27 -0700 Subject: [PATCH 162/200] Removed buggy log statement --- src/mutator.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/mutator.rs b/src/mutator.rs index 19273117..98adb5a9 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -311,13 +311,6 @@ impl Mutator { }; let file_path = resolved.full_path.clone(); - log::info!( - "Resolved {} to {:?} with import path {:?}", - filename, - resolved, - self.file_resolver - .get_import_path(resolved.import_no.unwrap()) - ); // mutate functions for function in ns.functions.iter() { let start_no_mutants = self.mutants.len(); From 3f73905da1dfdd9ac1870e730b1a14b66eafad3d Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 18:41:14 -0700 Subject: [PATCH 163/200] STUFF --- src/cli.rs | 9 ++++----- src/lib.rs | 5 ++++- src/mutator.rs | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index d087db04..c2be472d 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -8,7 +8,6 @@ static DEFAULT_SEED: u64 = 0; static DEFAULT_SKIP_VALIDATE: bool = false; static DEFAULT_LOG_INVALID: bool = false; static DEFAULT_SOLC_OPTIMIZE: bool = false; -static DEFAULT_SOLC: &str = "solc"; fn default_no_export_mutants() -> bool { DEFAULT_NO_EXPORT_MUTANTS @@ -38,8 +37,8 @@ fn default_solc_optimize() -> bool { DEFAULT_SOLC_OPTIMIZE } -fn default_solc() -> String { - DEFAULT_SOLC.to_string() +fn default_solc() -> Option { + None } fn default_source_root() -> Option { @@ -138,9 +137,9 @@ pub struct MutateParams { pub no_overwrite: bool, /// Solidity binary name, e.g., --solc solc8.10, --solc 7.5, etc. - #[arg(long, default_value = "solc", conflicts_with = "json")] + #[arg(long, default_value = "solc")] #[serde(default = "default_solc")] - pub solc: String, + pub solc: Option, /// Run solc with the `--optimize` flag #[arg(long, default_value = "false", conflicts_with = "json")] diff --git a/src/lib.rs b/src/lib.rs index 9010e53d..bccb6139 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -134,7 +134,10 @@ pub fn run_mutate( // TODO: Separate out Filtering from Validation // Check if we are filtering - let mut solc = Solc::new(params.solc.clone(), outdir_path.clone()); + let mut solc = Solc::new( + params.solc.clone().unwrap_or_else(|| "solc".to_string()), + outdir_path.clone(), + ); solc.with_vfs_roots_from_params(params); let mut validator = Validator { solc }; log::debug!("Validator: {:?}", validator); diff --git a/src/mutator.rs b/src/mutator.rs index 98adb5a9..e1a3eae3 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -111,7 +111,7 @@ impl From<&MutateParams> for Mutator { fn from(params: &MutateParams) -> Self { let conf = MutatorConf::from(params); let mut solc = Solc::new( - params.solc.clone(), + params.solc.clone().unwrap_or_else(|| "solc".to_string()), params .outdir .clone() From fc99e6831a366ab0ccec68723c0caa5cd96bdc16 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 18:43:21 -0700 Subject: [PATCH 164/200] solc is a passthrough arg --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index 74296515..d9d876b9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -212,6 +212,9 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box Date: Mon, 11 Sep 2023 19:05:48 -0700 Subject: [PATCH 165/200] Fix contract/function filtering regression --- src/mutator.rs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/mutator.rs b/src/mutator.rs index e1a3eae3..0070c2af 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -328,14 +328,28 @@ impl Mutator { if function.is_accessor || function.is_virtual || !function.has_body { continue; } - let contract_name = if let Some(contract_no) = function.contract_no { + let contract = if let Some(contract_no) = function.contract_no { let contract = ns.contracts.get(contract_no).unwrap(); - format!("{}::", &contract.name) + Some(format!("{}", &contract.name)) } else { - "".to_string() + None }; + + let contract_name = contract.unwrap_or_else(|| "".to_string()); + let function_name = function.name.clone(); + if let Some(ref funcs_to_mutate) = self.conf.funcs_to_mutate { + if !funcs_to_mutate.contains(&function_name) { + continue; + } + } + if let Some(ref contract_to_mutate) = self.conf.contract { + if &contract_name != contract_to_mutate { + continue; + } + } + log::info!( - "Processing function body for {}{}...", + "Processing function body for {}::{}...", contract_name, &function.signature ); From d15dfdc84123c994e058645e2f8ede2a499a46ca Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 19:10:36 -0700 Subject: [PATCH 166/200] Changed python to python3 --- scripts/run_regressions.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/run_regressions.sh b/scripts/run_regressions.sh index fa21538d..06ce6678 100644 --- a/scripts/run_regressions.sh +++ b/scripts/run_regressions.sh @@ -71,9 +71,8 @@ run_regressions() { regression_dir="$REGRESSIONS"/"$conf" # Get relative paths for nice printing - rel_conf_path=$(python -c "import os.path; print( os.path.relpath('$conf_path', '$(pwd)'))") - rel_regression_dir=$(python -c "import os.path; print( os.path.relpath('$regression_dir', '$(pwd)'))") - + rel_conf_path=$(python3 -c "import os.path; print( os.path.relpath('$conf_path', '$(pwd)'))") + rel_regression_dir=$(python3 -c "import os.path; print( os.path.relpath('$regression_dir', '$(pwd)'))") printf " %s \033[1mRunning:\033[0m %s\n" "$green_check" "gambit mutate --json $rel_conf_path" stdout="$("$GAMBIT_EXECUTABLE" mutate --json "$conf_path")" From e0facd0f9f0df161ba0f94bd3ea69e54904cae53 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 19:13:14 -0700 Subject: [PATCH 167/200] print gambit_executable instead of gambit --- scripts/run_regressions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run_regressions.sh b/scripts/run_regressions.sh index 06ce6678..381ff9c2 100644 --- a/scripts/run_regressions.sh +++ b/scripts/run_regressions.sh @@ -74,7 +74,7 @@ run_regressions() { rel_conf_path=$(python3 -c "import os.path; print( os.path.relpath('$conf_path', '$(pwd)'))") rel_regression_dir=$(python3 -c "import os.path; print( os.path.relpath('$regression_dir', '$(pwd)'))") - printf " %s \033[1mRunning:\033[0m %s\n" "$green_check" "gambit mutate --json $rel_conf_path" + printf " %s \033[1mRunning:\033[0m %s\n" "$green_check" "$GAMBIT_EXECUTABLE mutate --json $rel_conf_path" stdout="$("$GAMBIT_EXECUTABLE" mutate --json "$conf_path")" printf " %s \033[1mGambit Output:\033[0m '\033[3m%s\033[0m'\n" "$green_check" "$stdout" if diff -q -r gambit_out "$regression_dir" 1>/dev/null; then From aba1c8e682a90a77f75049d5aa508d3012889f6c Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 19:24:53 -0700 Subject: [PATCH 168/200] sol patch --- src/mutant_writer.rs | 11 ++++------- src/mutation.rs | 8 ++++---- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/mutant_writer.rs b/src/mutant_writer.rs index 1ac94e37..d935aa85 100644 --- a/src/mutant_writer.rs +++ b/src/mutant_writer.rs @@ -55,7 +55,7 @@ impl MutantWriter { w.write_record([ mid.to_string().as_str(), mutant.op.short_name().as_str(), - mutant.path().to_str().unwrap(), + mutant.sol_path().to_str().unwrap(), line_col.as_str(), mutant.orig.as_str(), mutant.repl.as_str(), @@ -81,7 +81,7 @@ impl MutantWriter { "op": mutant.op.short_name(), "id": mid.to_string(), "diff": diff, - "original": mutant.path(), + "original": mutant.sol_path(), "orig": &mutant.orig, "repl": &mutant.repl, "line": &mutant.get_line_column().0 + 1, @@ -113,7 +113,7 @@ impl MutantWriter { mutants_dir: &Path, mutant: &Mutant, ) -> Result> { - let filename = mutants_dir.join(mutant.path().to_str().unwrap()); + let filename = mutants_dir.join(mutant.sol_path()); let mutant_contents = mutant.mutant_source()?; log::debug!("Writing mutant {:?} to {}", mutant, &filename.display()); @@ -183,10 +183,7 @@ impl MutantWriter { /// This is computed from the relative path of the original sourcefile, relative to /// the specified `sourceroot`, and is computed with `Source.relative_filename()` fn get_mutant_filename(mutants_dir: &Path, mid: usize, mutant: &Mutant) -> PathBuf { - let rel_filename = match mutant.sol_path() { - Some(sol_path) => sol_path, - None => mutant.path().strip_prefix("/").unwrap(), - }; + let rel_filename = mutant.sol_path(); mutants_dir .join(Path::new(&mid.to_string())) .join(rel_filename) diff --git a/src/mutation.rs b/src/mutation.rs index 507858a0..e7eb9086 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -31,7 +31,7 @@ pub struct MutantLoc { pub path: PathBuf, /// The solidity path, relative to its import root, to the original source /// file; if a file path is specified absolutely then this is None - pub sol_path: Option, + pub sol_path: PathBuf, } impl Debug for MutantLoc { @@ -81,7 +81,7 @@ impl MutantLoc { line_no, col_no, path, - sol_path: Some(sol_path), + sol_path, } } } @@ -137,8 +137,8 @@ impl Mutant { &self.mutant_loc.path } - pub fn sol_path(&self) -> Option<&PathBuf> { - self.mutant_loc.sol_path.as_ref() + pub fn sol_path(&self) -> &PathBuf { + &self.mutant_loc.sol_path } pub fn get_line_column(&self) -> (usize, usize) { From 98c133e66b84860442188ced193b0e7f48ecd896 Mon Sep 17 00:00:00 2001 From: Chandrakana Nandi Date: Mon, 11 Sep 2023 19:27:11 -0700 Subject: [PATCH 169/200] updated regressions --- .../all_ops.json/gambit_results.json | 362 +++++---- .../regressions/all_ops.json/mutants.log | 151 ++-- .../all_ops.json/mutants/26/EDC/EDC.sol | 22 - .../mutants/26}/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/27/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/28/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/29/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/30/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/31/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/32/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/33/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/34/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/35/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/36/LOR/LOR.sol | 4 +- .../mutants/{48 => 37}/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/38/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/39/LVR/LVR.sol | 4 +- .../all_ops.json/mutants/40/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/41/LVR/LVR.sol | 4 +- .../all_ops.json/mutants/42/LVR/LVR.sol | 4 +- .../all_ops.json/mutants/43/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/44/LVR/LVR.sol | 4 +- .../all_ops.json/mutants/45/LVR/LVR.sol | 4 +- .../all_ops.json/mutants/46/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/47/LVR/LVR.sol | 4 +- .../mutants/48}/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/49/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/50/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/51/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/52/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/53/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/54/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/55/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/56/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/57/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/58/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/59/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/60/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/61/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/62/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/63/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/64/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/65/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/66/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/67/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/68/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/69/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/70/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/71/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/72/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/73/ROR/ROR.sol | 4 +- .../mutants/74}/UOR/UOR.sol | 6 +- .../all_ops.json/mutants/75/UOR/UOR.sol | 6 +- .../regressions/aor.json/gambit_results.json | 44 +- resources/regressions/aor.json/mutants.log | 44 +- .../regressions/bor.json/gambit_results.json | 6 +- resources/regressions/bor.json/mutants.log | 6 +- .../regressions/edc.json/gambit_results.json | 15 +- resources/regressions/edc.json/mutants.log | 1 - .../edc.json/mutants/1/Ops/EDC/EDC.sol | 22 - .../regressions/evr.json/gambit_results.json | 32 +- resources/regressions/evr.json/mutants.log | 32 +- .../regressions/lor.json/gambit_results.json | 22 +- resources/regressions/lor.json/mutants.log | 22 +- .../regressions/lvr.json/gambit_results.json | 22 +- resources/regressions/lvr.json/mutants.log | 22 +- .../no_import_path.json/gambit_results.json | 363 +-------- .../no_import_path.json/mutants.log | 30 - .../mutants/1/contracts/C.sol | 43 -- .../mutants/10/contracts/C.sol | 43 -- .../mutants/11/contracts/C.sol | 43 -- .../mutants/12/contracts/C.sol | 43 -- .../mutants/13/contracts/C.sol | 43 -- .../mutants/14/contracts/C.sol | 43 -- .../mutants/15/contracts/C.sol | 43 -- .../mutants/16/contracts/C.sol | 43 -- .../mutants/17/contracts/C.sol | 43 -- .../mutants/18/contracts/C.sol | 43 -- .../mutants/19/contracts/C.sol | 43 -- .../mutants/2/contracts/C.sol | 43 -- .../mutants/20/contracts/C.sol | 43 -- .../mutants/21/contracts/C.sol | 43 -- .../mutants/22/contracts/C.sol | 43 -- .../mutants/23/contracts/C.sol | 43 -- .../mutants/24/contracts/C.sol | 43 -- .../mutants/25/contracts/C.sol | 43 -- .../mutants/26/contracts/C.sol | 43 -- .../mutants/27/contracts/C.sol | 43 -- .../mutants/28/contracts/C.sol | 43 -- .../mutants/29/contracts/C.sol | 43 -- .../mutants/3/contracts/C.sol | 43 -- .../mutants/30/contracts/C.sol | 43 -- .../mutants/4/contracts/C.sol | 43 -- .../mutants/5/contracts/C.sol | 43 -- .../mutants/6/contracts/C.sol | 43 -- .../mutants/7/contracts/C.sol | 43 -- .../mutants/8/contracts/C.sol | 43 -- .../mutants/9/contracts/C.sol | 43 -- .../regressions/ror.json/gambit_results.json | 52 +- resources/regressions/ror.json/mutants.log | 52 +- .../test_import_map.json/gambit_results.json | 8 +- .../test_import_map.json/mutants.log | 8 +- .../test_log_invalid.json/gambit_results.json | 362 +++++---- .../test_log_invalid.json/invalid.log | 2 +- .../test_log_invalid.json/mutants.log | 151 ++-- .../mutants/26/EDC/EDC.sol | 22 - .../mutants/26}/LOR/LOR.sol | 6 +- .../mutants/27/LOR/LOR.sol | 4 +- .../mutants/28/LOR/LOR.sol | 4 +- .../mutants/29/LOR/LOR.sol | 6 +- .../mutants/30/LOR/LOR.sol | 4 +- .../mutants/31/LOR/LOR.sol | 4 +- .../mutants/32/LOR/LOR.sol | 6 +- .../mutants/33/LOR/LOR.sol | 4 +- .../mutants/34/LOR/LOR.sol | 4 +- .../mutants/35/LOR/LOR.sol | 6 +- .../mutants/36/LOR/LOR.sol | 4 +- .../mutants/{48 => 37}/LVR/LVR.sol | 6 +- .../mutants/38/LVR/LVR.sol | 6 +- .../mutants/39/LVR/LVR.sol | 4 +- .../mutants/40/LVR/LVR.sol | 6 +- .../mutants/41/LVR/LVR.sol | 4 +- .../mutants/42/LVR/LVR.sol | 4 +- .../mutants/43/LVR/LVR.sol | 6 +- .../mutants/44/LVR/LVR.sol | 4 +- .../mutants/45/LVR/LVR.sol | 4 +- .../mutants/46/LVR/LVR.sol | 6 +- .../mutants/47/LVR/LVR.sol | 4 +- .../mutants/48}/ROR/ROR.sol | 6 +- .../mutants/49/ROR/ROR.sol | 4 +- .../mutants/50/ROR/ROR.sol | 4 +- .../mutants/51/ROR/ROR.sol | 6 +- .../mutants/52/ROR/ROR.sol | 4 +- .../mutants/53/ROR/ROR.sol | 4 +- .../mutants/54/ROR/ROR.sol | 6 +- .../mutants/55/ROR/ROR.sol | 4 +- .../mutants/56/ROR/ROR.sol | 4 +- .../mutants/57/ROR/ROR.sol | 6 +- .../mutants/58/ROR/ROR.sol | 4 +- .../mutants/59/ROR/ROR.sol | 4 +- .../mutants/60/ROR/ROR.sol | 6 +- .../mutants/61/ROR/ROR.sol | 4 +- .../mutants/62/ROR/ROR.sol | 4 +- .../mutants/63/ROR/ROR.sol | 6 +- .../mutants/64/ROR/ROR.sol | 6 +- .../mutants/65/ROR/ROR.sol | 4 +- .../mutants/66/ROR/ROR.sol | 4 +- .../mutants/67/ROR/ROR.sol | 6 +- .../mutants/68/ROR/ROR.sol | 6 +- .../mutants/69/ROR/ROR.sol | 4 +- .../mutants/70/ROR/ROR.sol | 4 +- .../mutants/71/ROR/ROR.sol | 6 +- .../mutants/72/ROR/ROR.sol | 4 +- .../mutants/73/ROR/ROR.sol | 4 +- .../mutants/74}/UOR/UOR.sol | 6 +- .../mutants/75/UOR/UOR.sol | 6 +- .../gambit_results.json | 723 +----------------- .../mutants.log | 60 -- .../mutants/1/MultipleContracts/C.sol | 41 - .../mutants/10/MultipleContracts/C.sol | 41 - .../mutants/11/MultipleContracts/C.sol | 41 - .../mutants/12/MultipleContracts/C.sol | 41 - .../mutants/13/MultipleContracts/C.sol | 41 - .../mutants/14/MultipleContracts/C.sol | 41 - .../mutants/15/MultipleContracts/C.sol | 41 - .../mutants/16/MultipleContracts/C.sol | 41 - .../mutants/17/MultipleContracts/C.sol | 41 - .../mutants/18/MultipleContracts/C.sol | 41 - .../mutants/19/MultipleContracts/C.sol | 41 - .../mutants/2/MultipleContracts/C.sol | 41 - .../mutants/20/MultipleContracts/C.sol | 41 - .../mutants/21/MultipleContracts/C.sol | 41 - .../mutants/22/MultipleContracts/C.sol | 41 - .../mutants/23/MultipleContracts/C.sol | 41 - .../mutants/24/MultipleContracts/C.sol | 41 - .../mutants/25/MultipleContracts/C.sol | 41 - .../mutants/26/MultipleContracts/C.sol | 41 - .../mutants/27/MultipleContracts/C.sol | 41 - .../mutants/28/MultipleContracts/C.sol | 41 - .../mutants/29/MultipleContracts/C.sol | 41 - .../mutants/3/MultipleContracts/C.sol | 41 - .../mutants/30/MultipleContracts/C.sol | 41 - .../mutants/31/MultipleContracts/C.sol | 41 - .../mutants/32/MultipleContracts/C.sol | 41 - .../mutants/33/MultipleContracts/C.sol | 41 - .../mutants/34/MultipleContracts/C.sol | 41 - .../mutants/35/MultipleContracts/C.sol | 41 - .../mutants/36/MultipleContracts/C.sol | 41 - .../mutants/37/MultipleContracts/C.sol | 41 - .../mutants/38/MultipleContracts/C.sol | 41 - .../mutants/39/MultipleContracts/C.sol | 41 - .../mutants/4/MultipleContracts/C.sol | 41 - .../mutants/40/MultipleContracts/C.sol | 41 - .../mutants/41/MultipleContracts/C.sol | 41 - .../mutants/42/MultipleContracts/C.sol | 41 - .../mutants/43/MultipleContracts/C.sol | 41 - .../mutants/44/MultipleContracts/C.sol | 41 - .../mutants/45/MultipleContracts/C.sol | 41 - .../mutants/46/MultipleContracts/C.sol | 41 - .../mutants/47/MultipleContracts/C.sol | 41 - .../mutants/48/MultipleContracts/C.sol | 41 - .../mutants/49/MultipleContracts/C.sol | 41 - .../mutants/5/MultipleContracts/C.sol | 41 - .../mutants/50/MultipleContracts/C.sol | 41 - .../mutants/51/MultipleContracts/C.sol | 41 - .../mutants/52/MultipleContracts/C.sol | 41 - .../mutants/53/MultipleContracts/C.sol | 41 - .../mutants/54/MultipleContracts/C.sol | 41 - .../mutants/55/MultipleContracts/C.sol | 41 - .../mutants/56/MultipleContracts/C.sol | 41 - .../mutants/57/MultipleContracts/C.sol | 41 - .../mutants/58/MultipleContracts/C.sol | 41 - .../mutants/59/MultipleContracts/C.sol | 41 - .../mutants/6/MultipleContracts/C.sol | 41 - .../mutants/60/MultipleContracts/C.sol | 41 - .../mutants/7/MultipleContracts/C.sol | 41 - .../mutants/8/MultipleContracts/C.sol | 41 - .../mutants/9/MultipleContracts/C.sol | 41 - .../gambit_results.json | 723 +----------------- .../mutants.log | 60 -- .../mutants/1/MultipleContracts/C.sol | 41 - .../mutants/10/MultipleContracts/C.sol | 41 - .../mutants/11/MultipleContracts/C.sol | 41 - .../mutants/12/MultipleContracts/C.sol | 41 - .../mutants/13/MultipleContracts/C.sol | 41 - .../mutants/14/MultipleContracts/C.sol | 41 - .../mutants/15/MultipleContracts/C.sol | 41 - .../mutants/16/MultipleContracts/C.sol | 41 - .../mutants/17/MultipleContracts/C.sol | 41 - .../mutants/18/MultipleContracts/C.sol | 41 - .../mutants/19/MultipleContracts/C.sol | 41 - .../mutants/2/MultipleContracts/C.sol | 41 - .../mutants/20/MultipleContracts/C.sol | 41 - .../mutants/21/MultipleContracts/C.sol | 41 - .../mutants/22/MultipleContracts/C.sol | 41 - .../mutants/23/MultipleContracts/C.sol | 41 - .../mutants/24/MultipleContracts/C.sol | 41 - .../mutants/25/MultipleContracts/C.sol | 41 - .../mutants/26/MultipleContracts/C.sol | 41 - .../mutants/27/MultipleContracts/C.sol | 41 - .../mutants/28/MultipleContracts/C.sol | 41 - .../mutants/29/MultipleContracts/C.sol | 41 - .../mutants/3/MultipleContracts/C.sol | 41 - .../mutants/30/MultipleContracts/C.sol | 41 - .../mutants/31/MultipleContracts/C.sol | 41 - .../mutants/32/MultipleContracts/C.sol | 41 - .../mutants/33/MultipleContracts/C.sol | 41 - .../mutants/34/MultipleContracts/C.sol | 41 - .../mutants/35/MultipleContracts/C.sol | 41 - .../mutants/36/MultipleContracts/C.sol | 41 - .../mutants/37/MultipleContracts/C.sol | 41 - .../mutants/38/MultipleContracts/C.sol | 41 - .../mutants/39/MultipleContracts/C.sol | 41 - .../mutants/4/MultipleContracts/C.sol | 41 - .../mutants/40/MultipleContracts/C.sol | 41 - .../mutants/41/MultipleContracts/C.sol | 41 - .../mutants/42/MultipleContracts/C.sol | 41 - .../mutants/43/MultipleContracts/C.sol | 41 - .../mutants/44/MultipleContracts/C.sol | 41 - .../mutants/45/MultipleContracts/C.sol | 41 - .../mutants/46/MultipleContracts/C.sol | 41 - .../mutants/47/MultipleContracts/C.sol | 41 - .../mutants/48/MultipleContracts/C.sol | 41 - .../mutants/49/MultipleContracts/C.sol | 41 - .../mutants/5/MultipleContracts/C.sol | 41 - .../mutants/50/MultipleContracts/C.sol | 41 - .../mutants/51/MultipleContracts/C.sol | 41 - .../mutants/52/MultipleContracts/C.sol | 41 - .../mutants/53/MultipleContracts/C.sol | 41 - .../mutants/54/MultipleContracts/C.sol | 41 - .../mutants/55/MultipleContracts/C.sol | 41 - .../mutants/56/MultipleContracts/C.sol | 41 - .../mutants/57/MultipleContracts/C.sol | 41 - .../mutants/58/MultipleContracts/C.sol | 41 - .../mutants/59/MultipleContracts/C.sol | 41 - .../mutants/6/MultipleContracts/C.sol | 41 - .../mutants/60/MultipleContracts/C.sol | 41 - .../mutants/7/MultipleContracts/C.sol | 41 - .../mutants/8/MultipleContracts/C.sol | 41 - .../mutants/9/MultipleContracts/C.sol | 41 - .../gambit_results.json | 723 +----------------- .../mutants.log | 60 -- .../mutants/1/MultipleContracts/C.sol | 41 - .../mutants/10/MultipleContracts/C.sol | 41 - .../mutants/11/MultipleContracts/C.sol | 41 - .../mutants/12/MultipleContracts/C.sol | 41 - .../mutants/13/MultipleContracts/C.sol | 41 - .../mutants/14/MultipleContracts/C.sol | 41 - .../mutants/15/MultipleContracts/C.sol | 41 - .../mutants/16/MultipleContracts/C.sol | 41 - .../mutants/17/MultipleContracts/C.sol | 41 - .../mutants/18/MultipleContracts/C.sol | 41 - .../mutants/19/MultipleContracts/C.sol | 41 - .../mutants/2/MultipleContracts/C.sol | 41 - .../mutants/20/MultipleContracts/C.sol | 41 - .../mutants/21/MultipleContracts/C.sol | 41 - .../mutants/22/MultipleContracts/C.sol | 41 - .../mutants/23/MultipleContracts/C.sol | 41 - .../mutants/24/MultipleContracts/C.sol | 41 - .../mutants/25/MultipleContracts/C.sol | 41 - .../mutants/26/MultipleContracts/C.sol | 41 - .../mutants/27/MultipleContracts/C.sol | 41 - .../mutants/28/MultipleContracts/C.sol | 41 - .../mutants/29/MultipleContracts/C.sol | 41 - .../mutants/3/MultipleContracts/C.sol | 41 - .../mutants/30/MultipleContracts/C.sol | 41 - .../mutants/31/MultipleContracts/C.sol | 41 - .../mutants/32/MultipleContracts/C.sol | 41 - .../mutants/33/MultipleContracts/C.sol | 41 - .../mutants/34/MultipleContracts/C.sol | 41 - .../mutants/35/MultipleContracts/C.sol | 41 - .../mutants/36/MultipleContracts/C.sol | 41 - .../mutants/37/MultipleContracts/C.sol | 41 - .../mutants/38/MultipleContracts/C.sol | 41 - .../mutants/39/MultipleContracts/C.sol | 41 - .../mutants/4/MultipleContracts/C.sol | 41 - .../mutants/40/MultipleContracts/C.sol | 41 - .../mutants/41/MultipleContracts/C.sol | 41 - .../mutants/42/MultipleContracts/C.sol | 41 - .../mutants/43/MultipleContracts/C.sol | 41 - .../mutants/44/MultipleContracts/C.sol | 41 - .../mutants/45/MultipleContracts/C.sol | 41 - .../mutants/46/MultipleContracts/C.sol | 41 - .../mutants/47/MultipleContracts/C.sol | 41 - .../mutants/48/MultipleContracts/C.sol | 41 - .../mutants/49/MultipleContracts/C.sol | 41 - .../mutants/5/MultipleContracts/C.sol | 41 - .../mutants/50/MultipleContracts/C.sol | 41 - .../mutants/51/MultipleContracts/C.sol | 41 - .../mutants/52/MultipleContracts/C.sol | 41 - .../mutants/53/MultipleContracts/C.sol | 41 - .../mutants/54/MultipleContracts/C.sol | 41 - .../mutants/55/MultipleContracts/C.sol | 41 - .../mutants/56/MultipleContracts/C.sol | 41 - .../mutants/57/MultipleContracts/C.sol | 41 - .../mutants/58/MultipleContracts/C.sol | 41 - .../mutants/59/MultipleContracts/C.sol | 41 - .../mutants/6/MultipleContracts/C.sol | 41 - .../mutants/60/MultipleContracts/C.sol | 41 - .../mutants/7/MultipleContracts/C.sol | 41 - .../mutants/8/MultipleContracts/C.sol | 41 - .../mutants/9/MultipleContracts/C.sol | 41 - .../gambit_results.json | 315 +------- .../mutants.log | 26 - .../mutants/1/MultipleContracts/C.sol | 41 - .../mutants/10/MultipleContracts/C.sol | 41 - .../mutants/11/MultipleContracts/C.sol | 41 - .../mutants/12/MultipleContracts/C.sol | 41 - .../mutants/13/MultipleContracts/C.sol | 41 - .../mutants/14/MultipleContracts/C.sol | 41 - .../mutants/15/MultipleContracts/C.sol | 41 - .../mutants/16/MultipleContracts/C.sol | 41 - .../mutants/17/MultipleContracts/C.sol | 41 - .../mutants/18/MultipleContracts/C.sol | 41 - .../mutants/19/MultipleContracts/C.sol | 41 - .../mutants/2/MultipleContracts/C.sol | 41 - .../mutants/20/MultipleContracts/C.sol | 41 - .../mutants/21/MultipleContracts/C.sol | 41 - .../mutants/22/MultipleContracts/C.sol | 41 - .../mutants/23/MultipleContracts/C.sol | 41 - .../mutants/24/MultipleContracts/C.sol | 41 - .../mutants/25/MultipleContracts/C.sol | 41 - .../mutants/26/MultipleContracts/C.sol | 41 - .../mutants/3/MultipleContracts/C.sol | 41 - .../mutants/4/MultipleContracts/C.sol | 41 - .../mutants/5/MultipleContracts/C.sol | 41 - .../mutants/6/MultipleContracts/C.sol | 41 - .../mutants/7/MultipleContracts/C.sol | 41 - .../mutants/8/MultipleContracts/C.sol | 41 - .../mutants/9/MultipleContracts/C.sol | 41 - .../gambit_results.json | 414 +--------- .../test_multiple_files_1.json/mutants.log | 84 +- .../mutants/28/MultipleContracts/C.sol | 41 - .../mutants/29/MultipleContracts/C.sol | 41 - .../mutants/30/MultipleContracts/C.sol | 41 - .../mutants/31/MultipleContracts/C.sol | 41 - .../mutants/32/MultipleContracts/C.sol | 41 - .../mutants/33/MultipleContracts/C.sol | 41 - .../mutants/34/MultipleContracts/C.sol | 41 - .../mutants/35/MultipleContracts/C.sol | 41 - .../mutants/36/MultipleContracts/C.sol | 41 - .../mutants/37/MultipleContracts/C.sol | 41 - .../mutants/38/MultipleContracts/C.sol | 41 - .../mutants/39/MultipleContracts/C.sol | 41 - .../mutants/40/MultipleContracts/C.sol | 41 - .../mutants/41/MultipleContracts/C.sol | 41 - .../mutants/42/MultipleContracts/C.sol | 41 - .../mutants/43/MultipleContracts/C.sol | 41 - .../mutants/44/MultipleContracts/C.sol | 41 - .../mutants/45/MultipleContracts/C.sol | 41 - .../mutants/46/MultipleContracts/C.sol | 41 - .../mutants/47/MultipleContracts/C.sol | 41 - .../mutants/48/MultipleContracts/C.sol | 41 - .../mutants/49/MultipleContracts/C.sol | 41 - .../mutants/50/MultipleContracts/C.sol | 41 - .../mutants/51/MultipleContracts/C.sol | 41 - .../mutants/52/MultipleContracts/C.sol | 41 - .../mutants/53/MultipleContracts/C.sol | 41 - .../mutants/54/MultipleContracts/C.sol | 41 - .../mutants/55/MultipleContracts/C.sol | 41 - .../mutants/56/MultipleContracts/C.sol | 41 - .../mutants/57/MultipleContracts/C.sol | 41 - .../test_no_export.json/gambit_results.json | 56 +- .../test_no_export.json/mutants.log | 56 +- .../test_num_mutants.json/gambit_results.json | 10 +- .../test_num_mutants.json/mutants.log | 10 +- .../test_seed.json/gambit_results.json | 20 +- .../regressions/test_seed.json/mutants.log | 20 +- .../regressions/uor.json/gambit_results.json | 4 +- resources/regressions/uor.json/mutants.log | 4 +- 410 files changed, 1079 insertions(+), 15614 deletions(-) delete mode 100644 resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol rename resources/regressions/{test_log_invalid.json/mutants/37 => all_ops.json/mutants/26}/LOR/LOR.sol (85%) rename resources/regressions/all_ops.json/mutants/{48 => 37}/LVR/LVR.sol (89%) rename resources/regressions/{test_log_invalid.json/mutants/74 => all_ops.json/mutants/48}/ROR/ROR.sol (92%) rename resources/regressions/{test_log_invalid.json/mutants/76 => all_ops.json/mutants/74}/UOR/UOR.sol (83%) delete mode 100644 resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/1/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/10/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/11/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/12/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/13/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/14/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/15/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/16/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/17/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/18/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/19/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/2/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/20/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/21/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/22/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/23/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/24/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/25/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/26/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/27/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/28/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/29/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/3/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/30/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/4/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/5/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/6/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/7/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/8/contracts/C.sol delete mode 100644 resources/regressions/no_import_path.json/mutants/9/contracts/C.sol delete mode 100644 resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol rename resources/regressions/{all_ops.json/mutants/37 => test_log_invalid.json/mutants/26}/LOR/LOR.sol (85%) rename resources/regressions/test_log_invalid.json/mutants/{48 => 37}/LVR/LVR.sol (89%) rename resources/regressions/{all_ops.json/mutants/74 => test_log_invalid.json/mutants/48}/ROR/ROR.sol (92%) rename resources/regressions/{all_ops.json/mutants/76 => test_log_invalid.json/mutants/74}/UOR/UOR.sol (83%) delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol delete mode 100644 resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol diff --git a/resources/regressions/all_ops.json/gambit_results.json b/resources/regressions/all_ops.json/gambit_results.json index ff8134f5..1ad7397a 100644 --- a/resources/regressions/all_ops.json/gambit_results.json +++ b/resources/regressions/all_ops.json/gambit_results.json @@ -8,7 +8,7 @@ "name": "mutants/1/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -20,7 +20,7 @@ "name": "mutants/2/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "*" }, { @@ -32,7 +32,7 @@ "name": "mutants/3/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -44,7 +44,7 @@ "name": "mutants/4/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -56,7 +56,7 @@ "name": "mutants/5/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" }, { @@ -68,7 +68,7 @@ "name": "mutants/6/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "*" }, { @@ -80,7 +80,7 @@ "name": "mutants/7/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -92,7 +92,7 @@ "name": "mutants/8/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -104,7 +104,7 @@ "name": "mutants/9/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" }, { @@ -116,7 +116,7 @@ "name": "mutants/10/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -128,7 +128,7 @@ "name": "mutants/11/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -140,7 +140,7 @@ "name": "mutants/12/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -152,7 +152,7 @@ "name": "mutants/13/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" }, { @@ -164,7 +164,7 @@ "name": "mutants/14/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -176,7 +176,7 @@ "name": "mutants/15/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -188,7 +188,7 @@ "name": "mutants/16/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "**" }, { @@ -200,7 +200,7 @@ "name": "mutants/17/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -212,7 +212,7 @@ "name": "mutants/18/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" }, { @@ -224,7 +224,7 @@ "name": "mutants/19/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -236,7 +236,7 @@ "name": "mutants/20/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "*" }, { @@ -248,7 +248,7 @@ "name": "mutants/21/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -260,7 +260,7 @@ "name": "mutants/22/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -272,7 +272,7 @@ "name": "mutants/23/BOR/BOR.sol", "op": "BOR", "orig": "|", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "BOR/BOR.sol", "repl": "&" }, { @@ -284,7 +284,7 @@ "name": "mutants/24/BOR/BOR.sol", "op": "BOR", "orig": "&", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "BOR/BOR.sol", "repl": "|" }, { @@ -296,619 +296,607 @@ "name": "mutants/25/BOR/BOR.sol", "op": "BOR", "orig": "^", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "BOR/BOR.sol", "repl": "&" }, - { - "col": 38, - "description": "ElimDelegateCall", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", - "id": "26", - "line": 16, - "name": "mutants/26/EDC/EDC.sol", - "op": "EDC", - "orig": "delegatecall", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", - "repl": "call" - }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "27", + "id": "26", "line": 9, - "name": "mutants/27/LOR/LOR.sol", + "name": "mutants/26/LOR/LOR.sol", "op": "LOR", "orig": "a && b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "a" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "28", + "id": "27", "line": 9, - "name": "mutants/28/LOR/LOR.sol", + "name": "mutants/27/LOR/LOR.sol", "op": "LOR", "orig": "a && b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "b" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "29", + "id": "28", "line": 9, - "name": "mutants/29/LOR/LOR.sol", + "name": "mutants/28/LOR/LOR.sol", "op": "LOR", "orig": "a && b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "false" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "30", + "id": "29", "line": 14, - "name": "mutants/30/LOR/LOR.sol", + "name": "mutants/29/LOR/LOR.sol", "op": "LOR", "orig": "a || b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "a" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "31", + "id": "30", "line": 14, - "name": "mutants/31/LOR/LOR.sol", + "name": "mutants/30/LOR/LOR.sol", "op": "LOR", "orig": "a || b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "b" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "32", + "id": "31", "line": 14, - "name": "mutants/32/LOR/LOR.sol", + "name": "mutants/31/LOR/LOR.sol", "op": "LOR", "orig": "a || b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "true" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n \n function not(bool a) public pure returns (bool) {\n", - "id": "33", + "id": "32", "line": 19, - "name": "mutants/33/LOR/LOR.sol", + "name": "mutants/32/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "x < y" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n \n function not(bool a) public pure returns (bool) {\n", - "id": "34", + "id": "33", "line": 19, - "name": "mutants/34/LOR/LOR.sol", + "name": "mutants/33/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "a != (x >= y)" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n \n function not(bool a) public pure returns (bool) {\n", - "id": "35", + "id": "34", "line": 19, - "name": "mutants/35/LOR/LOR.sol", + "name": "mutants/34/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "true" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -19,7 +19,8 @@\n return (x < y) || (a != (x >= y));\n }\n \n+ /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;`\n function not(bool a) public pure returns (bool) {\n- return !a;\n+ return true;\n }\n }\n", - "id": "36", + "id": "35", "line": 23, - "name": "mutants/36/LOR/LOR.sol", + "name": "mutants/35/LOR/LOR.sol", "op": "LOR", "orig": "!a", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "true" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -19,7 +19,8 @@\n return (x < y) || (a != (x >= y));\n }\n \n+ /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;`\n function not(bool a) public pure returns (bool) {\n- return !a;\n+ return false;\n }\n }\n", - "id": "37", + "id": "36", "line": 23, - "name": "mutants/37/LOR/LOR.sol", + "name": "mutants/36/LOR/LOR.sol", "op": "LOR", "orig": "!a", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "false" }, { "col": 24, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", - "id": "38", + "id": "37", "line": 15, - "name": "mutants/38/LVR/LVR.sol", + "name": "mutants/37/LVR/LVR.sol", "op": "LVR", "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "1" }, { "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", - "id": "39", + "id": "38", "line": 21, - "name": "mutants/39/LVR/LVR.sol", + "name": "mutants/38/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "0" }, { "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", - "id": "40", + "id": "39", "line": 21, - "name": "mutants/40/LVR/LVR.sol", + "name": "mutants/39/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "2" }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", - "id": "41", + "id": "40", "line": 27, - "name": "mutants/41/LVR/LVR.sol", + "name": "mutants/40/LVR/LVR.sol", "op": "LVR", "orig": "-1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "0" }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", - "id": "42", + "id": "41", "line": 27, - "name": "mutants/42/LVR/LVR.sol", + "name": "mutants/41/LVR/LVR.sol", "op": "LVR", "orig": "-1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "1" }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", - "id": "43", + "id": "42", "line": 27, - "name": "mutants/43/LVR/LVR.sol", + "name": "mutants/42/LVR/LVR.sol", "op": "LVR", "orig": "-1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "-2" }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", - "id": "44", + "id": "43", "line": 33, - "name": "mutants/44/LVR/LVR.sol", + "name": "mutants/43/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "0" }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", - "id": "45", + "id": "44", "line": 33, - "name": "mutants/45/LVR/LVR.sol", + "name": "mutants/44/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "-1" }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", - "id": "46", + "id": "45", "line": 33, - "name": "mutants/46/LVR/LVR.sol", + "name": "mutants/45/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "2" }, { "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", - "id": "47", + "id": "46", "line": 39, - "name": "mutants/47/LVR/LVR.sol", + "name": "mutants/46/LVR/LVR.sol", "op": "LVR", "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "-1" }, { "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", - "id": "48", + "id": "47", "line": 39, - "name": "mutants/48/LVR/LVR.sol", + "name": "mutants/47/LVR/LVR.sol", "op": "LVR", "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "1" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "49", + "id": "48", "line": 9, - "name": "mutants/49/ROR/ROR.sol", + "name": "mutants/48/ROR/ROR.sol", "op": "ROR", "orig": "<", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "<=" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "50", + "id": "49", "line": 9, - "name": "mutants/50/ROR/ROR.sol", + "name": "mutants/49/ROR/ROR.sol", "op": "ROR", "orig": "<", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "!=" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "51", + "id": "50", "line": 9, - "name": "mutants/51/ROR/ROR.sol", + "name": "mutants/50/ROR/ROR.sol", "op": "ROR", "orig": "x < y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "false" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "52", + "id": "51", "line": 14, - "name": "mutants/52/ROR/ROR.sol", + "name": "mutants/51/ROR/ROR.sol", "op": "ROR", "orig": "<=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "<" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "53", + "id": "52", "line": 14, - "name": "mutants/53/ROR/ROR.sol", + "name": "mutants/52/ROR/ROR.sol", "op": "ROR", "orig": "<=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "==" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "54", + "id": "53", "line": 14, - "name": "mutants/54/ROR/ROR.sol", + "name": "mutants/53/ROR/ROR.sol", "op": "ROR", "orig": "x <= y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "true" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "55", + "id": "54", "line": 19, - "name": "mutants/55/ROR/ROR.sol", + "name": "mutants/54/ROR/ROR.sol", "op": "ROR", "orig": ">", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": ">=" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "56", + "id": "55", "line": 19, - "name": "mutants/56/ROR/ROR.sol", + "name": "mutants/55/ROR/ROR.sol", "op": "ROR", "orig": ">", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "!=" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "57", + "id": "56", "line": 19, - "name": "mutants/57/ROR/ROR.sol", + "name": "mutants/56/ROR/ROR.sol", "op": "ROR", "orig": "x > y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "false" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "58", + "id": "57", "line": 24, - "name": "mutants/58/ROR/ROR.sol", + "name": "mutants/57/ROR/ROR.sol", "op": "ROR", "orig": ">=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": ">" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "59", + "id": "58", "line": 24, - "name": "mutants/59/ROR/ROR.sol", + "name": "mutants/58/ROR/ROR.sol", "op": "ROR", "orig": ">=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "==" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "60", + "id": "59", "line": 24, - "name": "mutants/60/ROR/ROR.sol", + "name": "mutants/59/ROR/ROR.sol", "op": "ROR", "orig": "x >= y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "true" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "61", + "id": "60", "line": 29, - "name": "mutants/61/ROR/ROR.sol", + "name": "mutants/60/ROR/ROR.sol", "op": "ROR", "orig": "==", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "<=" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "62", + "id": "61", "line": 29, - "name": "mutants/62/ROR/ROR.sol", + "name": "mutants/61/ROR/ROR.sol", "op": "ROR", "orig": "==", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": ">=" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "63", + "id": "62", "line": 29, - "name": "mutants/63/ROR/ROR.sol", + "name": "mutants/62/ROR/ROR.sol", "op": "ROR", "orig": "x == y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "false" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", - "id": "64", + "id": "63", "line": 34, - "name": "mutants/64/ROR/ROR.sol", + "name": "mutants/63/ROR/ROR.sol", "op": "ROR", "orig": "x == y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "false" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "65", + "id": "64", "line": 39, - "name": "mutants/65/ROR/ROR.sol", + "name": "mutants/64/ROR/ROR.sol", "op": "ROR", "orig": "!=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "<" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "66", + "id": "65", "line": 39, - "name": "mutants/66/ROR/ROR.sol", + "name": "mutants/65/ROR/ROR.sol", "op": "ROR", "orig": "!=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": ">" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "67", + "id": "66", "line": 39, - "name": "mutants/67/ROR/ROR.sol", + "name": "mutants/66/ROR/ROR.sol", "op": "ROR", "orig": "x != y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "true" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", - "id": "68", + "id": "67", "line": 44, - "name": "mutants/68/ROR/ROR.sol", + "name": "mutants/67/ROR/ROR.sol", "op": "ROR", "orig": "x != y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "true" }, { "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "69", + "id": "68", "line": 53, - "name": "mutants/69/ROR/ROR.sol", + "name": "mutants/68/ROR/ROR.sol", "op": "ROR", "orig": ">=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": ">" }, { "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "70", + "id": "69", "line": 53, - "name": "mutants/70/ROR/ROR.sol", + "name": "mutants/69/ROR/ROR.sol", "op": "ROR", "orig": ">=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "==" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "71", + "id": "70", "line": 53, - "name": "mutants/71/ROR/ROR.sol", + "name": "mutants/70/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) >= z", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "true" }, { "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", - "id": "72", + "id": "71", "line": 62, - "name": "mutants/72/ROR/ROR.sol", + "name": "mutants/71/ROR/ROR.sol", "op": "ROR", "orig": "!=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "<" }, { "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", - "id": "73", + "id": "72", "line": 62, - "name": "mutants/73/ROR/ROR.sol", + "name": "mutants/72/ROR/ROR.sol", "op": "ROR", "orig": "!=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": ">" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", - "id": "74", + "id": "73", "line": 62, - "name": "mutants/74/ROR/ROR.sol", + "name": "mutants/73/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) != z", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "true" }, { "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return -x;\n }\n \n // Expect a single mutant: ~x\n", - "id": "75", + "id": "74", "line": 14, - "name": "mutants/75/UOR/UOR.sol", + "name": "mutants/74/UOR/UOR.sol", "op": "UOR", "orig": "~", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "original": "UOR/UOR.sol", "repl": "-" }, { "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~x;\n }\n }\n", - "id": "76", + "id": "75", "line": 19, - "name": "mutants/76/UOR/UOR.sol", + "name": "mutants/75/UOR/UOR.sol", "op": "UOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "original": "UOR/UOR.sol", "repl": "~" } ] \ No newline at end of file diff --git a/resources/regressions/all_ops.json/mutants.log b/resources/regressions/all_ops.json/mutants.log index 72462c57..f0068ce4 100644 --- a/resources/regressions/all_ops.json/mutants.log +++ b/resources/regressions/all_ops.json/mutants.log @@ -1,76 +1,75 @@ -1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,- -2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,* -3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,/ -4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,% -5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,+ -6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,* -7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,/ -8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,% -9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,+ -10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,- -11,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,/ -12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,% -13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,+ -14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,- -15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,/ -16,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,** -17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,% -18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,+ -19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,- -20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,* -21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,/ -22,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,% -23,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,10:18,|,& -24,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,16:18,&,| -25,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,22:18,^,& -26,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,16:38,delegatecall,call -27,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,a -28,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,b -29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,false -30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,a -31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,b -32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,true -33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y -34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) -35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true -36,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,23:16,!a,true -37,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,23:16,!a,false -38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 -39,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 -40,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 -41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 -42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 -43,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 -44,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 -45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 -46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 -47,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 -48,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 -49,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,<= -50,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,!= -51,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:16,x < y,false -52,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,< -53,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,== -54,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:16,x <= y,true -55,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,>= -56,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,!= -57,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:16,x > y,false -58,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,> -59,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,== -60,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:16,x >= y,true -61,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,<= -62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,>= -63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:16,x == y,false -64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,34:16,x == y,false -65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,< -66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,> -67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:16,x != y,true -68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,44:16,x != y,true -69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,> -70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,== -71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:16,(x + y) >= z,true -72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,< -73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,> -74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:16,(x + y) != z,true -75,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~,- -76,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,-,~ +1,AOR,AOR/AOR.sol,13:18,+,- +2,AOR,AOR/AOR.sol,13:18,+,* +3,AOR,AOR/AOR.sol,13:18,+,/ +4,AOR,AOR/AOR.sol,13:18,+,% +5,AOR,AOR/AOR.sol,22:18,-,+ +6,AOR,AOR/AOR.sol,22:18,-,* +7,AOR,AOR/AOR.sol,22:18,-,/ +8,AOR,AOR/AOR.sol,22:18,-,% +9,AOR,AOR/AOR.sol,34:22,*,+ +10,AOR,AOR/AOR.sol,34:22,*,- +11,AOR,AOR/AOR.sol,34:22,*,/ +12,AOR,AOR/AOR.sol,34:22,*,% +13,AOR,AOR/AOR.sol,47:22,*,+ +14,AOR,AOR/AOR.sol,47:22,*,- +15,AOR,AOR/AOR.sol,47:22,*,/ +16,AOR,AOR/AOR.sol,47:22,*,** +17,AOR,AOR/AOR.sol,47:22,*,% +18,AOR,AOR/AOR.sol,58:18,**,+ +19,AOR,AOR/AOR.sol,58:18,**,- +20,AOR,AOR/AOR.sol,58:18,**,* +21,AOR,AOR/AOR.sol,58:18,**,/ +22,AOR,AOR/AOR.sol,58:18,**,% +23,BOR,BOR/BOR.sol,10:18,|,& +24,BOR,BOR/BOR.sol,16:18,&,| +25,BOR,BOR/BOR.sol,22:18,^,& +26,LOR,LOR/LOR.sol,9:16,a && b,a +27,LOR,LOR/LOR.sol,9:16,a && b,b +28,LOR,LOR/LOR.sol,9:16,a && b,false +29,LOR,LOR/LOR.sol,14:16,a || b,a +30,LOR,LOR/LOR.sol,14:16,a || b,b +31,LOR,LOR/LOR.sol,14:16,a || b,true +32,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y +33,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) +34,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true +35,LOR,LOR/LOR.sol,23:16,!a,true +36,LOR,LOR/LOR.sol,23:16,!a,false +37,LVR,LVR/LVR.sol,15:24,0,1 +38,LVR,LVR/LVR.sol,21:23,1,0 +39,LVR,LVR/LVR.sol,21:23,1,2 +40,LVR,LVR/LVR.sol,27:26,-1,0 +41,LVR,LVR/LVR.sol,27:26,-1,1 +42,LVR,LVR/LVR.sol,27:26,-1,-2 +43,LVR,LVR/LVR.sol,33:26,1,0 +44,LVR,LVR/LVR.sol,33:26,1,-1 +45,LVR,LVR/LVR.sol,33:26,1,2 +46,LVR,LVR/LVR.sol,39:23,0,-1 +47,LVR,LVR/LVR.sol,39:23,0,1 +48,ROR,ROR/ROR.sol,9:18,<,<= +49,ROR,ROR/ROR.sol,9:18,<,!= +50,ROR,ROR/ROR.sol,9:16,x < y,false +51,ROR,ROR/ROR.sol,14:18,<=,< +52,ROR,ROR/ROR.sol,14:18,<=,== +53,ROR,ROR/ROR.sol,14:16,x <= y,true +54,ROR,ROR/ROR.sol,19:18,>,>= +55,ROR,ROR/ROR.sol,19:18,>,!= +56,ROR,ROR/ROR.sol,19:16,x > y,false +57,ROR,ROR/ROR.sol,24:18,>=,> +58,ROR,ROR/ROR.sol,24:18,>=,== +59,ROR,ROR/ROR.sol,24:16,x >= y,true +60,ROR,ROR/ROR.sol,29:18,==,<= +61,ROR,ROR/ROR.sol,29:18,==,>= +62,ROR,ROR/ROR.sol,29:16,x == y,false +63,ROR,ROR/ROR.sol,34:16,x == y,false +64,ROR,ROR/ROR.sol,39:18,!=,< +65,ROR,ROR/ROR.sol,39:18,!=,> +66,ROR,ROR/ROR.sol,39:16,x != y,true +67,ROR,ROR/ROR.sol,44:16,x != y,true +68,ROR,ROR/ROR.sol,53:24,>=,> +69,ROR,ROR/ROR.sol,53:24,>=,== +70,ROR,ROR/ROR.sol,53:16,(x + y) >= z,true +71,ROR,ROR/ROR.sol,62:24,!=,< +72,ROR,ROR/ROR.sol,62:24,!=,> +73,ROR,ROR/ROR.sol,62:16,(x + y) != z,true +74,UOR,UOR/UOR.sol,14:16,~,- +75,UOR,UOR/UOR.sol,19:16,-,~ diff --git a/resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol b/resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol deleted file mode 100644 index 19754976..00000000 --- a/resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.13; - -contract Helper { - function setVars(uint _num) public payable {} -} - -contract EDC { - uint public num; - address public sender; - uint public value; - bool public delegateSuccessful; - bytes public myData; - - /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(` - function setVars(address _contract) public payable { - (bool success, ) = _contract.call( - abi.encodeWithSignature("setVars(uint256)", 1) - ); - require(success, "Delegatecall failed"); - } -} diff --git a/resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/26/LOR/LOR.sol similarity index 85% rename from resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol rename to resources/regressions/all_ops.json/mutants/26/LOR/LOR.sol index 35ee5751..01536cd6 100644 --- a/resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/26/LOR/LOR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a && b; + return a; } // Expect three mutants: a, b, true @@ -19,8 +20,7 @@ contract LOR { return (x < y) || (a != (x >= y)); } - /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;` function not(bool a) public pure returns (bool) { - return false; + return !a; } } diff --git a/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol index 01536cd6..c97e8675 100644 --- a/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` + /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a; + return b; } // Expect three mutants: a, b, true diff --git a/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol index c97e8675..492dc45c 100644 --- a/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` + /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return b; + return false; } // Expect three mutants: a, b, true diff --git a/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol index 492dc45c..7f62ba05 100644 --- a/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return false; + return a && b; } // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a || b; + return a; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol index 7f62ba05..efb5d5a8 100644 --- a/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol @@ -10,9 +10,9 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` + /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a; + return b; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol index efb5d5a8..7d3c811a 100644 --- a/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol @@ -10,9 +10,9 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` + /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return b; + return true; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol index 7d3c811a..4ceda907 100644 --- a/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol @@ -10,14 +10,14 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return true; + return a || b; } // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return (x < y) || (a != (x >= y)); + return x < y; } function not(bool a) public pure returns (bool) { diff --git a/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol index 4ceda907..690fae8d 100644 --- a/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol @@ -15,9 +15,9 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return x < y; + return a != (x >= y); } function not(bool a) public pure returns (bool) { diff --git a/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol index 690fae8d..2ef15642 100644 --- a/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol @@ -15,9 +15,9 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return a != (x >= y); + return true; } function not(bool a) public pure returns (bool) { diff --git a/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol index 2ef15642..be0e75f4 100644 --- a/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol @@ -15,12 +15,12 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return true; + return (x < y) || (a != (x >= y)); } + /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;` function not(bool a) public pure returns (bool) { - return !a; + return true; } } diff --git a/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol index be0e75f4..35ee5751 100644 --- a/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol @@ -19,8 +19,8 @@ contract LOR { return (x < y) || (a != (x >= y)); } - /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;` + /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;` function not(bool a) public pure returns (bool) { - return true; + return false; } } diff --git a/resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol similarity index 89% rename from resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol rename to resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol index e241973d..e06271e2 100644 --- a/resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol @@ -11,8 +11,9 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; + uint256 zero = 1; return zero; } @@ -35,9 +36,8 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol index e06271e2..f2cb8295 100644 --- a/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol @@ -11,15 +11,15 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 1; + uint256 zero = 0; return zero; } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 0; return one; } diff --git a/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol index f2cb8295..d18c6c48 100644 --- a/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol @@ -17,9 +17,9 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 0; + uint256 one = 2; return one; } diff --git a/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol index d18c6c48..173dc540 100644 --- a/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 2; + uint256 one = 1; return one; } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 0; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol index 173dc540..72ffaedf 100644 --- a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol @@ -23,9 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = 1; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol index 72ffaedf..1e24417f 100644 --- a/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol @@ -23,9 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 1; + int256 neg_one = -2; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol index 1e24417f..e088a4e3 100644 --- a/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol @@ -23,15 +23,15 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -2; + int256 neg_one = -1; return neg_one; } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = 0; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol index e088a4e3..2407079e 100644 --- a/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol @@ -29,9 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 0; + int256 pos_one = -1; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol index 2407079e..a5082f3b 100644 --- a/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol @@ -29,9 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = -1; + int256 pos_one = 2; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol index a5082f3b..22af4185 100644 --- a/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol @@ -29,15 +29,15 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 2; + int256 pos_one = 1; return pos_one; } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = -1; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol index 22af4185..e241973d 100644 --- a/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol @@ -35,9 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = -1; + int256 zero = 1; return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol similarity index 92% rename from resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol index 84889114..dec84f24 100644 --- a/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x <= y; } // Expect 3 mutants: x < y, x == y, true @@ -58,8 +59,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return true; + return (x + y) != z; } } diff --git a/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol index dec84f24..0c05265c 100644 --- a/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x != y; } // Expect 3 mutants: x < y, x == y, true diff --git a/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol index 0c05265c..6141947b 100644 --- a/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return false; } // Expect 3 mutants: x < y, x == y, true diff --git a/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol index 6141947b..9f8ccd04 100644 --- a/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x < y; } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x < y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol index 9f8ccd04..18e38f34 100644 --- a/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol @@ -10,9 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x == y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol index 18e38f34..55dd7c79 100644 --- a/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol @@ -10,9 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return true; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol index 55dd7c79..52949d03 100644 --- a/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol @@ -10,14 +10,14 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x >= y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol index 52949d03..a3e16320 100644 --- a/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol @@ -15,9 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x != y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol index a3e16320..a9024427 100644 --- a/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol @@ -15,9 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return false; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol index a9024427..337c9a92 100644 --- a/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol @@ -15,14 +15,14 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x > y; } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x > y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol index 337c9a92..7c02b73b 100644 --- a/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol @@ -20,9 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x == y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol index 7c02b73b..3d299dfb 100644 --- a/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol @@ -20,9 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` + /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return true; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol index 3d299dfb..c865469b 100644 --- a/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol @@ -20,14 +20,14 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x <= y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol index c865469b..8cdc1c10 100644 --- a/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol @@ -25,9 +25,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` + /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x >= y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol index 8cdc1c10..de6a4360 100644 --- a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol @@ -25,9 +25,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return false; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol index de6a4360..ab40e6c9 100644 --- a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol @@ -25,14 +25,14 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x == y; } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; + return false; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol index ab40e6c9..f42e7b7e 100644 --- a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol @@ -30,14 +30,14 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x == y; } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x < y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol index f42e7b7e..e5f50322 100644 --- a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x > y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol index e5f50322..83684484 100644 --- a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return true; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol index 83684484..3ae92133 100644 --- a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol @@ -35,14 +35,14 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x != y; } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol index 3ae92133..bdeac3af 100644 --- a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol @@ -40,9 +40,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) > z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol index bdeac3af..430379f6 100644 --- a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol @@ -49,9 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) == z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol index 430379f6..3d67c155 100644 --- a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol @@ -49,9 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) == z; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol index 3d67c155..13612614 100644 --- a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol @@ -49,9 +49,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return true; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) < z; } } diff --git a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol index 13612614..dd0c83ca 100644 --- a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol @@ -58,8 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) < z; + return (x + y) > z; } } diff --git a/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol index dd0c83ca..84889114 100644 --- a/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol @@ -58,8 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) > z; + return true; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol similarity index 83% rename from resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol rename to resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol index 84eae0ca..50d09571 100644 --- a/resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol +++ b/resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol @@ -10,13 +10,13 @@ contract UOR { } // Expect a single mutant: -x + /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;` function signed_bw_not(int256 x) public pure returns (int256) { - return ~x; + return -x; } // Expect a single mutant: ~x - /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;` function signed_neg(int256 x) public pure returns (int256) { - return ~x; + return -x; } } diff --git a/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol index 50d09571..84eae0ca 100644 --- a/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol +++ b/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol @@ -10,13 +10,13 @@ contract UOR { } // Expect a single mutant: -x - /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;` function signed_bw_not(int256 x) public pure returns (int256) { - return -x; + return ~x; } // Expect a single mutant: ~x + /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;` function signed_neg(int256 x) public pure returns (int256) { - return -x; + return ~x; } } diff --git a/resources/regressions/aor.json/gambit_results.json b/resources/regressions/aor.json/gambit_results.json index dc1f2187..db4270f7 100644 --- a/resources/regressions/aor.json/gambit_results.json +++ b/resources/regressions/aor.json/gambit_results.json @@ -8,7 +8,7 @@ "name": "mutants/1/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "-" }, { @@ -20,7 +20,7 @@ "name": "mutants/2/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "*" }, { @@ -32,7 +32,7 @@ "name": "mutants/3/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "/" }, { @@ -44,7 +44,7 @@ "name": "mutants/4/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "%" }, { @@ -56,7 +56,7 @@ "name": "mutants/5/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "+" }, { @@ -68,7 +68,7 @@ "name": "mutants/6/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "*" }, { @@ -80,7 +80,7 @@ "name": "mutants/7/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "/" }, { @@ -92,7 +92,7 @@ "name": "mutants/8/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "%" }, { @@ -104,7 +104,7 @@ "name": "mutants/9/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "+" }, { @@ -116,7 +116,7 @@ "name": "mutants/10/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "-" }, { @@ -128,7 +128,7 @@ "name": "mutants/11/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "/" }, { @@ -140,7 +140,7 @@ "name": "mutants/12/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "%" }, { @@ -152,7 +152,7 @@ "name": "mutants/13/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "+" }, { @@ -164,7 +164,7 @@ "name": "mutants/14/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "-" }, { @@ -176,7 +176,7 @@ "name": "mutants/15/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "/" }, { @@ -188,7 +188,7 @@ "name": "mutants/16/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "**" }, { @@ -200,7 +200,7 @@ "name": "mutants/17/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "%" }, { @@ -212,7 +212,7 @@ "name": "mutants/18/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "+" }, { @@ -224,7 +224,7 @@ "name": "mutants/19/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "-" }, { @@ -236,7 +236,7 @@ "name": "mutants/20/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "*" }, { @@ -248,7 +248,7 @@ "name": "mutants/21/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "/" }, { @@ -260,7 +260,7 @@ "name": "mutants/22/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "%" } ] \ No newline at end of file diff --git a/resources/regressions/aor.json/mutants.log b/resources/regressions/aor.json/mutants.log index e0189e4f..ee125628 100644 --- a/resources/regressions/aor.json/mutants.log +++ b/resources/regressions/aor.json/mutants.log @@ -1,22 +1,22 @@ -1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,- -2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,* -3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,/ -4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,% -5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,+ -6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,* -7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,/ -8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,% -9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,+ -10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,- -11,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,/ -12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,% -13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,+ -14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,- -15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,/ -16,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,** -17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,% -18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,+ -19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,- -20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,* -21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,/ -22,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,% +1,AOR,Ops/AOR/AOR.sol,13:18,+,- +2,AOR,Ops/AOR/AOR.sol,13:18,+,* +3,AOR,Ops/AOR/AOR.sol,13:18,+,/ +4,AOR,Ops/AOR/AOR.sol,13:18,+,% +5,AOR,Ops/AOR/AOR.sol,22:18,-,+ +6,AOR,Ops/AOR/AOR.sol,22:18,-,* +7,AOR,Ops/AOR/AOR.sol,22:18,-,/ +8,AOR,Ops/AOR/AOR.sol,22:18,-,% +9,AOR,Ops/AOR/AOR.sol,34:22,*,+ +10,AOR,Ops/AOR/AOR.sol,34:22,*,- +11,AOR,Ops/AOR/AOR.sol,34:22,*,/ +12,AOR,Ops/AOR/AOR.sol,34:22,*,% +13,AOR,Ops/AOR/AOR.sol,47:22,*,+ +14,AOR,Ops/AOR/AOR.sol,47:22,*,- +15,AOR,Ops/AOR/AOR.sol,47:22,*,/ +16,AOR,Ops/AOR/AOR.sol,47:22,*,** +17,AOR,Ops/AOR/AOR.sol,47:22,*,% +18,AOR,Ops/AOR/AOR.sol,58:18,**,+ +19,AOR,Ops/AOR/AOR.sol,58:18,**,- +20,AOR,Ops/AOR/AOR.sol,58:18,**,* +21,AOR,Ops/AOR/AOR.sol,58:18,**,/ +22,AOR,Ops/AOR/AOR.sol,58:18,**,% diff --git a/resources/regressions/bor.json/gambit_results.json b/resources/regressions/bor.json/gambit_results.json index 5819d92c..7a0e4c83 100644 --- a/resources/regressions/bor.json/gambit_results.json +++ b/resources/regressions/bor.json/gambit_results.json @@ -8,7 +8,7 @@ "name": "mutants/1/Ops/BOR/BOR.sol", "op": "BOR", "orig": "|", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "Ops/BOR/BOR.sol", "repl": "&" }, { @@ -20,7 +20,7 @@ "name": "mutants/2/Ops/BOR/BOR.sol", "op": "BOR", "orig": "&", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "Ops/BOR/BOR.sol", "repl": "|" }, { @@ -32,7 +32,7 @@ "name": "mutants/3/Ops/BOR/BOR.sol", "op": "BOR", "orig": "^", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "Ops/BOR/BOR.sol", "repl": "&" } ] \ No newline at end of file diff --git a/resources/regressions/bor.json/mutants.log b/resources/regressions/bor.json/mutants.log index 2dd23c44..f91f416f 100644 --- a/resources/regressions/bor.json/mutants.log +++ b/resources/regressions/bor.json/mutants.log @@ -1,3 +1,3 @@ -1,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,10:18,|,& -2,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,16:18,&,| -3,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,22:18,^,& +1,BOR,Ops/BOR/BOR.sol,10:18,|,& +2,BOR,Ops/BOR/BOR.sol,16:18,&,| +3,BOR,Ops/BOR/BOR.sol,22:18,^,& diff --git a/resources/regressions/edc.json/gambit_results.json b/resources/regressions/edc.json/gambit_results.json index 021c96d8..0637a088 100644 --- a/resources/regressions/edc.json/gambit_results.json +++ b/resources/regressions/edc.json/gambit_results.json @@ -1,14 +1 @@ -[ - { - "col": 38, - "description": "ElimDelegateCall", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", - "id": "1", - "line": 16, - "name": "mutants/1/Ops/EDC/EDC.sol", - "op": "EDC", - "orig": "delegatecall", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", - "repl": "call" - } -] \ No newline at end of file +[] \ No newline at end of file diff --git a/resources/regressions/edc.json/mutants.log b/resources/regressions/edc.json/mutants.log index 1b28f670..e69de29b 100644 --- a/resources/regressions/edc.json/mutants.log +++ b/resources/regressions/edc.json/mutants.log @@ -1 +0,0 @@ -1,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,16:38,delegatecall,call diff --git a/resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol b/resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol deleted file mode 100644 index 19754976..00000000 --- a/resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.13; - -contract Helper { - function setVars(uint _num) public payable {} -} - -contract EDC { - uint public num; - address public sender; - uint public value; - bool public delegateSuccessful; - bytes public myData; - - /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(` - function setVars(address _contract) public payable { - (bool success, ) = _contract.call( - abi.encodeWithSignature("setVars(uint256)", 1) - ); - require(success, "Delegatecall failed"); - } -} diff --git a/resources/regressions/evr.json/gambit_results.json b/resources/regressions/evr.json/gambit_results.json index 6e096b71..8bc9f42c 100644 --- a/resources/regressions/evr.json/gambit_results.json +++ b/resources/regressions/evr.json/gambit_results.json @@ -8,7 +8,7 @@ "name": "mutants/1/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a + b", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "0" }, { @@ -20,7 +20,7 @@ "name": "mutants/2/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a + b", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "1" }, { @@ -32,7 +32,7 @@ "name": "mutants/3/Ops/EVR/EVR.sol", "op": "EVR", "orig": "add(a, b)", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "0" }, { @@ -44,7 +44,7 @@ "name": "mutants/4/Ops/EVR/EVR.sol", "op": "EVR", "orig": "add(a, b)", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "1" }, { @@ -56,7 +56,7 @@ "name": "mutants/5/Ops/EVR/EVR.sol", "op": "EVR", "orig": "result", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "0" }, { @@ -68,7 +68,7 @@ "name": "mutants/6/Ops/EVR/EVR.sol", "op": "EVR", "orig": "result", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "1" }, { @@ -80,7 +80,7 @@ "name": "mutants/7/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a < b", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "true" }, { @@ -92,7 +92,7 @@ "name": "mutants/8/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a < b", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "false" }, { @@ -104,7 +104,7 @@ "name": "mutants/9/Ops/EVR/EVR.sol", "op": "EVR", "orig": "c", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "true" }, { @@ -116,7 +116,7 @@ "name": "mutants/10/Ops/EVR/EVR.sol", "op": "EVR", "orig": "c", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "false" }, { @@ -128,7 +128,7 @@ "name": "mutants/11/Ops/EVR/EVR.sol", "op": "EVR", "orig": "b - a", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "0" }, { @@ -140,7 +140,7 @@ "name": "mutants/12/Ops/EVR/EVR.sol", "op": "EVR", "orig": "b - a", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "1" }, { @@ -152,7 +152,7 @@ "name": "mutants/13/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a < b", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "true" }, { @@ -164,7 +164,7 @@ "name": "mutants/14/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a < b", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "false" }, { @@ -176,7 +176,7 @@ "name": "mutants/15/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a - b", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "0" }, { @@ -188,7 +188,7 @@ "name": "mutants/16/Ops/EVR/EVR.sol", "op": "EVR", "orig": "a - b", - "original": "/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol", + "original": "Ops/EVR/EVR.sol", "repl": "1" } ] \ No newline at end of file diff --git a/resources/regressions/evr.json/mutants.log b/resources/regressions/evr.json/mutants.log index aa2304ea..0d4e83c2 100644 --- a/resources/regressions/evr.json/mutants.log +++ b/resources/regressions/evr.json/mutants.log @@ -1,16 +1,16 @@ -1,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,8:16,a + b,0 -2,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,8:16,a + b,1 -3,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,12:26,"add(a, b)",0 -4,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,12:26,"add(a, b)",1 -5,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,13:16,result,0 -6,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,13:16,result,1 -7,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,17:18,a < b,true -8,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,17:18,a < b,false -9,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,18:16,c,true -10,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,18:16,c,false -11,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,19:17,b - a,0 -12,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,19:17,b - a,1 -13,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,20:17,a < b,true -14,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,20:17,a < b,false -15,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,22:16,a - b,0 -16,EVR,/Users/benku/Gambit/benchmarks/Ops/EVR/EVR.sol,22:16,a - b,1 +1,EVR,Ops/EVR/EVR.sol,8:16,a + b,0 +2,EVR,Ops/EVR/EVR.sol,8:16,a + b,1 +3,EVR,Ops/EVR/EVR.sol,12:26,"add(a, b)",0 +4,EVR,Ops/EVR/EVR.sol,12:26,"add(a, b)",1 +5,EVR,Ops/EVR/EVR.sol,13:16,result,0 +6,EVR,Ops/EVR/EVR.sol,13:16,result,1 +7,EVR,Ops/EVR/EVR.sol,17:18,a < b,true +8,EVR,Ops/EVR/EVR.sol,17:18,a < b,false +9,EVR,Ops/EVR/EVR.sol,18:16,c,true +10,EVR,Ops/EVR/EVR.sol,18:16,c,false +11,EVR,Ops/EVR/EVR.sol,19:17,b - a,0 +12,EVR,Ops/EVR/EVR.sol,19:17,b - a,1 +13,EVR,Ops/EVR/EVR.sol,20:17,a < b,true +14,EVR,Ops/EVR/EVR.sol,20:17,a < b,false +15,EVR,Ops/EVR/EVR.sol,22:16,a - b,0 +16,EVR,Ops/EVR/EVR.sol,22:16,a - b,1 diff --git a/resources/regressions/lor.json/gambit_results.json b/resources/regressions/lor.json/gambit_results.json index 94d6dc4f..0dfcd9b1 100644 --- a/resources/regressions/lor.json/gambit_results.json +++ b/resources/regressions/lor.json/gambit_results.json @@ -8,7 +8,7 @@ "name": "mutants/1/Ops/LOR/LOR.sol", "op": "LOR", "orig": "a && b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "Ops/LOR/LOR.sol", "repl": "a" }, { @@ -20,7 +20,7 @@ "name": "mutants/2/Ops/LOR/LOR.sol", "op": "LOR", "orig": "a && b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "Ops/LOR/LOR.sol", "repl": "b" }, { @@ -32,7 +32,7 @@ "name": "mutants/3/Ops/LOR/LOR.sol", "op": "LOR", "orig": "a && b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "Ops/LOR/LOR.sol", "repl": "false" }, { @@ -44,7 +44,7 @@ "name": "mutants/4/Ops/LOR/LOR.sol", "op": "LOR", "orig": "a || b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "Ops/LOR/LOR.sol", "repl": "a" }, { @@ -56,7 +56,7 @@ "name": "mutants/5/Ops/LOR/LOR.sol", "op": "LOR", "orig": "a || b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "Ops/LOR/LOR.sol", "repl": "b" }, { @@ -68,7 +68,7 @@ "name": "mutants/6/Ops/LOR/LOR.sol", "op": "LOR", "orig": "a || b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "Ops/LOR/LOR.sol", "repl": "true" }, { @@ -80,7 +80,7 @@ "name": "mutants/7/Ops/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "Ops/LOR/LOR.sol", "repl": "x < y" }, { @@ -92,7 +92,7 @@ "name": "mutants/8/Ops/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "Ops/LOR/LOR.sol", "repl": "a != (x >= y)" }, { @@ -104,7 +104,7 @@ "name": "mutants/9/Ops/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "Ops/LOR/LOR.sol", "repl": "true" }, { @@ -116,7 +116,7 @@ "name": "mutants/10/Ops/LOR/LOR.sol", "op": "LOR", "orig": "!a", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "Ops/LOR/LOR.sol", "repl": "true" }, { @@ -128,7 +128,7 @@ "name": "mutants/11/Ops/LOR/LOR.sol", "op": "LOR", "orig": "!a", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "Ops/LOR/LOR.sol", "repl": "false" } ] \ No newline at end of file diff --git a/resources/regressions/lor.json/mutants.log b/resources/regressions/lor.json/mutants.log index 40cb0dd7..2df5c9a9 100644 --- a/resources/regressions/lor.json/mutants.log +++ b/resources/regressions/lor.json/mutants.log @@ -1,11 +1,11 @@ -1,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,a -2,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,b -3,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,false -4,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,a -5,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,b -6,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,true -7,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y -8,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) -9,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true -10,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,23:16,!a,true -11,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,23:16,!a,false +1,LOR,Ops/LOR/LOR.sol,9:16,a && b,a +2,LOR,Ops/LOR/LOR.sol,9:16,a && b,b +3,LOR,Ops/LOR/LOR.sol,9:16,a && b,false +4,LOR,Ops/LOR/LOR.sol,14:16,a || b,a +5,LOR,Ops/LOR/LOR.sol,14:16,a || b,b +6,LOR,Ops/LOR/LOR.sol,14:16,a || b,true +7,LOR,Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y +8,LOR,Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) +9,LOR,Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true +10,LOR,Ops/LOR/LOR.sol,23:16,!a,true +11,LOR,Ops/LOR/LOR.sol,23:16,!a,false diff --git a/resources/regressions/lvr.json/gambit_results.json b/resources/regressions/lvr.json/gambit_results.json index ebe26bc0..bac77ffc 100644 --- a/resources/regressions/lvr.json/gambit_results.json +++ b/resources/regressions/lvr.json/gambit_results.json @@ -8,7 +8,7 @@ "name": "mutants/1/Ops/LVR/LVR.sol", "op": "LVR", "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "Ops/LVR/LVR.sol", "repl": "1" }, { @@ -20,7 +20,7 @@ "name": "mutants/2/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "Ops/LVR/LVR.sol", "repl": "0" }, { @@ -32,7 +32,7 @@ "name": "mutants/3/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "Ops/LVR/LVR.sol", "repl": "2" }, { @@ -44,7 +44,7 @@ "name": "mutants/4/Ops/LVR/LVR.sol", "op": "LVR", "orig": "-1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "Ops/LVR/LVR.sol", "repl": "0" }, { @@ -56,7 +56,7 @@ "name": "mutants/5/Ops/LVR/LVR.sol", "op": "LVR", "orig": "-1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "Ops/LVR/LVR.sol", "repl": "1" }, { @@ -68,7 +68,7 @@ "name": "mutants/6/Ops/LVR/LVR.sol", "op": "LVR", "orig": "-1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "Ops/LVR/LVR.sol", "repl": "-2" }, { @@ -80,7 +80,7 @@ "name": "mutants/7/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "Ops/LVR/LVR.sol", "repl": "0" }, { @@ -92,7 +92,7 @@ "name": "mutants/8/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "Ops/LVR/LVR.sol", "repl": "-1" }, { @@ -104,7 +104,7 @@ "name": "mutants/9/Ops/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "Ops/LVR/LVR.sol", "repl": "2" }, { @@ -116,7 +116,7 @@ "name": "mutants/10/Ops/LVR/LVR.sol", "op": "LVR", "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "Ops/LVR/LVR.sol", "repl": "-1" }, { @@ -128,7 +128,7 @@ "name": "mutants/11/Ops/LVR/LVR.sol", "op": "LVR", "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "Ops/LVR/LVR.sol", "repl": "1" } ] \ No newline at end of file diff --git a/resources/regressions/lvr.json/mutants.log b/resources/regressions/lvr.json/mutants.log index dbe19c1e..e0b04fe1 100644 --- a/resources/regressions/lvr.json/mutants.log +++ b/resources/regressions/lvr.json/mutants.log @@ -1,11 +1,11 @@ -1,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 -2,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 -3,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 -4,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 -5,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 -6,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 -7,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 -8,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 -9,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 -10,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 -11,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 +1,LVR,Ops/LVR/LVR.sol,15:24,0,1 +2,LVR,Ops/LVR/LVR.sol,21:23,1,0 +3,LVR,Ops/LVR/LVR.sol,21:23,1,2 +4,LVR,Ops/LVR/LVR.sol,27:26,-1,0 +5,LVR,Ops/LVR/LVR.sol,27:26,-1,1 +6,LVR,Ops/LVR/LVR.sol,27:26,-1,-2 +7,LVR,Ops/LVR/LVR.sol,33:26,1,0 +8,LVR,Ops/LVR/LVR.sol,33:26,1,-1 +9,LVR,Ops/LVR/LVR.sol,33:26,1,2 +10,LVR,Ops/LVR/LVR.sol,39:23,0,-1 +11,LVR,Ops/LVR/LVR.sol,39:23,0,1 diff --git a/resources/regressions/no_import_path.json/gambit_results.json b/resources/regressions/no_import_path.json/gambit_results.json index f0936fb4..0637a088 100644 --- a/resources/regressions/no_import_path.json/gambit_results.json +++ b/resources/regressions/no_import_path.json/gambit_results.json @@ -1,362 +1 @@ -[ - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n import \"contracts/Imported.sol\";\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "1", - "line": 9, - "name": "mutants/1/contracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n import \"contracts/Imported.sol\";\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "2", - "line": 9, - "name": "mutants/2/contracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n import \"contracts/Imported.sol\";\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "3", - "line": 9, - "name": "mutants/3/contracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", - "id": "4", - "line": 13, - "name": "mutants/4/contracts/C.sol", - "op": "STD", - "orig": "return a + b", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "5", - "line": 13, - "name": "mutants/5/contracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "6", - "line": 13, - "name": "mutants/6/contracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "7", - "line": 13, - "name": "mutants/7/contracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "8", - "line": 13, - "name": "mutants/8/contracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "%" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "9", - "line": 19, - "name": "mutants/9/contracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "0" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "10", - "line": 19, - "name": "mutants/10/contracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "2" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -16,8 +16,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", - "id": "11", - "line": 20, - "name": "mutants/11/contracts/C.sol", - "op": "STD", - "orig": "a[0] = msg.sender", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 11, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -16,8 +16,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", - "id": "12", - "line": 20, - "name": "mutants/12/contracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", - "id": "13", - "line": 21, - "name": "mutants/13/contracts/C.sol", - "op": "STD", - "orig": "return a", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "14", - "line": 25, - "name": "mutants/14/contracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "0" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "15", - "line": 25, - "name": "mutants/15/contracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "11" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "16", - "line": 26, - "name": "mutants/16/contracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "+" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "17", - "line": 26, - "name": "mutants/17/contracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "-" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "18", - "line": 26, - "name": "mutants/18/contracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "*" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "19", - "line": 26, - "name": "mutants/19/contracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "/" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "20", - "line": 26, - "name": "mutants/20/contracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "%" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "21", - "line": 27, - "name": "mutants/21/contracts/C.sol", - "op": "STD", - "orig": "return res", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -27,8 +27,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "22", - "line": 31, - "name": "mutants/22/contracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -27,8 +27,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "23", - "line": 31, - "name": "mutants/23/contracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -27,8 +27,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "24", - "line": 31, - "name": "mutants/24/contracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -32,8 +32,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "25", - "line": 36, - "name": "mutants/25/contracts/C.sol", - "op": "STD", - "orig": "Utils.getarray(b, address(this))", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "26", - "line": 40, - "name": "mutants/26/contracts/C.sol", - "op": "STD", - "orig": "return c + d", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "27", - "line": 40, - "name": "mutants/27/contracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "28", - "line": 40, - "name": "mutants/28/contracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "29", - "line": 40, - "name": "mutants/29/contracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "30", - "line": 40, - "name": "mutants/30/contracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol", - "repl": "%" - } -] \ No newline at end of file +[] \ No newline at end of file diff --git a/resources/regressions/no_import_path.json/mutants.log b/resources/regressions/no_import_path.json/mutants.log index 6f03b359..e69de29b 100644 --- a/resources/regressions/no_import_path.json/mutants.log +++ b/resources/regressions/no_import_path.json/mutants.log @@ -1,30 +0,0 @@ -1,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,9:9,assert(c[0] == e),assert(true) -2,ROR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,9:16,c[0] == e,false -3,LVR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,9:18,0,1 -4,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,13:9,return a + b,assert(true) -5,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,13:18,+,- -6,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,13:18,+,* -7,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,13:18,+,/ -8,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,13:18,+,% -9,LVR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,19:44,1,0 -10,LVR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,19:44,1,2 -11,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,20:9,a[0] = msg.sender,assert(true) -12,LVR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,20:11,0,1 -13,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,21:9,return a,assert(true) -14,LVR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,25:21,10,0 -15,LVR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,25:21,10,11 -16,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,26:25,**,+ -17,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,26:25,**,- -18,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,26:25,**,* -19,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,26:25,**,/ -20,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,26:25,**,% -21,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,27:9,return res,assert(true) -22,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,31:9,assert(c[0] == e),assert(true) -23,ROR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,31:16,c[0] == e,false -24,LVR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,31:18,0,1 -25,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,36:9,"Utils.getarray(b, address(this))",assert(true) -26,STD,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,40:9,return c + d,assert(true) -27,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,40:18,+,- -28,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,40:18,+,* -29,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,40:18,+,/ -30,AOR,/Users/benku/Gambit/benchmarks/NoImportPath/contracts/C.sol,40:18,+,% diff --git a/resources/regressions/no_import_path.json/mutants/1/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/1/contracts/C.sol deleted file mode 100644 index 53921f1e..00000000 --- a/resources/regressions/no_import_path.json/mutants/1/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(true); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/10/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/10/contracts/C.sol deleted file mode 100644 index eab6041d..00000000 --- a/resources/regressions/no_import_path.json/mutants/10/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/11/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/11/contracts/C.sol deleted file mode 100644 index c112a1fe..00000000 --- a/resources/regressions/no_import_path.json/mutants/11/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/12/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/12/contracts/C.sol deleted file mode 100644 index 97b84a0a..00000000 --- a/resources/regressions/no_import_path.json/mutants/12/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - a[1] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/13/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/13/contracts/C.sol deleted file mode 100644 index 8321873c..00000000 --- a/resources/regressions/no_import_path.json/mutants/13/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` - a[0] = msg.sender; - assert(true); - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/14/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/14/contracts/C.sol deleted file mode 100644 index 60a4db1c..00000000 --- a/resources/regressions/no_import_path.json/mutants/14/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/15/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/15/contracts/C.sol deleted file mode 100644 index 2567941a..00000000 --- a/resources/regressions/no_import_path.json/mutants/15/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/16/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/16/contracts/C.sol deleted file mode 100644 index 3e409958..00000000 --- a/resources/regressions/no_import_path.json/mutants/16/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a + decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/17/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/17/contracts/C.sol deleted file mode 100644 index 71f2d2c3..00000000 --- a/resources/regressions/no_import_path.json/mutants/17/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/18/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/18/contracts/C.sol deleted file mode 100644 index 43c3a73b..00000000 --- a/resources/regressions/no_import_path.json/mutants/18/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/19/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/19/contracts/C.sol deleted file mode 100644 index 697ef1c3..00000000 --- a/resources/regressions/no_import_path.json/mutants/19/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a / decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/2/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/2/contracts/C.sol deleted file mode 100644 index 9b4e8ff7..00000000 --- a/resources/regressions/no_import_path.json/mutants/2/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(false); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/20/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/20/contracts/C.sol deleted file mode 100644 index cdaa3314..00000000 --- a/resources/regressions/no_import_path.json/mutants/20/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a % decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/21/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/21/contracts/C.sol deleted file mode 100644 index ca8a4da8..00000000 --- a/resources/regressions/no_import_path.json/mutants/21/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/22/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/22/contracts/C.sol deleted file mode 100644 index 3fe88f14..00000000 --- a/resources/regressions/no_import_path.json/mutants/22/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(true); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/23/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/23/contracts/C.sol deleted file mode 100644 index 3767f986..00000000 --- a/resources/regressions/no_import_path.json/mutants/23/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(false); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/24/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/24/contracts/C.sol deleted file mode 100644 index 63ab6010..00000000 --- a/resources/regressions/no_import_path.json/mutants/24/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/25/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/25/contracts/C.sol deleted file mode 100644 index 165e0995..00000000 --- a/resources/regressions/no_import_path.json/mutants/25/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` - address[] memory b = this.foo(); - assert(true); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/26/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/26/contracts/C.sol deleted file mode 100644 index 1a619f47..00000000 --- a/resources/regressions/no_import_path.json/mutants/26/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - assert(true); - } -} diff --git a/resources/regressions/no_import_path.json/mutants/27/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/27/contracts/C.sol deleted file mode 100644 index a68b62f4..00000000 --- a/resources/regressions/no_import_path.json/mutants/27/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c - d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/28/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/28/contracts/C.sol deleted file mode 100644 index e9094108..00000000 --- a/resources/regressions/no_import_path.json/mutants/28/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c * d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/29/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/29/contracts/C.sol deleted file mode 100644 index c884f370..00000000 --- a/resources/regressions/no_import_path.json/mutants/29/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/3/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/3/contracts/C.sol deleted file mode 100644 index 25bd0cd8..00000000 --- a/resources/regressions/no_import_path.json/mutants/3/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(c[1] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/30/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/30/contracts/C.sol deleted file mode 100644 index 01a3dfdc..00000000 --- a/resources/regressions/no_import_path.json/mutants/30/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/4/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/4/contracts/C.sol deleted file mode 100644 index fd6e5b9c..00000000 --- a/resources/regressions/no_import_path.json/mutants/4/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - assert(true); - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/5/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/5/contracts/C.sol deleted file mode 100644 index d9f773c1..00000000 --- a/resources/regressions/no_import_path.json/mutants/5/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a - b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/6/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/6/contracts/C.sol deleted file mode 100644 index 5ca3a37d..00000000 --- a/resources/regressions/no_import_path.json/mutants/6/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a * b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/7/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/7/contracts/C.sol deleted file mode 100644 index 74e195f7..00000000 --- a/resources/regressions/no_import_path.json/mutants/7/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a / b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/8/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/8/contracts/C.sol deleted file mode 100644 index 2c42d823..00000000 --- a/resources/regressions/no_import_path.json/mutants/8/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a % b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/no_import_path.json/mutants/9/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/9/contracts/C.sol deleted file mode 100644 index 6f3eacdc..00000000 --- a/resources/regressions/no_import_path.json/mutants/9/contracts/C.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -import "contracts/Imported.sol"; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/ror.json/gambit_results.json b/resources/regressions/ror.json/gambit_results.json index fe2c34c6..e2be531a 100644 --- a/resources/regressions/ror.json/gambit_results.json +++ b/resources/regressions/ror.json/gambit_results.json @@ -8,7 +8,7 @@ "name": "mutants/1/Ops/ROR/ROR.sol", "op": "ROR", "orig": "<", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "<=" }, { @@ -20,7 +20,7 @@ "name": "mutants/2/Ops/ROR/ROR.sol", "op": "ROR", "orig": "<", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "!=" }, { @@ -32,7 +32,7 @@ "name": "mutants/3/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x < y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "false" }, { @@ -44,7 +44,7 @@ "name": "mutants/4/Ops/ROR/ROR.sol", "op": "ROR", "orig": "<=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "<" }, { @@ -56,7 +56,7 @@ "name": "mutants/5/Ops/ROR/ROR.sol", "op": "ROR", "orig": "<=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "==" }, { @@ -68,7 +68,7 @@ "name": "mutants/6/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x <= y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "true" }, { @@ -80,7 +80,7 @@ "name": "mutants/7/Ops/ROR/ROR.sol", "op": "ROR", "orig": ">", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": ">=" }, { @@ -92,7 +92,7 @@ "name": "mutants/8/Ops/ROR/ROR.sol", "op": "ROR", "orig": ">", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "!=" }, { @@ -104,7 +104,7 @@ "name": "mutants/9/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x > y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "false" }, { @@ -116,7 +116,7 @@ "name": "mutants/10/Ops/ROR/ROR.sol", "op": "ROR", "orig": ">=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": ">" }, { @@ -128,7 +128,7 @@ "name": "mutants/11/Ops/ROR/ROR.sol", "op": "ROR", "orig": ">=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "==" }, { @@ -140,7 +140,7 @@ "name": "mutants/12/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x >= y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "true" }, { @@ -152,7 +152,7 @@ "name": "mutants/13/Ops/ROR/ROR.sol", "op": "ROR", "orig": "==", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "<=" }, { @@ -164,7 +164,7 @@ "name": "mutants/14/Ops/ROR/ROR.sol", "op": "ROR", "orig": "==", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": ">=" }, { @@ -176,7 +176,7 @@ "name": "mutants/15/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x == y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "false" }, { @@ -188,7 +188,7 @@ "name": "mutants/16/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x == y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "false" }, { @@ -200,7 +200,7 @@ "name": "mutants/17/Ops/ROR/ROR.sol", "op": "ROR", "orig": "!=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "<" }, { @@ -212,7 +212,7 @@ "name": "mutants/18/Ops/ROR/ROR.sol", "op": "ROR", "orig": "!=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": ">" }, { @@ -224,7 +224,7 @@ "name": "mutants/19/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x != y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "true" }, { @@ -236,7 +236,7 @@ "name": "mutants/20/Ops/ROR/ROR.sol", "op": "ROR", "orig": "x != y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "true" }, { @@ -248,7 +248,7 @@ "name": "mutants/21/Ops/ROR/ROR.sol", "op": "ROR", "orig": ">=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": ">" }, { @@ -260,7 +260,7 @@ "name": "mutants/22/Ops/ROR/ROR.sol", "op": "ROR", "orig": ">=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "==" }, { @@ -272,7 +272,7 @@ "name": "mutants/23/Ops/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) >= z", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "true" }, { @@ -284,7 +284,7 @@ "name": "mutants/24/Ops/ROR/ROR.sol", "op": "ROR", "orig": "!=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "<" }, { @@ -296,7 +296,7 @@ "name": "mutants/25/Ops/ROR/ROR.sol", "op": "ROR", "orig": "!=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": ">" }, { @@ -308,7 +308,7 @@ "name": "mutants/26/Ops/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) != z", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "Ops/ROR/ROR.sol", "repl": "true" } ] \ No newline at end of file diff --git a/resources/regressions/ror.json/mutants.log b/resources/regressions/ror.json/mutants.log index 5cbde0e6..5d07acb2 100644 --- a/resources/regressions/ror.json/mutants.log +++ b/resources/regressions/ror.json/mutants.log @@ -1,26 +1,26 @@ -1,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,<= -2,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,!= -3,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:16,x < y,false -4,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,< -5,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,== -6,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:16,x <= y,true -7,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,>= -8,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,!= -9,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:16,x > y,false -10,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,> -11,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,== -12,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:16,x >= y,true -13,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,<= -14,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,>= -15,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:16,x == y,false -16,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,34:16,x == y,false -17,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,< -18,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,> -19,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:16,x != y,true -20,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,44:16,x != y,true -21,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,> -22,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,== -23,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:16,(x + y) >= z,true -24,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,< -25,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,> -26,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:16,(x + y) != z,true +1,ROR,Ops/ROR/ROR.sol,9:18,<,<= +2,ROR,Ops/ROR/ROR.sol,9:18,<,!= +3,ROR,Ops/ROR/ROR.sol,9:16,x < y,false +4,ROR,Ops/ROR/ROR.sol,14:18,<=,< +5,ROR,Ops/ROR/ROR.sol,14:18,<=,== +6,ROR,Ops/ROR/ROR.sol,14:16,x <= y,true +7,ROR,Ops/ROR/ROR.sol,19:18,>,>= +8,ROR,Ops/ROR/ROR.sol,19:18,>,!= +9,ROR,Ops/ROR/ROR.sol,19:16,x > y,false +10,ROR,Ops/ROR/ROR.sol,24:18,>=,> +11,ROR,Ops/ROR/ROR.sol,24:18,>=,== +12,ROR,Ops/ROR/ROR.sol,24:16,x >= y,true +13,ROR,Ops/ROR/ROR.sol,29:18,==,<= +14,ROR,Ops/ROR/ROR.sol,29:18,==,>= +15,ROR,Ops/ROR/ROR.sol,29:16,x == y,false +16,ROR,Ops/ROR/ROR.sol,34:16,x == y,false +17,ROR,Ops/ROR/ROR.sol,39:18,!=,< +18,ROR,Ops/ROR/ROR.sol,39:18,!=,> +19,ROR,Ops/ROR/ROR.sol,39:16,x != y,true +20,ROR,Ops/ROR/ROR.sol,44:16,x != y,true +21,ROR,Ops/ROR/ROR.sol,53:24,>=,> +22,ROR,Ops/ROR/ROR.sol,53:24,>=,== +23,ROR,Ops/ROR/ROR.sol,53:16,(x + y) >= z,true +24,ROR,Ops/ROR/ROR.sol,62:24,!=,< +25,ROR,Ops/ROR/ROR.sol,62:24,!=,> +26,ROR,Ops/ROR/ROR.sol,62:16,(x + y) != z,true diff --git a/resources/regressions/test_import_map.json/gambit_results.json b/resources/regressions/test_import_map.json/gambit_results.json index 524509cb..5facf268 100644 --- a/resources/regressions/test_import_map.json/gambit_results.json +++ b/resources/regressions/test_import_map.json/gambit_results.json @@ -8,7 +8,7 @@ "name": "mutants/1/contracts/Contract.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + "original": "contracts/Contract.sol", "repl": "-" }, { @@ -20,7 +20,7 @@ "name": "mutants/2/contracts/Contract.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + "original": "contracts/Contract.sol", "repl": "*" }, { @@ -32,7 +32,7 @@ "name": "mutants/3/contracts/Contract.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + "original": "contracts/Contract.sol", "repl": "/" }, { @@ -44,7 +44,7 @@ "name": "mutants/4/contracts/Contract.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol", + "original": "contracts/Contract.sol", "repl": "%" } ] \ No newline at end of file diff --git a/resources/regressions/test_import_map.json/mutants.log b/resources/regressions/test_import_map.json/mutants.log index d78db16a..a120aea2 100644 --- a/resources/regressions/test_import_map.json/mutants.log +++ b/resources/regressions/test_import_map.json/mutants.log @@ -1,4 +1,4 @@ -1,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,9:18,+,- -2,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,9:18,+,* -3,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,9:18,+,/ -4,AOR,/Users/benku/Gambit/benchmarks/ImportMaps/contracts/Contract.sol,9:18,+,% +1,AOR,contracts/Contract.sol,9:18,+,- +2,AOR,contracts/Contract.sol,9:18,+,* +3,AOR,contracts/Contract.sol,9:18,+,/ +4,AOR,contracts/Contract.sol,9:18,+,% diff --git a/resources/regressions/test_log_invalid.json/gambit_results.json b/resources/regressions/test_log_invalid.json/gambit_results.json index ff8134f5..1ad7397a 100644 --- a/resources/regressions/test_log_invalid.json/gambit_results.json +++ b/resources/regressions/test_log_invalid.json/gambit_results.json @@ -8,7 +8,7 @@ "name": "mutants/1/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -20,7 +20,7 @@ "name": "mutants/2/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "*" }, { @@ -32,7 +32,7 @@ "name": "mutants/3/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -44,7 +44,7 @@ "name": "mutants/4/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -56,7 +56,7 @@ "name": "mutants/5/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" }, { @@ -68,7 +68,7 @@ "name": "mutants/6/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "*" }, { @@ -80,7 +80,7 @@ "name": "mutants/7/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -92,7 +92,7 @@ "name": "mutants/8/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -104,7 +104,7 @@ "name": "mutants/9/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" }, { @@ -116,7 +116,7 @@ "name": "mutants/10/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -128,7 +128,7 @@ "name": "mutants/11/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -140,7 +140,7 @@ "name": "mutants/12/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -152,7 +152,7 @@ "name": "mutants/13/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" }, { @@ -164,7 +164,7 @@ "name": "mutants/14/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -176,7 +176,7 @@ "name": "mutants/15/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -188,7 +188,7 @@ "name": "mutants/16/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "**" }, { @@ -200,7 +200,7 @@ "name": "mutants/17/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -212,7 +212,7 @@ "name": "mutants/18/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" }, { @@ -224,7 +224,7 @@ "name": "mutants/19/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -236,7 +236,7 @@ "name": "mutants/20/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "*" }, { @@ -248,7 +248,7 @@ "name": "mutants/21/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -260,7 +260,7 @@ "name": "mutants/22/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -272,7 +272,7 @@ "name": "mutants/23/BOR/BOR.sol", "op": "BOR", "orig": "|", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "BOR/BOR.sol", "repl": "&" }, { @@ -284,7 +284,7 @@ "name": "mutants/24/BOR/BOR.sol", "op": "BOR", "orig": "&", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "BOR/BOR.sol", "repl": "|" }, { @@ -296,619 +296,607 @@ "name": "mutants/25/BOR/BOR.sol", "op": "BOR", "orig": "^", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "BOR/BOR.sol", "repl": "&" }, - { - "col": 38, - "description": "ElimDelegateCall", - "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", - "id": "26", - "line": 16, - "name": "mutants/26/EDC/EDC.sol", - "op": "EDC", - "orig": "delegatecall", - "original": "/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol", - "repl": "call" - }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "27", + "id": "26", "line": 9, - "name": "mutants/27/LOR/LOR.sol", + "name": "mutants/26/LOR/LOR.sol", "op": "LOR", "orig": "a && b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "a" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "28", + "id": "27", "line": 9, - "name": "mutants/28/LOR/LOR.sol", + "name": "mutants/27/LOR/LOR.sol", "op": "LOR", "orig": "a && b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "b" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "29", + "id": "28", "line": 9, - "name": "mutants/29/LOR/LOR.sol", + "name": "mutants/28/LOR/LOR.sol", "op": "LOR", "orig": "a && b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "false" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "30", + "id": "29", "line": 14, - "name": "mutants/30/LOR/LOR.sol", + "name": "mutants/29/LOR/LOR.sol", "op": "LOR", "orig": "a || b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "a" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "31", + "id": "30", "line": 14, - "name": "mutants/31/LOR/LOR.sol", + "name": "mutants/30/LOR/LOR.sol", "op": "LOR", "orig": "a || b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "b" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "32", + "id": "31", "line": 14, - "name": "mutants/32/LOR/LOR.sol", + "name": "mutants/31/LOR/LOR.sol", "op": "LOR", "orig": "a || b", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "true" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n \n function not(bool a) public pure returns (bool) {\n", - "id": "33", + "id": "32", "line": 19, - "name": "mutants/33/LOR/LOR.sol", + "name": "mutants/32/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "x < y" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n \n function not(bool a) public pure returns (bool) {\n", - "id": "34", + "id": "33", "line": 19, - "name": "mutants/34/LOR/LOR.sol", + "name": "mutants/33/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "a != (x >= y)" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n \n function not(bool a) public pure returns (bool) {\n", - "id": "35", + "id": "34", "line": 19, - "name": "mutants/35/LOR/LOR.sol", + "name": "mutants/34/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "true" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -19,7 +19,8 @@\n return (x < y) || (a != (x >= y));\n }\n \n+ /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;`\n function not(bool a) public pure returns (bool) {\n- return !a;\n+ return true;\n }\n }\n", - "id": "36", + "id": "35", "line": 23, - "name": "mutants/36/LOR/LOR.sol", + "name": "mutants/35/LOR/LOR.sol", "op": "LOR", "orig": "!a", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "true" }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -19,7 +19,8 @@\n return (x < y) || (a != (x >= y));\n }\n \n+ /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;`\n function not(bool a) public pure returns (bool) {\n- return !a;\n+ return false;\n }\n }\n", - "id": "37", + "id": "36", "line": 23, - "name": "mutants/37/LOR/LOR.sol", + "name": "mutants/36/LOR/LOR.sol", "op": "LOR", "orig": "!a", - "original": "/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol", + "original": "LOR/LOR.sol", "repl": "false" }, { "col": 24, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", - "id": "38", + "id": "37", "line": 15, - "name": "mutants/38/LVR/LVR.sol", + "name": "mutants/37/LVR/LVR.sol", "op": "LVR", "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "1" }, { "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", - "id": "39", + "id": "38", "line": 21, - "name": "mutants/39/LVR/LVR.sol", + "name": "mutants/38/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "0" }, { "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", - "id": "40", + "id": "39", "line": 21, - "name": "mutants/40/LVR/LVR.sol", + "name": "mutants/39/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "2" }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", - "id": "41", + "id": "40", "line": 27, - "name": "mutants/41/LVR/LVR.sol", + "name": "mutants/40/LVR/LVR.sol", "op": "LVR", "orig": "-1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "0" }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", - "id": "42", + "id": "41", "line": 27, - "name": "mutants/42/LVR/LVR.sol", + "name": "mutants/41/LVR/LVR.sol", "op": "LVR", "orig": "-1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "1" }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", - "id": "43", + "id": "42", "line": 27, - "name": "mutants/43/LVR/LVR.sol", + "name": "mutants/42/LVR/LVR.sol", "op": "LVR", "orig": "-1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "-2" }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", - "id": "44", + "id": "43", "line": 33, - "name": "mutants/44/LVR/LVR.sol", + "name": "mutants/43/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "0" }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", - "id": "45", + "id": "44", "line": 33, - "name": "mutants/45/LVR/LVR.sol", + "name": "mutants/44/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "-1" }, { "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", - "id": "46", + "id": "45", "line": 33, - "name": "mutants/46/LVR/LVR.sol", + "name": "mutants/45/LVR/LVR.sol", "op": "LVR", "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "2" }, { "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", - "id": "47", + "id": "46", "line": 39, - "name": "mutants/47/LVR/LVR.sol", + "name": "mutants/46/LVR/LVR.sol", "op": "LVR", "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "-1" }, { "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", - "id": "48", + "id": "47", "line": 39, - "name": "mutants/48/LVR/LVR.sol", + "name": "mutants/47/LVR/LVR.sol", "op": "LVR", "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol", + "original": "LVR/LVR.sol", "repl": "1" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "49", + "id": "48", "line": 9, - "name": "mutants/49/ROR/ROR.sol", + "name": "mutants/48/ROR/ROR.sol", "op": "ROR", "orig": "<", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "<=" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "50", + "id": "49", "line": 9, - "name": "mutants/50/ROR/ROR.sol", + "name": "mutants/49/ROR/ROR.sol", "op": "ROR", "orig": "<", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "!=" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "51", + "id": "50", "line": 9, - "name": "mutants/51/ROR/ROR.sol", + "name": "mutants/50/ROR/ROR.sol", "op": "ROR", "orig": "x < y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "false" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "52", + "id": "51", "line": 14, - "name": "mutants/52/ROR/ROR.sol", + "name": "mutants/51/ROR/ROR.sol", "op": "ROR", "orig": "<=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "<" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "53", + "id": "52", "line": 14, - "name": "mutants/53/ROR/ROR.sol", + "name": "mutants/52/ROR/ROR.sol", "op": "ROR", "orig": "<=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "==" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "54", + "id": "53", "line": 14, - "name": "mutants/54/ROR/ROR.sol", + "name": "mutants/53/ROR/ROR.sol", "op": "ROR", "orig": "x <= y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "true" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "55", + "id": "54", "line": 19, - "name": "mutants/55/ROR/ROR.sol", + "name": "mutants/54/ROR/ROR.sol", "op": "ROR", "orig": ">", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": ">=" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "56", + "id": "55", "line": 19, - "name": "mutants/56/ROR/ROR.sol", + "name": "mutants/55/ROR/ROR.sol", "op": "ROR", "orig": ">", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "!=" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "57", + "id": "56", "line": 19, - "name": "mutants/57/ROR/ROR.sol", + "name": "mutants/56/ROR/ROR.sol", "op": "ROR", "orig": "x > y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "false" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "58", + "id": "57", "line": 24, - "name": "mutants/58/ROR/ROR.sol", + "name": "mutants/57/ROR/ROR.sol", "op": "ROR", "orig": ">=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": ">" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "59", + "id": "58", "line": 24, - "name": "mutants/59/ROR/ROR.sol", + "name": "mutants/58/ROR/ROR.sol", "op": "ROR", "orig": ">=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "==" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "60", + "id": "59", "line": 24, - "name": "mutants/60/ROR/ROR.sol", + "name": "mutants/59/ROR/ROR.sol", "op": "ROR", "orig": "x >= y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "true" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "61", + "id": "60", "line": 29, - "name": "mutants/61/ROR/ROR.sol", + "name": "mutants/60/ROR/ROR.sol", "op": "ROR", "orig": "==", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "<=" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "62", + "id": "61", "line": 29, - "name": "mutants/62/ROR/ROR.sol", + "name": "mutants/61/ROR/ROR.sol", "op": "ROR", "orig": "==", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": ">=" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "63", + "id": "62", "line": 29, - "name": "mutants/63/ROR/ROR.sol", + "name": "mutants/62/ROR/ROR.sol", "op": "ROR", "orig": "x == y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "false" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", - "id": "64", + "id": "63", "line": 34, - "name": "mutants/64/ROR/ROR.sol", + "name": "mutants/63/ROR/ROR.sol", "op": "ROR", "orig": "x == y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "false" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "65", + "id": "64", "line": 39, - "name": "mutants/65/ROR/ROR.sol", + "name": "mutants/64/ROR/ROR.sol", "op": "ROR", "orig": "!=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "<" }, { "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "66", + "id": "65", "line": 39, - "name": "mutants/66/ROR/ROR.sol", + "name": "mutants/65/ROR/ROR.sol", "op": "ROR", "orig": "!=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": ">" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "67", + "id": "66", "line": 39, - "name": "mutants/67/ROR/ROR.sol", + "name": "mutants/66/ROR/ROR.sol", "op": "ROR", "orig": "x != y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "true" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", - "id": "68", + "id": "67", "line": 44, - "name": "mutants/68/ROR/ROR.sol", + "name": "mutants/67/ROR/ROR.sol", "op": "ROR", "orig": "x != y", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "true" }, { "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "69", + "id": "68", "line": 53, - "name": "mutants/69/ROR/ROR.sol", + "name": "mutants/68/ROR/ROR.sol", "op": "ROR", "orig": ">=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": ">" }, { "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "70", + "id": "69", "line": 53, - "name": "mutants/70/ROR/ROR.sol", + "name": "mutants/69/ROR/ROR.sol", "op": "ROR", "orig": ">=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "==" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "71", + "id": "70", "line": 53, - "name": "mutants/71/ROR/ROR.sol", + "name": "mutants/70/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) >= z", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "true" }, { "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", - "id": "72", + "id": "71", "line": 62, - "name": "mutants/72/ROR/ROR.sol", + "name": "mutants/71/ROR/ROR.sol", "op": "ROR", "orig": "!=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "<" }, { "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", - "id": "73", + "id": "72", "line": 62, - "name": "mutants/73/ROR/ROR.sol", + "name": "mutants/72/ROR/ROR.sol", "op": "ROR", "orig": "!=", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": ">" }, { "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", - "id": "74", + "id": "73", "line": 62, - "name": "mutants/74/ROR/ROR.sol", + "name": "mutants/73/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) != z", - "original": "/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol", + "original": "ROR/ROR.sol", "repl": "true" }, { "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return -x;\n }\n \n // Expect a single mutant: ~x\n", - "id": "75", + "id": "74", "line": 14, - "name": "mutants/75/UOR/UOR.sol", + "name": "mutants/74/UOR/UOR.sol", "op": "UOR", "orig": "~", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "original": "UOR/UOR.sol", "repl": "-" }, { "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~x;\n }\n }\n", - "id": "76", + "id": "75", "line": 19, - "name": "mutants/76/UOR/UOR.sol", + "name": "mutants/75/UOR/UOR.sol", "op": "UOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "original": "UOR/UOR.sol", "repl": "~" } ] \ No newline at end of file diff --git a/resources/regressions/test_log_invalid.json/invalid.log b/resources/regressions/test_log_invalid.json/invalid.log index 19c39fa9..0cbf1ac2 100644 --- a/resources/regressions/test_log_invalid.json/invalid.log +++ b/resources/regressions/test_log_invalid.json/invalid.log @@ -1 +1 @@ -1,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,8:15,~,- +1,UOR,/Users/chandra/research/gambit/benchmarks/Ops/UOR/UOR.sol,8:15,~,- diff --git a/resources/regressions/test_log_invalid.json/mutants.log b/resources/regressions/test_log_invalid.json/mutants.log index 72462c57..f0068ce4 100644 --- a/resources/regressions/test_log_invalid.json/mutants.log +++ b/resources/regressions/test_log_invalid.json/mutants.log @@ -1,76 +1,75 @@ -1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,- -2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,* -3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,/ -4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,% -5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,+ -6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,* -7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,/ -8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,% -9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,+ -10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,- -11,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,/ -12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,% -13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,+ -14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,- -15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,/ -16,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,** -17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,% -18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,+ -19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,- -20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,* -21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,/ -22,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,% -23,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,10:18,|,& -24,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,16:18,&,| -25,BOR,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,22:18,^,& -26,EDC,/Users/benku/Gambit/benchmarks/Ops/EDC/EDC.sol,16:38,delegatecall,call -27,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,a -28,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,b -29,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,9:16,a && b,false -30,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,a -31,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,b -32,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,14:16,a || b,true -33,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y -34,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) -35,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true -36,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,23:16,!a,true -37,LOR,/Users/benku/Gambit/benchmarks/Ops/LOR/LOR.sol,23:16,!a,false -38,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,15:24,0,1 -39,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,0 -40,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,21:23,1,2 -41,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,0 -42,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,1 -43,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,27:26,-1,-2 -44,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,0 -45,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,-1 -46,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,33:26,1,2 -47,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,-1 -48,LVR,/Users/benku/Gambit/benchmarks/Ops/LVR/LVR.sol,39:23,0,1 -49,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,<= -50,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:18,<,!= -51,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,9:16,x < y,false -52,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,< -53,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:18,<=,== -54,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,14:16,x <= y,true -55,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,>= -56,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:18,>,!= -57,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,19:16,x > y,false -58,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,> -59,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:18,>=,== -60,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,24:16,x >= y,true -61,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,<= -62,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:18,==,>= -63,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,29:16,x == y,false -64,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,34:16,x == y,false -65,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,< -66,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:18,!=,> -67,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,39:16,x != y,true -68,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,44:16,x != y,true -69,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,> -70,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:24,>=,== -71,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,53:16,(x + y) >= z,true -72,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,< -73,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:24,!=,> -74,ROR,/Users/benku/Gambit/benchmarks/Ops/ROR/ROR.sol,62:16,(x + y) != z,true -75,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~,- -76,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,-,~ +1,AOR,AOR/AOR.sol,13:18,+,- +2,AOR,AOR/AOR.sol,13:18,+,* +3,AOR,AOR/AOR.sol,13:18,+,/ +4,AOR,AOR/AOR.sol,13:18,+,% +5,AOR,AOR/AOR.sol,22:18,-,+ +6,AOR,AOR/AOR.sol,22:18,-,* +7,AOR,AOR/AOR.sol,22:18,-,/ +8,AOR,AOR/AOR.sol,22:18,-,% +9,AOR,AOR/AOR.sol,34:22,*,+ +10,AOR,AOR/AOR.sol,34:22,*,- +11,AOR,AOR/AOR.sol,34:22,*,/ +12,AOR,AOR/AOR.sol,34:22,*,% +13,AOR,AOR/AOR.sol,47:22,*,+ +14,AOR,AOR/AOR.sol,47:22,*,- +15,AOR,AOR/AOR.sol,47:22,*,/ +16,AOR,AOR/AOR.sol,47:22,*,** +17,AOR,AOR/AOR.sol,47:22,*,% +18,AOR,AOR/AOR.sol,58:18,**,+ +19,AOR,AOR/AOR.sol,58:18,**,- +20,AOR,AOR/AOR.sol,58:18,**,* +21,AOR,AOR/AOR.sol,58:18,**,/ +22,AOR,AOR/AOR.sol,58:18,**,% +23,BOR,BOR/BOR.sol,10:18,|,& +24,BOR,BOR/BOR.sol,16:18,&,| +25,BOR,BOR/BOR.sol,22:18,^,& +26,LOR,LOR/LOR.sol,9:16,a && b,a +27,LOR,LOR/LOR.sol,9:16,a && b,b +28,LOR,LOR/LOR.sol,9:16,a && b,false +29,LOR,LOR/LOR.sol,14:16,a || b,a +30,LOR,LOR/LOR.sol,14:16,a || b,b +31,LOR,LOR/LOR.sol,14:16,a || b,true +32,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y +33,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) +34,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true +35,LOR,LOR/LOR.sol,23:16,!a,true +36,LOR,LOR/LOR.sol,23:16,!a,false +37,LVR,LVR/LVR.sol,15:24,0,1 +38,LVR,LVR/LVR.sol,21:23,1,0 +39,LVR,LVR/LVR.sol,21:23,1,2 +40,LVR,LVR/LVR.sol,27:26,-1,0 +41,LVR,LVR/LVR.sol,27:26,-1,1 +42,LVR,LVR/LVR.sol,27:26,-1,-2 +43,LVR,LVR/LVR.sol,33:26,1,0 +44,LVR,LVR/LVR.sol,33:26,1,-1 +45,LVR,LVR/LVR.sol,33:26,1,2 +46,LVR,LVR/LVR.sol,39:23,0,-1 +47,LVR,LVR/LVR.sol,39:23,0,1 +48,ROR,ROR/ROR.sol,9:18,<,<= +49,ROR,ROR/ROR.sol,9:18,<,!= +50,ROR,ROR/ROR.sol,9:16,x < y,false +51,ROR,ROR/ROR.sol,14:18,<=,< +52,ROR,ROR/ROR.sol,14:18,<=,== +53,ROR,ROR/ROR.sol,14:16,x <= y,true +54,ROR,ROR/ROR.sol,19:18,>,>= +55,ROR,ROR/ROR.sol,19:18,>,!= +56,ROR,ROR/ROR.sol,19:16,x > y,false +57,ROR,ROR/ROR.sol,24:18,>=,> +58,ROR,ROR/ROR.sol,24:18,>=,== +59,ROR,ROR/ROR.sol,24:16,x >= y,true +60,ROR,ROR/ROR.sol,29:18,==,<= +61,ROR,ROR/ROR.sol,29:18,==,>= +62,ROR,ROR/ROR.sol,29:16,x == y,false +63,ROR,ROR/ROR.sol,34:16,x == y,false +64,ROR,ROR/ROR.sol,39:18,!=,< +65,ROR,ROR/ROR.sol,39:18,!=,> +66,ROR,ROR/ROR.sol,39:16,x != y,true +67,ROR,ROR/ROR.sol,44:16,x != y,true +68,ROR,ROR/ROR.sol,53:24,>=,> +69,ROR,ROR/ROR.sol,53:24,>=,== +70,ROR,ROR/ROR.sol,53:16,(x + y) >= z,true +71,ROR,ROR/ROR.sol,62:24,!=,< +72,ROR,ROR/ROR.sol,62:24,!=,> +73,ROR,ROR/ROR.sol,62:16,(x + y) != z,true +74,UOR,UOR/UOR.sol,14:16,~,- +75,UOR,UOR/UOR.sol,19:16,-,~ diff --git a/resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol b/resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol deleted file mode 100644 index 19754976..00000000 --- a/resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.13; - -contract Helper { - function setVars(uint _num) public payable {} -} - -contract EDC { - uint public num; - address public sender; - uint public value; - bool public delegateSuccessful; - bytes public myData; - - /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(` - function setVars(address _contract) public payable { - (bool success, ) = _contract.call( - abi.encodeWithSignature("setVars(uint256)", 1) - ); - require(success, "Delegatecall failed"); - } -} diff --git a/resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/26/LOR/LOR.sol similarity index 85% rename from resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol rename to resources/regressions/test_log_invalid.json/mutants/26/LOR/LOR.sol index 35ee5751..01536cd6 100644 --- a/resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/26/LOR/LOR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a && b; + return a; } // Expect three mutants: a, b, true @@ -19,8 +20,7 @@ contract LOR { return (x < y) || (a != (x >= y)); } - /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;` function not(bool a) public pure returns (bool) { - return false; + return !a; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol index 01536cd6..c97e8675 100644 --- a/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` + /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a; + return b; } // Expect three mutants: a, b, true diff --git a/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol index c97e8675..492dc45c 100644 --- a/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` + /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return b; + return false; } // Expect three mutants: a, b, true diff --git a/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol index 492dc45c..7f62ba05 100644 --- a/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return false; + return a && b; } // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a || b; + return a; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol index 7f62ba05..efb5d5a8 100644 --- a/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol @@ -10,9 +10,9 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` + /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a; + return b; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol index efb5d5a8..7d3c811a 100644 --- a/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol @@ -10,9 +10,9 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` + /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return b; + return true; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol index 7d3c811a..4ceda907 100644 --- a/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol @@ -10,14 +10,14 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return true; + return a || b; } // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return (x < y) || (a != (x >= y)); + return x < y; } function not(bool a) public pure returns (bool) { diff --git a/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol index 4ceda907..690fae8d 100644 --- a/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol @@ -15,9 +15,9 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return x < y; + return a != (x >= y); } function not(bool a) public pure returns (bool) { diff --git a/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol index 690fae8d..2ef15642 100644 --- a/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol @@ -15,9 +15,9 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return a != (x >= y); + return true; } function not(bool a) public pure returns (bool) { diff --git a/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol index 2ef15642..be0e75f4 100644 --- a/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol @@ -15,12 +15,12 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return true; + return (x < y) || (a != (x >= y)); } + /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;` function not(bool a) public pure returns (bool) { - return !a; + return true; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol index be0e75f4..35ee5751 100644 --- a/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol @@ -19,8 +19,8 @@ contract LOR { return (x < y) || (a != (x >= y)); } - /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;` + /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;` function not(bool a) public pure returns (bool) { - return true; + return false; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol similarity index 89% rename from resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol rename to resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol index e241973d..e06271e2 100644 --- a/resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol @@ -11,8 +11,9 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; + uint256 zero = 1; return zero; } @@ -35,9 +36,8 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol index e06271e2..f2cb8295 100644 --- a/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol @@ -11,15 +11,15 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 1; + uint256 zero = 0; return zero; } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 0; return one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol index f2cb8295..d18c6c48 100644 --- a/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol @@ -17,9 +17,9 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 0; + uint256 one = 2; return one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol index d18c6c48..173dc540 100644 --- a/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 2; + uint256 one = 1; return one; } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = 0; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol index 173dc540..72ffaedf 100644 --- a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol @@ -23,9 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = 1; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol index 72ffaedf..1e24417f 100644 --- a/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol @@ -23,9 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 1; + int256 neg_one = -2; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol index 1e24417f..e088a4e3 100644 --- a/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol @@ -23,15 +23,15 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -2; + int256 neg_one = -1; return neg_one; } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = 0; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol index e088a4e3..2407079e 100644 --- a/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol @@ -29,9 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 0; + int256 pos_one = -1; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol index 2407079e..a5082f3b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol @@ -29,9 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = -1; + int256 pos_one = 2; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol index a5082f3b..22af4185 100644 --- a/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol @@ -29,15 +29,15 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 2; + int256 pos_one = 1; return pos_one; } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = -1; return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol index 22af4185..e241973d 100644 --- a/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol @@ -35,9 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = -1; + int256 zero = 1; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol similarity index 92% rename from resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol index 84889114..dec84f24 100644 --- a/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol @@ -5,8 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x <= y; } // Expect 3 mutants: x < y, x == y, true @@ -58,8 +59,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return true; + return (x + y) != z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol index dec84f24..0c05265c 100644 --- a/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x != y; } // Expect 3 mutants: x < y, x == y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol index 0c05265c..6141947b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return false; } // Expect 3 mutants: x < y, x == y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol index 6141947b..9f8ccd04 100644 --- a/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x < y; } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x < y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol index 9f8ccd04..18e38f34 100644 --- a/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol @@ -10,9 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x == y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol index 18e38f34..55dd7c79 100644 --- a/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol @@ -10,9 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return true; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol index 55dd7c79..52949d03 100644 --- a/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol @@ -10,14 +10,14 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x >= y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol index 52949d03..a3e16320 100644 --- a/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol @@ -15,9 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x != y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol index a3e16320..a9024427 100644 --- a/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol @@ -15,9 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return false; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol index a9024427..337c9a92 100644 --- a/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol @@ -15,14 +15,14 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x > y; } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x > y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol index 337c9a92..7c02b73b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol @@ -20,9 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x == y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol index 7c02b73b..3d299dfb 100644 --- a/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol @@ -20,9 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` + /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return true; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol index 3d299dfb..c865469b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol @@ -20,14 +20,14 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x <= y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol index c865469b..8cdc1c10 100644 --- a/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol @@ -25,9 +25,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` + /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x >= y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol index 8cdc1c10..de6a4360 100644 --- a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol @@ -25,9 +25,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return false; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol index de6a4360..ab40e6c9 100644 --- a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol @@ -25,14 +25,14 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x == y; } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; + return false; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol index ab40e6c9..f42e7b7e 100644 --- a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol @@ -30,14 +30,14 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x == y; } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x < y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol index f42e7b7e..e5f50322 100644 --- a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x > y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol index e5f50322..83684484 100644 --- a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return true; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol index 83684484..3ae92133 100644 --- a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol @@ -35,14 +35,14 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x != y; } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol index 3ae92133..bdeac3af 100644 --- a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol @@ -40,9 +40,8 @@ contract ROR { } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true @@ -50,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return (x + y) > z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol index bdeac3af..430379f6 100644 --- a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol @@ -49,9 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) == z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol index 430379f6..3d67c155 100644 --- a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol @@ -49,9 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) == z; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol index 3d67c155..13612614 100644 --- a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol @@ -49,9 +49,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return true; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return (x + y) < z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol index 13612614..dd0c83ca 100644 --- a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol @@ -58,8 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) < z; + return (x + y) > z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol index dd0c83ca..84889114 100644 --- a/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol @@ -58,8 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) > z; + return true; } } diff --git a/resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol similarity index 83% rename from resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol rename to resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol index 84eae0ca..50d09571 100644 --- a/resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol @@ -10,13 +10,13 @@ contract UOR { } // Expect a single mutant: -x + /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;` function signed_bw_not(int256 x) public pure returns (int256) { - return ~x; + return -x; } // Expect a single mutant: ~x - /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;` function signed_neg(int256 x) public pure returns (int256) { - return ~x; + return -x; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol index 50d09571..84eae0ca 100644 --- a/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol @@ -10,13 +10,13 @@ contract UOR { } // Expect a single mutant: -x - /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;` function signed_bw_not(int256 x) public pure returns (int256) { - return -x; + return ~x; } // Expect a single mutant: ~x + /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;` function signed_neg(int256 x) public pure returns (int256) { - return -x; + return ~x; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json index 7bb1ca00..0637a088 100644 --- a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json @@ -1,722 +1 @@ -[ - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "1", - "line": 7, - "name": "mutants/1/MultipleContracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "2", - "line": 7, - "name": "mutants/2/MultipleContracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "3", - "line": 7, - "name": "mutants/3/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", - "id": "4", - "line": 11, - "name": "mutants/4/MultipleContracts/C.sol", - "op": "STD", - "orig": "return a + b", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "5", - "line": 11, - "name": "mutants/5/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "6", - "line": 11, - "name": "mutants/6/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "7", - "line": 11, - "name": "mutants/7/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "8", - "line": 11, - "name": "mutants/8/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "9", - "line": 17, - "name": "mutants/9/MultipleContracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "10", - "line": 17, - "name": "mutants/10/MultipleContracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "2" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", - "id": "11", - "line": 18, - "name": "mutants/11/MultipleContracts/C.sol", - "op": "STD", - "orig": "a[0] = msg.sender", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 11, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", - "id": "12", - "line": 18, - "name": "mutants/12/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", - "id": "13", - "line": 19, - "name": "mutants/13/MultipleContracts/C.sol", - "op": "STD", - "orig": "return a", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "14", - "line": 23, - "name": "mutants/14/MultipleContracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "15", - "line": 23, - "name": "mutants/15/MultipleContracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "11" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "16", - "line": 24, - "name": "mutants/16/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "+" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "17", - "line": 24, - "name": "mutants/17/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "18", - "line": 24, - "name": "mutants/18/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "19", - "line": 24, - "name": "mutants/19/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "20", - "line": 24, - "name": "mutants/20/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "21", - "line": 25, - "name": "mutants/21/MultipleContracts/C.sol", - "op": "STD", - "orig": "return res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "22", - "line": 29, - "name": "mutants/22/MultipleContracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "23", - "line": 29, - "name": "mutants/23/MultipleContracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "24", - "line": 29, - "name": "mutants/24/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "25", - "line": 34, - "name": "mutants/25/MultipleContracts/C.sol", - "op": "STD", - "orig": "Utils.getarray(b, address(this))", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "26", - "line": 38, - "name": "mutants/26/MultipleContracts/C.sol", - "op": "STD", - "orig": "return c + d", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "27", - "line": 38, - "name": "mutants/27/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "28", - "line": 38, - "name": "mutants/28/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "29", - "line": 38, - "name": "mutants/29/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "30", - "line": 38, - "name": "mutants/30/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "31", - "line": 7, - "name": "mutants/31/MultipleContracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "32", - "line": 7, - "name": "mutants/32/MultipleContracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "33", - "line": 7, - "name": "mutants/33/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", - "id": "34", - "line": 11, - "name": "mutants/34/MultipleContracts/C.sol", - "op": "STD", - "orig": "return a + b", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "35", - "line": 11, - "name": "mutants/35/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "36", - "line": 11, - "name": "mutants/36/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "37", - "line": 11, - "name": "mutants/37/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "38", - "line": 11, - "name": "mutants/38/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "39", - "line": 17, - "name": "mutants/39/MultipleContracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "40", - "line": 17, - "name": "mutants/40/MultipleContracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "2" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", - "id": "41", - "line": 18, - "name": "mutants/41/MultipleContracts/C.sol", - "op": "STD", - "orig": "a[0] = msg.sender", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 11, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", - "id": "42", - "line": 18, - "name": "mutants/42/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", - "id": "43", - "line": 19, - "name": "mutants/43/MultipleContracts/C.sol", - "op": "STD", - "orig": "return a", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "44", - "line": 23, - "name": "mutants/44/MultipleContracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "45", - "line": 23, - "name": "mutants/45/MultipleContracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "11" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "46", - "line": 24, - "name": "mutants/46/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "+" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "47", - "line": 24, - "name": "mutants/47/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "48", - "line": 24, - "name": "mutants/48/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "49", - "line": 24, - "name": "mutants/49/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "50", - "line": 24, - "name": "mutants/50/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "51", - "line": 25, - "name": "mutants/51/MultipleContracts/C.sol", - "op": "STD", - "orig": "return res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "52", - "line": 29, - "name": "mutants/52/MultipleContracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "53", - "line": 29, - "name": "mutants/53/MultipleContracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "54", - "line": 29, - "name": "mutants/54/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "55", - "line": 34, - "name": "mutants/55/MultipleContracts/C.sol", - "op": "STD", - "orig": "Utils.getarray(b, address(this))", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "56", - "line": 38, - "name": "mutants/56/MultipleContracts/C.sol", - "op": "STD", - "orig": "return c + d", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "57", - "line": 38, - "name": "mutants/57/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "58", - "line": 38, - "name": "mutants/58/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "59", - "line": 38, - "name": "mutants/59/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "60", - "line": 38, - "name": "mutants/60/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - } -] \ No newline at end of file +[] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants.log b/resources/regressions/test_multiple_contracts_1.json/mutants.log index 7d9a6488..e69de29b 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_1.json/mutants.log @@ -1,60 +0,0 @@ -1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) -2,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false -3,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 -4,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) -5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- -6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* -7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ -8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% -9,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 -10,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 -11,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) -12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 -13,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) -14,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 -15,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 -16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ -17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- -18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* -19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ -20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% -21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) -22,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -23,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -24,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 -25,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) -27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% -31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) -32,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false -33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 -34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) -35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- -36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* -37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% -39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 -40,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 -41,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) -42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) -44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 -45,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 -46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ -47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% -51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) -52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -53,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -54,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 -55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) -57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -60,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol deleted file mode 100644 index 5f69007a..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(true); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol deleted file mode 100644 index 16f8bc88..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol deleted file mode 100644 index 427647a6..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol deleted file mode 100644 index 9db93f13..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - a[1] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol deleted file mode 100644 index a9342ea1..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` - a[0] = msg.sender; - assert(true); - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol deleted file mode 100644 index f2136ed3..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol deleted file mode 100644 index f69e3360..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/15/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol deleted file mode 100644 index 13319cbe..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/16/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a + decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol deleted file mode 100644 index 3279b41e..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/17/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol deleted file mode 100644 index 95cc94e7..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/18/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol deleted file mode 100644 index cc3476f1..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/19/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a / decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol deleted file mode 100644 index ecdc98c4..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(false); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol deleted file mode 100644 index 4979f42e..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/20/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a % decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol deleted file mode 100644 index 5933d066..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/21/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol deleted file mode 100644 index a4c6c970..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/22/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(true); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol deleted file mode 100644 index 781e87b1..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/23/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(false); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol deleted file mode 100644 index 7749a0cb..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/24/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol deleted file mode 100644 index a14e05da..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/25/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` - address[] memory b = this.foo(); - assert(true); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol deleted file mode 100644 index 4887a934..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/26/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - assert(true); - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol deleted file mode 100644 index 7a0c07d0..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/27/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c - d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol deleted file mode 100644 index d73584b8..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/28/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c * d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol deleted file mode 100644 index c226dcfd..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/29/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol deleted file mode 100644 index e9466e07..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(c[1] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol deleted file mode 100644 index c6022ee9..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/30/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol deleted file mode 100644 index 5f69007a..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/31/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(true); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol deleted file mode 100644 index ecdc98c4..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/32/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(false); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol deleted file mode 100644 index e9466e07..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/33/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(c[1] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol deleted file mode 100644 index f7a48737..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/34/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - assert(true); - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol deleted file mode 100644 index 9e5f617a..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/35/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a - b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol deleted file mode 100644 index 86125329..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/36/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a * b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol deleted file mode 100644 index e85ef12c..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/37/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a / b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol deleted file mode 100644 index b32909ed..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/38/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a % b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol deleted file mode 100644 index f9a5de25..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/39/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol deleted file mode 100644 index f7a48737..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - assert(true); - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol deleted file mode 100644 index 16f8bc88..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/40/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol deleted file mode 100644 index 427647a6..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/41/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol deleted file mode 100644 index 9db93f13..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/42/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - a[1] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol deleted file mode 100644 index a9342ea1..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/43/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` - a[0] = msg.sender; - assert(true); - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol deleted file mode 100644 index f2136ed3..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/44/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol deleted file mode 100644 index f69e3360..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/45/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol deleted file mode 100644 index 13319cbe..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/46/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a + decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol deleted file mode 100644 index 3279b41e..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/47/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol deleted file mode 100644 index 95cc94e7..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/48/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol deleted file mode 100644 index cc3476f1..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/49/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a / decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol deleted file mode 100644 index 9e5f617a..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a - b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol deleted file mode 100644 index 4979f42e..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/50/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a % decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol deleted file mode 100644 index 5933d066..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/51/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol deleted file mode 100644 index a4c6c970..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/52/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(true); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol deleted file mode 100644 index 781e87b1..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/53/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(false); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol deleted file mode 100644 index 7749a0cb..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/54/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol deleted file mode 100644 index a14e05da..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/55/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` - address[] memory b = this.foo(); - assert(true); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol deleted file mode 100644 index 4887a934..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/56/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - assert(true); - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol deleted file mode 100644 index 7a0c07d0..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/57/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c - d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol deleted file mode 100644 index d73584b8..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/58/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c * d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol deleted file mode 100644 index c226dcfd..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/59/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol deleted file mode 100644 index 86125329..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a * b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol deleted file mode 100644 index c6022ee9..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/60/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol deleted file mode 100644 index e85ef12c..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a / b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol deleted file mode 100644 index b32909ed..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a % b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol deleted file mode 100644 index f9a5de25..00000000 --- a/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json index 7bb1ca00..0637a088 100644 --- a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json @@ -1,722 +1 @@ -[ - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "1", - "line": 7, - "name": "mutants/1/MultipleContracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "2", - "line": 7, - "name": "mutants/2/MultipleContracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "3", - "line": 7, - "name": "mutants/3/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", - "id": "4", - "line": 11, - "name": "mutants/4/MultipleContracts/C.sol", - "op": "STD", - "orig": "return a + b", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "5", - "line": 11, - "name": "mutants/5/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "6", - "line": 11, - "name": "mutants/6/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "7", - "line": 11, - "name": "mutants/7/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "8", - "line": 11, - "name": "mutants/8/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "9", - "line": 17, - "name": "mutants/9/MultipleContracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "10", - "line": 17, - "name": "mutants/10/MultipleContracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "2" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", - "id": "11", - "line": 18, - "name": "mutants/11/MultipleContracts/C.sol", - "op": "STD", - "orig": "a[0] = msg.sender", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 11, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", - "id": "12", - "line": 18, - "name": "mutants/12/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", - "id": "13", - "line": 19, - "name": "mutants/13/MultipleContracts/C.sol", - "op": "STD", - "orig": "return a", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "14", - "line": 23, - "name": "mutants/14/MultipleContracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "15", - "line": 23, - "name": "mutants/15/MultipleContracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "11" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "16", - "line": 24, - "name": "mutants/16/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "+" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "17", - "line": 24, - "name": "mutants/17/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "18", - "line": 24, - "name": "mutants/18/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "19", - "line": 24, - "name": "mutants/19/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "20", - "line": 24, - "name": "mutants/20/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "21", - "line": 25, - "name": "mutants/21/MultipleContracts/C.sol", - "op": "STD", - "orig": "return res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "22", - "line": 29, - "name": "mutants/22/MultipleContracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "23", - "line": 29, - "name": "mutants/23/MultipleContracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "24", - "line": 29, - "name": "mutants/24/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "25", - "line": 34, - "name": "mutants/25/MultipleContracts/C.sol", - "op": "STD", - "orig": "Utils.getarray(b, address(this))", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "26", - "line": 38, - "name": "mutants/26/MultipleContracts/C.sol", - "op": "STD", - "orig": "return c + d", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "27", - "line": 38, - "name": "mutants/27/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "28", - "line": 38, - "name": "mutants/28/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "29", - "line": 38, - "name": "mutants/29/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "30", - "line": 38, - "name": "mutants/30/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "31", - "line": 7, - "name": "mutants/31/MultipleContracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "32", - "line": 7, - "name": "mutants/32/MultipleContracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "33", - "line": 7, - "name": "mutants/33/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", - "id": "34", - "line": 11, - "name": "mutants/34/MultipleContracts/C.sol", - "op": "STD", - "orig": "return a + b", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "35", - "line": 11, - "name": "mutants/35/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "36", - "line": 11, - "name": "mutants/36/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "37", - "line": 11, - "name": "mutants/37/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "38", - "line": 11, - "name": "mutants/38/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "39", - "line": 17, - "name": "mutants/39/MultipleContracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "40", - "line": 17, - "name": "mutants/40/MultipleContracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "2" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", - "id": "41", - "line": 18, - "name": "mutants/41/MultipleContracts/C.sol", - "op": "STD", - "orig": "a[0] = msg.sender", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 11, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", - "id": "42", - "line": 18, - "name": "mutants/42/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", - "id": "43", - "line": 19, - "name": "mutants/43/MultipleContracts/C.sol", - "op": "STD", - "orig": "return a", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "44", - "line": 23, - "name": "mutants/44/MultipleContracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "45", - "line": 23, - "name": "mutants/45/MultipleContracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "11" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "46", - "line": 24, - "name": "mutants/46/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "+" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "47", - "line": 24, - "name": "mutants/47/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "48", - "line": 24, - "name": "mutants/48/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "49", - "line": 24, - "name": "mutants/49/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "50", - "line": 24, - "name": "mutants/50/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "51", - "line": 25, - "name": "mutants/51/MultipleContracts/C.sol", - "op": "STD", - "orig": "return res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "52", - "line": 29, - "name": "mutants/52/MultipleContracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "53", - "line": 29, - "name": "mutants/53/MultipleContracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "54", - "line": 29, - "name": "mutants/54/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "55", - "line": 34, - "name": "mutants/55/MultipleContracts/C.sol", - "op": "STD", - "orig": "Utils.getarray(b, address(this))", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "56", - "line": 38, - "name": "mutants/56/MultipleContracts/C.sol", - "op": "STD", - "orig": "return c + d", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "57", - "line": 38, - "name": "mutants/57/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "58", - "line": 38, - "name": "mutants/58/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "59", - "line": 38, - "name": "mutants/59/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "60", - "line": 38, - "name": "mutants/60/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - } -] \ No newline at end of file +[] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants.log b/resources/regressions/test_multiple_contracts_2.json/mutants.log index 7d9a6488..e69de29b 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_2.json/mutants.log @@ -1,60 +0,0 @@ -1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) -2,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false -3,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 -4,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) -5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- -6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* -7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ -8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% -9,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 -10,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 -11,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) -12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 -13,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) -14,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 -15,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 -16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ -17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- -18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* -19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ -20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% -21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) -22,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -23,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -24,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 -25,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) -27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% -31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) -32,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false -33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 -34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) -35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- -36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* -37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% -39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 -40,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 -41,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) -42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) -44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 -45,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 -46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ -47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% -51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) -52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -53,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -54,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 -55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) -57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -60,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol deleted file mode 100644 index 5f69007a..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(true); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol deleted file mode 100644 index 16f8bc88..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol deleted file mode 100644 index 427647a6..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol deleted file mode 100644 index 9db93f13..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - a[1] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol deleted file mode 100644 index a9342ea1..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` - a[0] = msg.sender; - assert(true); - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol deleted file mode 100644 index f2136ed3..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/14/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol deleted file mode 100644 index f69e3360..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/15/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol deleted file mode 100644 index 13319cbe..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/16/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a + decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol deleted file mode 100644 index 3279b41e..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/17/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol deleted file mode 100644 index 95cc94e7..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/18/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol deleted file mode 100644 index cc3476f1..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/19/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a / decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol deleted file mode 100644 index ecdc98c4..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(false); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol deleted file mode 100644 index 4979f42e..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/20/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a % decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol deleted file mode 100644 index 5933d066..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/21/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol deleted file mode 100644 index a4c6c970..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/22/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(true); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol deleted file mode 100644 index 781e87b1..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/23/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(false); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol deleted file mode 100644 index 7749a0cb..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/24/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol deleted file mode 100644 index a14e05da..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/25/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` - address[] memory b = this.foo(); - assert(true); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol deleted file mode 100644 index 4887a934..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/26/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - assert(true); - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol deleted file mode 100644 index 7a0c07d0..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/27/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c - d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol deleted file mode 100644 index d73584b8..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/28/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c * d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol deleted file mode 100644 index c226dcfd..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/29/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol deleted file mode 100644 index e9466e07..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(c[1] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol deleted file mode 100644 index c6022ee9..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/30/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol deleted file mode 100644 index 5f69007a..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/31/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(true); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol deleted file mode 100644 index ecdc98c4..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/32/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(false); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol deleted file mode 100644 index e9466e07..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/33/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(c[1] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol deleted file mode 100644 index f7a48737..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/34/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - assert(true); - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol deleted file mode 100644 index 9e5f617a..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/35/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a - b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol deleted file mode 100644 index 86125329..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/36/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a * b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol deleted file mode 100644 index e85ef12c..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/37/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a / b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol deleted file mode 100644 index b32909ed..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/38/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a % b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol deleted file mode 100644 index f9a5de25..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/39/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol deleted file mode 100644 index f7a48737..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - assert(true); - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol deleted file mode 100644 index 16f8bc88..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/40/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol deleted file mode 100644 index 427647a6..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/41/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol deleted file mode 100644 index 9db93f13..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/42/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - a[1] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol deleted file mode 100644 index a9342ea1..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/43/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` - a[0] = msg.sender; - assert(true); - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol deleted file mode 100644 index f2136ed3..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/44/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol deleted file mode 100644 index f69e3360..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/45/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol deleted file mode 100644 index 13319cbe..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/46/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a + decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol deleted file mode 100644 index 3279b41e..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/47/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol deleted file mode 100644 index 95cc94e7..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/48/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol deleted file mode 100644 index cc3476f1..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/49/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a / decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol deleted file mode 100644 index 9e5f617a..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a - b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol deleted file mode 100644 index 4979f42e..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/50/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a % decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol deleted file mode 100644 index 5933d066..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/51/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol deleted file mode 100644 index a4c6c970..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/52/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(true); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol deleted file mode 100644 index 781e87b1..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/53/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(false); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol deleted file mode 100644 index 7749a0cb..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/54/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol deleted file mode 100644 index a14e05da..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/55/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` - address[] memory b = this.foo(); - assert(true); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol deleted file mode 100644 index 4887a934..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/56/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - assert(true); - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol deleted file mode 100644 index 7a0c07d0..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/57/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c - d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol deleted file mode 100644 index d73584b8..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/58/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c * d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol deleted file mode 100644 index c226dcfd..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/59/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol deleted file mode 100644 index 86125329..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a * b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol deleted file mode 100644 index c6022ee9..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/60/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol deleted file mode 100644 index e85ef12c..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a / b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol deleted file mode 100644 index b32909ed..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a % b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol deleted file mode 100644 index f9a5de25..00000000 --- a/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json index 7bb1ca00..0637a088 100644 --- a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json @@ -1,722 +1 @@ -[ - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "1", - "line": 7, - "name": "mutants/1/MultipleContracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "2", - "line": 7, - "name": "mutants/2/MultipleContracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "3", - "line": 7, - "name": "mutants/3/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", - "id": "4", - "line": 11, - "name": "mutants/4/MultipleContracts/C.sol", - "op": "STD", - "orig": "return a + b", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "5", - "line": 11, - "name": "mutants/5/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "6", - "line": 11, - "name": "mutants/6/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "7", - "line": 11, - "name": "mutants/7/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "8", - "line": 11, - "name": "mutants/8/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "9", - "line": 17, - "name": "mutants/9/MultipleContracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "10", - "line": 17, - "name": "mutants/10/MultipleContracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "2" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", - "id": "11", - "line": 18, - "name": "mutants/11/MultipleContracts/C.sol", - "op": "STD", - "orig": "a[0] = msg.sender", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 11, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", - "id": "12", - "line": 18, - "name": "mutants/12/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", - "id": "13", - "line": 19, - "name": "mutants/13/MultipleContracts/C.sol", - "op": "STD", - "orig": "return a", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "14", - "line": 23, - "name": "mutants/14/MultipleContracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "15", - "line": 23, - "name": "mutants/15/MultipleContracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "11" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "16", - "line": 24, - "name": "mutants/16/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "+" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "17", - "line": 24, - "name": "mutants/17/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "18", - "line": 24, - "name": "mutants/18/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "19", - "line": 24, - "name": "mutants/19/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "20", - "line": 24, - "name": "mutants/20/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "21", - "line": 25, - "name": "mutants/21/MultipleContracts/C.sol", - "op": "STD", - "orig": "return res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "22", - "line": 29, - "name": "mutants/22/MultipleContracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "23", - "line": 29, - "name": "mutants/23/MultipleContracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "24", - "line": 29, - "name": "mutants/24/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "25", - "line": 34, - "name": "mutants/25/MultipleContracts/C.sol", - "op": "STD", - "orig": "Utils.getarray(b, address(this))", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "26", - "line": 38, - "name": "mutants/26/MultipleContracts/C.sol", - "op": "STD", - "orig": "return c + d", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "27", - "line": 38, - "name": "mutants/27/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "28", - "line": 38, - "name": "mutants/28/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "29", - "line": 38, - "name": "mutants/29/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "30", - "line": 38, - "name": "mutants/30/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "31", - "line": 7, - "name": "mutants/31/MultipleContracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "32", - "line": 7, - "name": "mutants/32/MultipleContracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "33", - "line": 7, - "name": "mutants/33/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", - "id": "34", - "line": 11, - "name": "mutants/34/MultipleContracts/C.sol", - "op": "STD", - "orig": "return a + b", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "35", - "line": 11, - "name": "mutants/35/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "36", - "line": 11, - "name": "mutants/36/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "37", - "line": 11, - "name": "mutants/37/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "38", - "line": 11, - "name": "mutants/38/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "39", - "line": 17, - "name": "mutants/39/MultipleContracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "40", - "line": 17, - "name": "mutants/40/MultipleContracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "2" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", - "id": "41", - "line": 18, - "name": "mutants/41/MultipleContracts/C.sol", - "op": "STD", - "orig": "a[0] = msg.sender", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 11, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", - "id": "42", - "line": 18, - "name": "mutants/42/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", - "id": "43", - "line": 19, - "name": "mutants/43/MultipleContracts/C.sol", - "op": "STD", - "orig": "return a", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "44", - "line": 23, - "name": "mutants/44/MultipleContracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "45", - "line": 23, - "name": "mutants/45/MultipleContracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "11" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "46", - "line": 24, - "name": "mutants/46/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "+" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "47", - "line": 24, - "name": "mutants/47/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "48", - "line": 24, - "name": "mutants/48/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "49", - "line": 24, - "name": "mutants/49/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "50", - "line": 24, - "name": "mutants/50/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "51", - "line": 25, - "name": "mutants/51/MultipleContracts/C.sol", - "op": "STD", - "orig": "return res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "52", - "line": 29, - "name": "mutants/52/MultipleContracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "53", - "line": 29, - "name": "mutants/53/MultipleContracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "54", - "line": 29, - "name": "mutants/54/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "55", - "line": 34, - "name": "mutants/55/MultipleContracts/C.sol", - "op": "STD", - "orig": "Utils.getarray(b, address(this))", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "56", - "line": 38, - "name": "mutants/56/MultipleContracts/C.sol", - "op": "STD", - "orig": "return c + d", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "57", - "line": 38, - "name": "mutants/57/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "58", - "line": 38, - "name": "mutants/58/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "59", - "line": 38, - "name": "mutants/59/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "60", - "line": 38, - "name": "mutants/60/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - } -] \ No newline at end of file +[] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants.log b/resources/regressions/test_multiple_contracts_3.json/mutants.log index 7d9a6488..e69de29b 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_3.json/mutants.log @@ -1,60 +0,0 @@ -1,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) -2,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false -3,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 -4,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) -5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- -6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* -7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ -8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% -9,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 -10,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 -11,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) -12,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 -13,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) -14,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 -15,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 -16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ -17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- -18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* -19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ -20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% -21,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) -22,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -23,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -24,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 -25,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -26,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) -27,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -28,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -29,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -30,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% -31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) -32,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false -33,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 -34,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) -35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- -36,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* -37,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ -38,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% -39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 -40,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 -41,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) -42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 -43,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) -44,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 -45,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 -46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ -47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- -48,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* -49,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ -50,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% -51,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) -52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -53,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -54,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 -55,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -56,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) -57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -58,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -59,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -60,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol deleted file mode 100644 index 5f69007a..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(true); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol deleted file mode 100644 index 16f8bc88..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol deleted file mode 100644 index 427647a6..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol deleted file mode 100644 index 9db93f13..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - a[1] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol deleted file mode 100644 index a9342ea1..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` - a[0] = msg.sender; - assert(true); - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol deleted file mode 100644 index f2136ed3..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol deleted file mode 100644 index f69e3360..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol deleted file mode 100644 index 13319cbe..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a + decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol deleted file mode 100644 index 3279b41e..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol deleted file mode 100644 index 95cc94e7..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol deleted file mode 100644 index cc3476f1..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a / decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol deleted file mode 100644 index ecdc98c4..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(false); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol deleted file mode 100644 index 4979f42e..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a % decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol deleted file mode 100644 index 5933d066..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol deleted file mode 100644 index a4c6c970..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(true); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol deleted file mode 100644 index 781e87b1..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(false); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol deleted file mode 100644 index 7749a0cb..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol deleted file mode 100644 index a14e05da..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` - address[] memory b = this.foo(); - assert(true); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol deleted file mode 100644 index 4887a934..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - assert(true); - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol deleted file mode 100644 index 7a0c07d0..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c - d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol deleted file mode 100644 index d73584b8..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c * d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol deleted file mode 100644 index c226dcfd..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol deleted file mode 100644 index e9466e07..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(c[1] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol deleted file mode 100644 index c6022ee9..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol deleted file mode 100644 index 5f69007a..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/31/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(true); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol deleted file mode 100644 index ecdc98c4..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/32/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(false); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol deleted file mode 100644 index e9466e07..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/33/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(c[1] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol deleted file mode 100644 index f7a48737..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/34/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - assert(true); - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol deleted file mode 100644 index 9e5f617a..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/35/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a - b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol deleted file mode 100644 index 86125329..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/36/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a * b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol deleted file mode 100644 index e85ef12c..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/37/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a / b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol deleted file mode 100644 index b32909ed..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/38/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a % b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol deleted file mode 100644 index f9a5de25..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/39/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol deleted file mode 100644 index f7a48737..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - assert(true); - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol deleted file mode 100644 index 16f8bc88..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/40/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol deleted file mode 100644 index 427647a6..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/41/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol deleted file mode 100644 index 9db93f13..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/42/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - a[1] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol deleted file mode 100644 index a9342ea1..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/43/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` - a[0] = msg.sender; - assert(true); - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol deleted file mode 100644 index f2136ed3..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/44/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol deleted file mode 100644 index f69e3360..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/45/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol deleted file mode 100644 index 13319cbe..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/46/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a + decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol deleted file mode 100644 index 3279b41e..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/47/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol deleted file mode 100644 index 95cc94e7..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/48/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol deleted file mode 100644 index cc3476f1..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/49/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a / decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol deleted file mode 100644 index 9e5f617a..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a - b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol deleted file mode 100644 index 4979f42e..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/50/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a % decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol deleted file mode 100644 index 5933d066..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/51/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol deleted file mode 100644 index a4c6c970..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/52/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(true); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol deleted file mode 100644 index 781e87b1..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/53/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(false); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol deleted file mode 100644 index 7749a0cb..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/54/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol deleted file mode 100644 index a14e05da..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/55/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` - address[] memory b = this.foo(); - assert(true); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol deleted file mode 100644 index 4887a934..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/56/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - assert(true); - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol deleted file mode 100644 index 7a0c07d0..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/57/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c - d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol deleted file mode 100644 index d73584b8..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/58/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c * d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol deleted file mode 100644 index c226dcfd..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/59/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol deleted file mode 100644 index 86125329..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a * b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol deleted file mode 100644 index c6022ee9..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/60/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol deleted file mode 100644 index e85ef12c..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a / b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol deleted file mode 100644 index b32909ed..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a % b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol deleted file mode 100644 index f9a5de25..00000000 --- a/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json index daec1385..0637a088 100644 --- a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json @@ -1,314 +1 @@ -[ - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "1", - "line": 11, - "name": "mutants/1/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "2", - "line": 11, - "name": "mutants/2/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "3", - "line": 11, - "name": "mutants/3/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "4", - "line": 11, - "name": "mutants/4/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "5", - "line": 24, - "name": "mutants/5/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "+" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "6", - "line": 24, - "name": "mutants/6/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "7", - "line": 24, - "name": "mutants/7/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "8", - "line": 24, - "name": "mutants/8/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "9", - "line": 24, - "name": "mutants/9/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "10", - "line": 38, - "name": "mutants/10/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "11", - "line": 38, - "name": "mutants/11/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "12", - "line": 38, - "name": "mutants/12/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "13", - "line": 38, - "name": "mutants/13/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "14", - "line": 11, - "name": "mutants/14/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "15", - "line": 11, - "name": "mutants/15/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "16", - "line": 11, - "name": "mutants/16/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "17", - "line": 11, - "name": "mutants/17/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "18", - "line": 24, - "name": "mutants/18/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "+" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "19", - "line": 24, - "name": "mutants/19/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "20", - "line": 24, - "name": "mutants/20/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "21", - "line": 24, - "name": "mutants/21/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "22", - "line": 24, - "name": "mutants/22/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "23", - "line": 38, - "name": "mutants/23/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "24", - "line": 38, - "name": "mutants/24/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "25", - "line": 38, - "name": "mutants/25/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "26", - "line": 38, - "name": "mutants/26/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - } -] \ No newline at end of file +[] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants.log b/resources/regressions/test_multiple_contracts_4.json/mutants.log index 45cc514b..e69de29b 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_4.json/mutants.log @@ -1,26 +0,0 @@ -1,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- -2,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* -3,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ -4,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% -5,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ -6,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- -7,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* -8,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ -9,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% -10,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -11,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -12,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -13,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% -14,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- -15,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* -16,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ -17,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% -18,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ -19,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- -20,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* -21,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ -22,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% -23,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -24,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -25,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -26,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol deleted file mode 100644 index 9e5f617a..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a - b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol deleted file mode 100644 index 7a0c07d0..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/10/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c - d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol deleted file mode 100644 index d73584b8..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/11/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c * d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol deleted file mode 100644 index c226dcfd..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/12/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol deleted file mode 100644 index c6022ee9..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/13/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol deleted file mode 100644 index 9e5f617a..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/14/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a - b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol deleted file mode 100644 index 86125329..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/15/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a * b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol deleted file mode 100644 index e85ef12c..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/16/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a / b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol deleted file mode 100644 index b32909ed..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/17/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a % b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol deleted file mode 100644 index 13319cbe..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/18/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a + decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol deleted file mode 100644 index 3279b41e..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/19/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol deleted file mode 100644 index 86125329..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a * b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol deleted file mode 100644 index 95cc94e7..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/20/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol deleted file mode 100644 index cc3476f1..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/21/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a / decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol deleted file mode 100644 index 4979f42e..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/22/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a % decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol deleted file mode 100644 index 7a0c07d0..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/23/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c - d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol deleted file mode 100644 index d73584b8..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/24/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c * d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol deleted file mode 100644 index c226dcfd..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/25/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol deleted file mode 100644 index c6022ee9..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/26/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol deleted file mode 100644 index e85ef12c..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a / b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol deleted file mode 100644 index b32909ed..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a % b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol deleted file mode 100644 index 13319cbe..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a + decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol deleted file mode 100644 index 3279b41e..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol deleted file mode 100644 index 95cc94e7..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol deleted file mode 100644 index cc3476f1..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a / decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol deleted file mode 100644 index 4979f42e..00000000 --- a/resources/regressions/test_multiple_contracts_4.json/mutants/9/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a % decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/gambit_results.json b/resources/regressions/test_multiple_files_1.json/gambit_results.json index d7eefb89..eb293859 100644 --- a/resources/regressions/test_multiple_files_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_files_1.json/gambit_results.json @@ -8,7 +8,7 @@ "name": "mutants/1/Ops/AOR/AOR.sol", "op": "STD", "orig": "return a + b", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "assert(true)" }, { @@ -20,7 +20,7 @@ "name": "mutants/2/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "-" }, { @@ -32,7 +32,7 @@ "name": "mutants/3/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "*" }, { @@ -44,7 +44,7 @@ "name": "mutants/4/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "/" }, { @@ -56,7 +56,7 @@ "name": "mutants/5/Ops/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "%" }, { @@ -68,7 +68,7 @@ "name": "mutants/6/Ops/AOR/AOR.sol", "op": "STD", "orig": "return a - b", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "assert(true)" }, { @@ -80,7 +80,7 @@ "name": "mutants/7/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "+" }, { @@ -92,7 +92,7 @@ "name": "mutants/8/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "*" }, { @@ -104,7 +104,7 @@ "name": "mutants/9/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "/" }, { @@ -116,7 +116,7 @@ "name": "mutants/10/Ops/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "%" }, { @@ -128,7 +128,7 @@ "name": "mutants/11/Ops/AOR/AOR.sol", "op": "STD", "orig": "return ((a)) * b", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "assert(true)" }, { @@ -140,7 +140,7 @@ "name": "mutants/12/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "+" }, { @@ -152,7 +152,7 @@ "name": "mutants/13/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "-" }, { @@ -164,7 +164,7 @@ "name": "mutants/14/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "/" }, { @@ -176,7 +176,7 @@ "name": "mutants/15/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "%" }, { @@ -188,7 +188,7 @@ "name": "mutants/16/Ops/AOR/AOR.sol", "op": "STD", "orig": "return ((a)) * b", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "assert(true)" }, { @@ -200,7 +200,7 @@ "name": "mutants/17/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "+" }, { @@ -212,7 +212,7 @@ "name": "mutants/18/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "-" }, { @@ -224,7 +224,7 @@ "name": "mutants/19/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "/" }, { @@ -236,7 +236,7 @@ "name": "mutants/20/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "**" }, { @@ -248,7 +248,7 @@ "name": "mutants/21/Ops/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "%" }, { @@ -260,7 +260,7 @@ "name": "mutants/22/Ops/AOR/AOR.sol", "op": "STD", "orig": "return a ** b", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "assert(true)" }, { @@ -272,7 +272,7 @@ "name": "mutants/23/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "+" }, { @@ -284,7 +284,7 @@ "name": "mutants/24/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "-" }, { @@ -296,7 +296,7 @@ "name": "mutants/25/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "*" }, { @@ -308,7 +308,7 @@ "name": "mutants/26/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "Ops/AOR/AOR.sol", "repl": "/" }, { @@ -320,367 +320,7 @@ "name": "mutants/27/Ops/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", - "repl": "%" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "28", - "line": 7, - "name": "mutants/28/MultipleContracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "29", - "line": 7, - "name": "mutants/29/MultipleContracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", - "id": "30", - "line": 7, - "name": "mutants/30/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", - "id": "31", - "line": 11, - "name": "mutants/31/MultipleContracts/C.sol", - "op": "STD", - "orig": "return a + b", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", - "id": "32", - "line": 11, - "name": "mutants/32/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", - "id": "33", - "line": 11, - "name": "mutants/33/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", - "id": "34", - "line": 11, - "name": "mutants/34/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", - "id": "35", - "line": 11, - "name": "mutants/35/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "36", - "line": 17, - "name": "mutants/36/MultipleContracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 44, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", - "id": "37", - "line": 17, - "name": "mutants/37/MultipleContracts/C.sol", - "op": "LVR", - "orig": "1", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "2" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", - "id": "38", - "line": 18, - "name": "mutants/38/MultipleContracts/C.sol", - "op": "STD", - "orig": "a[0] = msg.sender", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 11, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", - "id": "39", - "line": 18, - "name": "mutants/39/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", - "id": "40", - "line": 19, - "name": "mutants/40/MultipleContracts/C.sol", - "op": "STD", - "orig": "return a", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "41", - "line": 23, - "name": "mutants/41/MultipleContracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "0" - }, - { - "col": 21, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", - "id": "42", - "line": 23, - "name": "mutants/42/MultipleContracts/C.sol", - "op": "LVR", - "orig": "10", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "11" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", - "id": "43", - "line": 24, - "name": "mutants/43/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "+" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", - "id": "44", - "line": 24, - "name": "mutants/44/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", - "id": "45", - "line": 24, - "name": "mutants/45/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", - "id": "46", - "line": 24, - "name": "mutants/46/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 25, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", - "id": "47", - "line": 24, - "name": "mutants/47/MultipleContracts/C.sol", - "op": "AOR", - "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "%" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", - "id": "48", - "line": 25, - "name": "mutants/48/MultipleContracts/C.sol", - "op": "STD", - "orig": "return res", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", - "id": "49", - "line": 29, - "name": "mutants/49/MultipleContracts/C.sol", - "op": "STD", - "orig": "assert(c[0] == e)", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 16, - "description": "RelationalOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", - "id": "50", - "line": 29, - "name": "mutants/50/MultipleContracts/C.sol", - "op": "ROR", - "orig": "c[0] == e", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "false" - }, - { - "col": 18, - "description": "LiteralValueReplacement", - "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", - "id": "51", - "line": 29, - "name": "mutants/51/MultipleContracts/C.sol", - "op": "LVR", - "orig": "0", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "1" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", - "id": "52", - "line": 34, - "name": "mutants/52/MultipleContracts/C.sol", - "op": "STD", - "orig": "Utils.getarray(b, address(this))", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 9, - "description": "StatementDeletion", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", - "id": "53", - "line": 38, - "name": "mutants/53/MultipleContracts/C.sol", - "op": "STD", - "orig": "return c + d", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "assert(true)" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", - "id": "54", - "line": 38, - "name": "mutants/54/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "-" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", - "id": "55", - "line": 38, - "name": "mutants/55/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "*" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", - "id": "56", - "line": 38, - "name": "mutants/56/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", - "repl": "/" - }, - { - "col": 18, - "description": "ArithmeticOperatorReplacement", - "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", - "id": "57", - "line": 38, - "name": "mutants/57/MultipleContracts/C.sol", - "op": "AOR", - "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol", + "original": "Ops/AOR/AOR.sol", "repl": "%" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_files_1.json/mutants.log b/resources/regressions/test_multiple_files_1.json/mutants.log index b493b657..507ee3cb 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants.log +++ b/resources/regressions/test_multiple_files_1.json/mutants.log @@ -1,57 +1,27 @@ -1,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:9,return a + b,assert(true) -2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,- -3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,* -4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,/ -5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,% -6,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:9,return a - b,assert(true) -7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,+ -8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,* -9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,/ -10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,% -11,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:9,return ((a)) * b,assert(true) -12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,+ -13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,- -14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,/ -15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,% -16,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:9,return ((a)) * b,assert(true) -17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,+ -18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,- -19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,/ -20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,** -21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,% -22,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:9,return a ** b,assert(true) -23,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,+ -24,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,- -25,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,* -26,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,/ -27,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,% -28,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) -29,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:16,c[0] == e,false -30,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,7:18,0,1 -31,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:9,return a + b,assert(true) -32,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,- -33,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,* -34,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,/ -35,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,11:18,+,% -36,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,0 -37,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,17:44,1,2 -38,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) -39,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,18:11,0,1 -40,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,19:9,return a,assert(true) -41,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,0 -42,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,23:21,10,11 -43,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,+ -44,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,- -45,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,* -46,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,/ -47,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,24:25,**,% -48,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,25:9,return res,assert(true) -49,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -50,ROR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:16,c[0] == e,false -51,LVR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,29:18,0,1 -52,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -53,STD,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:9,return c + d,assert(true) -54,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,- -55,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,* -56,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,/ -57,AOR,/Users/benku/Gambit/benchmarks/MultipleContracts/C.sol,38:18,+,% +1,STD,Ops/AOR/AOR.sol,13:9,return a + b,assert(true) +2,AOR,Ops/AOR/AOR.sol,13:18,+,- +3,AOR,Ops/AOR/AOR.sol,13:18,+,* +4,AOR,Ops/AOR/AOR.sol,13:18,+,/ +5,AOR,Ops/AOR/AOR.sol,13:18,+,% +6,STD,Ops/AOR/AOR.sol,22:9,return a - b,assert(true) +7,AOR,Ops/AOR/AOR.sol,22:18,-,+ +8,AOR,Ops/AOR/AOR.sol,22:18,-,* +9,AOR,Ops/AOR/AOR.sol,22:18,-,/ +10,AOR,Ops/AOR/AOR.sol,22:18,-,% +11,STD,Ops/AOR/AOR.sol,34:9,return ((a)) * b,assert(true) +12,AOR,Ops/AOR/AOR.sol,34:22,*,+ +13,AOR,Ops/AOR/AOR.sol,34:22,*,- +14,AOR,Ops/AOR/AOR.sol,34:22,*,/ +15,AOR,Ops/AOR/AOR.sol,34:22,*,% +16,STD,Ops/AOR/AOR.sol,47:9,return ((a)) * b,assert(true) +17,AOR,Ops/AOR/AOR.sol,47:22,*,+ +18,AOR,Ops/AOR/AOR.sol,47:22,*,- +19,AOR,Ops/AOR/AOR.sol,47:22,*,/ +20,AOR,Ops/AOR/AOR.sol,47:22,*,** +21,AOR,Ops/AOR/AOR.sol,47:22,*,% +22,STD,Ops/AOR/AOR.sol,58:9,return a ** b,assert(true) +23,AOR,Ops/AOR/AOR.sol,58:18,**,+ +24,AOR,Ops/AOR/AOR.sol,58:18,**,- +25,AOR,Ops/AOR/AOR.sol,58:18,**,* +26,AOR,Ops/AOR/AOR.sol,58:18,**,/ +27,AOR,Ops/AOR/AOR.sol,58:18,**,% diff --git a/resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol deleted file mode 100644 index 5f69007a..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(true); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol deleted file mode 100644 index ecdc98c4..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(false); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol deleted file mode 100644 index e9466e07..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) internal pure { - assert(c[1] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol deleted file mode 100644 index f7a48737..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/31/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - assert(true); - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol deleted file mode 100644 index 9e5f617a..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/32/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a - b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol deleted file mode 100644 index 86125329..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/33/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a * b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol deleted file mode 100644 index e85ef12c..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/34/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a / b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol deleted file mode 100644 index b32909ed..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/35/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` - function add(int8 a, int8 b) public pure returns (int8) { - return a % b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol deleted file mode 100644 index f9a5de25..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/36/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](0); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol deleted file mode 100644 index 16f8bc88..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/37/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` - function foo() external view returns (address[] memory) { - address[] memory a = new address[](2); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol deleted file mode 100644 index 427647a6..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/38/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - assert(true); - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol deleted file mode 100644 index 9db93f13..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/39/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` - address[] memory a = new address[](1); - a[1] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol deleted file mode 100644 index a9342ea1..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/40/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` - a[0] = msg.sender; - assert(true); - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol deleted file mode 100644 index f2136ed3..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/41/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 0; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol deleted file mode 100644 index f69e3360..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/42/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 11; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol deleted file mode 100644 index 13319cbe..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/43/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a + decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol deleted file mode 100644 index 3279b41e..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/44/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a - decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol deleted file mode 100644 index 95cc94e7..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/45/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a * decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol deleted file mode 100644 index cc3476f1..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/46/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a / decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol deleted file mode 100644 index 4979f42e..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/47/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` - uint256 a = 10; - uint256 res = a % decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol deleted file mode 100644 index 5933d066..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/48/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` - uint256 res = a ** decimals; - assert(true); - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol deleted file mode 100644 index a4c6c970..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/49/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(true); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol deleted file mode 100644 index 781e87b1..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/50/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(false); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol deleted file mode 100644 index 7749a0cb..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/51/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` - function getarray(address[] memory c, address e) public pure { - assert(c[1] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol deleted file mode 100644 index a14e05da..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/52/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` - address[] memory b = this.foo(); - assert(true); - } - - function add(int8 c, int8 d) public pure returns (int8) { - return c + d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol deleted file mode 100644 index 4887a934..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/53/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - assert(true); - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol deleted file mode 100644 index 7a0c07d0..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/54/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c - d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol deleted file mode 100644 index d73584b8..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/55/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c * d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol deleted file mode 100644 index c226dcfd..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/56/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c / d; - } -} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol deleted file mode 100644 index c6022ee9..00000000 --- a/resources/regressions/test_multiple_files_1.json/mutants/57/MultipleContracts/C.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.13; - -library Utils { - function getarray(address[] memory c, address e) internal pure { - assert(c[0] == e); - } - - function add(int8 a, int8 b) public pure returns (int8) { - return a + b; - } -} - -contract C { - function foo() external view returns (address[] memory) { - address[] memory a = new address[](1); - a[0] = msg.sender; - return a; - } - - function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { - uint256 a = 10; - uint256 res = a ** decimals; - return res; - } - - function getarray(address[] memory c, address e) public pure { - assert(c[0] == e); - } - - function callmyself() external view { - address[] memory b = this.foo(); - Utils.getarray(b, address(this)); - } - - /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` - function add(int8 c, int8 d) public pure returns (int8) { - return c % d; - } -} diff --git a/resources/regressions/test_no_export.json/gambit_results.json b/resources/regressions/test_no_export.json/gambit_results.json index a4acd5d6..39070740 100644 --- a/resources/regressions/test_no_export.json/gambit_results.json +++ b/resources/regressions/test_no_export.json/gambit_results.json @@ -8,7 +8,7 @@ "name": "mutants/1/AOR/AOR.sol", "op": "STD", "orig": "return a + b", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "assert(true)" }, { @@ -20,7 +20,7 @@ "name": "mutants/2/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -32,7 +32,7 @@ "name": "mutants/3/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "*" }, { @@ -44,7 +44,7 @@ "name": "mutants/4/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -56,7 +56,7 @@ "name": "mutants/5/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -68,7 +68,7 @@ "name": "mutants/6/AOR/AOR.sol", "op": "STD", "orig": "return a - b", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "assert(true)" }, { @@ -80,7 +80,7 @@ "name": "mutants/7/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" }, { @@ -92,7 +92,7 @@ "name": "mutants/8/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "*" }, { @@ -104,7 +104,7 @@ "name": "mutants/9/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -116,7 +116,7 @@ "name": "mutants/10/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -128,7 +128,7 @@ "name": "mutants/11/AOR/AOR.sol", "op": "STD", "orig": "return ((a)) * b", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "assert(true)" }, { @@ -140,7 +140,7 @@ "name": "mutants/12/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" }, { @@ -152,7 +152,7 @@ "name": "mutants/13/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -164,7 +164,7 @@ "name": "mutants/14/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -176,7 +176,7 @@ "name": "mutants/15/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -188,7 +188,7 @@ "name": "mutants/16/AOR/AOR.sol", "op": "STD", "orig": "return ((a)) * b", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "assert(true)" }, { @@ -200,7 +200,7 @@ "name": "mutants/17/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" }, { @@ -212,7 +212,7 @@ "name": "mutants/18/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -224,7 +224,7 @@ "name": "mutants/19/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -236,7 +236,7 @@ "name": "mutants/20/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "**" }, { @@ -248,7 +248,7 @@ "name": "mutants/21/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -260,7 +260,7 @@ "name": "mutants/22/AOR/AOR.sol", "op": "STD", "orig": "return a ** b", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "assert(true)" }, { @@ -272,7 +272,7 @@ "name": "mutants/23/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" }, { @@ -284,7 +284,7 @@ "name": "mutants/24/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -296,7 +296,7 @@ "name": "mutants/25/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "*" }, { @@ -308,7 +308,7 @@ "name": "mutants/26/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -320,7 +320,7 @@ "name": "mutants/27/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -332,7 +332,7 @@ "name": "mutants/28/BOR/BOR.sol", "op": "STD", "orig": "return a ^ b", - "original": "/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol", + "original": "BOR/BOR.sol", "repl": "assert(true)" } ] \ No newline at end of file diff --git a/resources/regressions/test_no_export.json/mutants.log b/resources/regressions/test_no_export.json/mutants.log index 264b99a8..8be8ffe3 100644 --- a/resources/regressions/test_no_export.json/mutants.log +++ b/resources/regressions/test_no_export.json/mutants.log @@ -1,28 +1,28 @@ -1,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:9,return a + b,assert(true) -2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,- -3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,* -4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,/ -5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,% -6,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:9,return a - b,assert(true) -7,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,+ -8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,* -9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,/ -10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,% -11,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:9,return ((a)) * b,assert(true) -12,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,+ -13,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,- -14,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,/ -15,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,% -16,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:9,return ((a)) * b,assert(true) -17,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,+ -18,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,- -19,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,/ -20,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,** -21,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,% -22,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:9,return a ** b,assert(true) -23,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,+ -24,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,- -25,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,* -26,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,/ -27,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,% -28,STD,/Users/benku/Gambit/benchmarks/Ops/BOR/BOR.sol,22:9,return a ^ b,assert(true) +1,STD,AOR/AOR.sol,13:9,return a + b,assert(true) +2,AOR,AOR/AOR.sol,13:18,+,- +3,AOR,AOR/AOR.sol,13:18,+,* +4,AOR,AOR/AOR.sol,13:18,+,/ +5,AOR,AOR/AOR.sol,13:18,+,% +6,STD,AOR/AOR.sol,22:9,return a - b,assert(true) +7,AOR,AOR/AOR.sol,22:18,-,+ +8,AOR,AOR/AOR.sol,22:18,-,* +9,AOR,AOR/AOR.sol,22:18,-,/ +10,AOR,AOR/AOR.sol,22:18,-,% +11,STD,AOR/AOR.sol,34:9,return ((a)) * b,assert(true) +12,AOR,AOR/AOR.sol,34:22,*,+ +13,AOR,AOR/AOR.sol,34:22,*,- +14,AOR,AOR/AOR.sol,34:22,*,/ +15,AOR,AOR/AOR.sol,34:22,*,% +16,STD,AOR/AOR.sol,47:9,return ((a)) * b,assert(true) +17,AOR,AOR/AOR.sol,47:22,*,+ +18,AOR,AOR/AOR.sol,47:22,*,- +19,AOR,AOR/AOR.sol,47:22,*,/ +20,AOR,AOR/AOR.sol,47:22,*,** +21,AOR,AOR/AOR.sol,47:22,*,% +22,STD,AOR/AOR.sol,58:9,return a ** b,assert(true) +23,AOR,AOR/AOR.sol,58:18,**,+ +24,AOR,AOR/AOR.sol,58:18,**,- +25,AOR,AOR/AOR.sol,58:18,**,* +26,AOR,AOR/AOR.sol,58:18,**,/ +27,AOR,AOR/AOR.sol,58:18,**,% +28,STD,BOR/BOR.sol,22:9,return a ^ b,assert(true) diff --git a/resources/regressions/test_num_mutants.json/gambit_results.json b/resources/regressions/test_num_mutants.json/gambit_results.json index 5d00522d..5430fcaf 100644 --- a/resources/regressions/test_num_mutants.json/gambit_results.json +++ b/resources/regressions/test_num_mutants.json/gambit_results.json @@ -8,7 +8,7 @@ "name": "mutants/1/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -20,7 +20,7 @@ "name": "mutants/2/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -32,7 +32,7 @@ "name": "mutants/3/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "/" }, { @@ -44,7 +44,7 @@ "name": "mutants/4/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "**" }, { @@ -56,7 +56,7 @@ "name": "mutants/5/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "*" } ] \ No newline at end of file diff --git a/resources/regressions/test_num_mutants.json/mutants.log b/resources/regressions/test_num_mutants.json/mutants.log index afdab016..b037ce9b 100644 --- a/resources/regressions/test_num_mutants.json/mutants.log +++ b/resources/regressions/test_num_mutants.json/mutants.log @@ -1,5 +1,5 @@ -1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,- -2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,- -3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,/ -4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,** -5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,* +1,AOR,AOR/AOR.sol,13:18,+,- +2,AOR,AOR/AOR.sol,34:22,*,- +3,AOR,AOR/AOR.sol,47:22,*,/ +4,AOR,AOR/AOR.sol,47:22,*,** +5,AOR,AOR/AOR.sol,58:18,**,* diff --git a/resources/regressions/test_seed.json/gambit_results.json b/resources/regressions/test_seed.json/gambit_results.json index edec1668..1eddf63c 100644 --- a/resources/regressions/test_seed.json/gambit_results.json +++ b/resources/regressions/test_seed.json/gambit_results.json @@ -8,7 +8,7 @@ "name": "mutants/1/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "*" }, { @@ -20,7 +20,7 @@ "name": "mutants/2/AOR/AOR.sol", "op": "AOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" }, { @@ -32,7 +32,7 @@ "name": "mutants/3/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -44,7 +44,7 @@ "name": "mutants/4/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" }, { @@ -56,7 +56,7 @@ "name": "mutants/5/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -68,7 +68,7 @@ "name": "mutants/6/AOR/AOR.sol", "op": "AOR", "orig": "+", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -80,7 +80,7 @@ "name": "mutants/7/AOR/AOR.sol", "op": "STD", "orig": "return a - b", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "assert(true)" }, { @@ -92,7 +92,7 @@ "name": "mutants/8/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "%" }, { @@ -104,7 +104,7 @@ "name": "mutants/9/AOR/AOR.sol", "op": "AOR", "orig": "*", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "-" }, { @@ -116,7 +116,7 @@ "name": "mutants/10/AOR/AOR.sol", "op": "AOR", "orig": "**", - "original": "/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol", + "original": "AOR/AOR.sol", "repl": "+" } ] \ No newline at end of file diff --git a/resources/regressions/test_seed.json/mutants.log b/resources/regressions/test_seed.json/mutants.log index a4cd224f..64e2b5f0 100644 --- a/resources/regressions/test_seed.json/mutants.log +++ b/resources/regressions/test_seed.json/mutants.log @@ -1,10 +1,10 @@ -1,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,* -2,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:18,-,+ -3,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,- -4,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,+ -5,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,% -6,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,13:18,+,% -7,STD,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,22:9,return a - b,assert(true) -8,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,34:22,*,% -9,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,47:22,*,- -10,AOR,/Users/benku/Gambit/benchmarks/Ops/AOR/AOR.sol,58:18,**,+ +1,AOR,AOR/AOR.sol,13:18,+,* +2,AOR,AOR/AOR.sol,22:18,-,+ +3,AOR,AOR/AOR.sol,34:22,*,- +4,AOR,AOR/AOR.sol,47:22,*,+ +5,AOR,AOR/AOR.sol,47:22,*,% +6,AOR,AOR/AOR.sol,13:18,+,% +7,STD,AOR/AOR.sol,22:9,return a - b,assert(true) +8,AOR,AOR/AOR.sol,34:22,*,% +9,AOR,AOR/AOR.sol,47:22,*,- +10,AOR,AOR/AOR.sol,58:18,**,+ diff --git a/resources/regressions/uor.json/gambit_results.json b/resources/regressions/uor.json/gambit_results.json index 3c8a447c..d26c4efb 100644 --- a/resources/regressions/uor.json/gambit_results.json +++ b/resources/regressions/uor.json/gambit_results.json @@ -8,7 +8,7 @@ "name": "mutants/1/Ops/UOR/UOR.sol", "op": "UOR", "orig": "~", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "original": "Ops/UOR/UOR.sol", "repl": "-" }, { @@ -20,7 +20,7 @@ "name": "mutants/2/Ops/UOR/UOR.sol", "op": "UOR", "orig": "-", - "original": "/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol", + "original": "Ops/UOR/UOR.sol", "repl": "~" } ] \ No newline at end of file diff --git a/resources/regressions/uor.json/mutants.log b/resources/regressions/uor.json/mutants.log index 7cb9ea71..cf5a132d 100644 --- a/resources/regressions/uor.json/mutants.log +++ b/resources/regressions/uor.json/mutants.log @@ -1,2 +1,2 @@ -1,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,14:16,~,- -2,UOR,/Users/benku/Gambit/benchmarks/Ops/UOR/UOR.sol,19:16,-,~ +1,UOR,Ops/UOR/UOR.sol,14:16,~,- +2,UOR,Ops/UOR/UOR.sol,19:16,-,~ From 1d58b41d774c1d87887ac898a3981005726f7753 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 19:47:42 -0700 Subject: [PATCH 170/200] Fixed invalid.log output path (not absolute anymore) --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index bccb6139..b6568ffc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -183,7 +183,7 @@ pub fn run_mutate( w.write_record([ mid.to_string().as_str(), mutant.op.short_name().as_str(), - mutant.path().to_str().unwrap(), + mutant.sol_path().to_str().unwrap(), line_col.as_str(), mutant.orig.as_str(), mutant.repl.as_str(), From 33e294501dd91c6fcdb5b63e5f47887b2e4aa8aa Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 19:50:02 -0700 Subject: [PATCH 171/200] Added solc version --- scripts/make_regressions.sh | 13 +++++++++++++ scripts/run_regressions.sh | 17 +++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/scripts/make_regressions.sh b/scripts/make_regressions.sh index 6245f5e3..9410cda5 100644 --- a/scripts/make_regressions.sh +++ b/scripts/make_regressions.sh @@ -27,6 +27,11 @@ GAMBIT_EXECUTABLE="$GAMBIT/target/release/gambit" CONFIGS="$GAMBIT/benchmarks/config-jsons" REGRESSIONS="$GAMBIT"/resources/regressions TMP_REGRESSIONS="$GAMBIT"/resources/tmp_regressions +EXPECTED_SOLC_VERSION_NUM="8.13" + +if [ -z ${SOLC+x} ]; then + SOLC="solc$EXPECTED_SOLC_VERSION_NUM" +fi NUM_CONFIGS=$(ls "$CONFIGS" | wc -l | xargs) @@ -63,6 +68,13 @@ double_check_make_regressions() { done } +check_solc_version() { + if ! $SOLC --version | grep "0.""$EXPECTED_SOLC_VERSION_NUM" >/dev/null; then + echo "Expected solc version 0.$EXPECTED_SOLC_VERSION_NUM" + exit 1 + fi +} + build_release() { old_dir=$(pwd) cd "$GAMBIT" || exit 1 @@ -153,6 +165,7 @@ summary() { double_check_make_regressions print_vars +check_solc_version build_release clean_state setup diff --git a/scripts/run_regressions.sh b/scripts/run_regressions.sh index 381ff9c2..8655dac8 100644 --- a/scripts/run_regressions.sh +++ b/scripts/run_regressions.sh @@ -28,6 +28,11 @@ GAMBIT_EXECUTABLE="$GAMBIT/target/release/gambit" CONFIGS="$GAMBIT/benchmarks/config-jsons" REGRESSIONS="$GAMBIT"/resources/regressions TMP_REGRESSIONS="$GAMBIT"/resources/tmp_regressions +EXPECTED_SOLC_VERSION_NUM="8.13" + +if [ -z ${SOLC+x} ]; then + SOLC="solc$EXPECTED_SOLC_VERSION_NUM" +fi NUM_CONFIGS=$(ls "$CONFIGS" | wc -l | xargs) @@ -50,6 +55,13 @@ build_release() { cd "$old_dir" || exit 1 } +check_solc_version() { + if ! $SOLC --version | grep "0.""$EXPECTED_SOLC_VERSION_NUM" >/dev/null; then + echo "Expected solc version 0.$EXPECTED_SOLC_VERSION_NUM" + exit 1 + fi +} + run_regressions() { echo "Running regression tests on $NUM_CONFIGS configurations" @@ -74,8 +86,8 @@ run_regressions() { rel_conf_path=$(python3 -c "import os.path; print( os.path.relpath('$conf_path', '$(pwd)'))") rel_regression_dir=$(python3 -c "import os.path; print( os.path.relpath('$regression_dir', '$(pwd)'))") - printf " %s \033[1mRunning:\033[0m %s\n" "$green_check" "$GAMBIT_EXECUTABLE mutate --json $rel_conf_path" - stdout="$("$GAMBIT_EXECUTABLE" mutate --json "$conf_path")" + printf " %s \033[1mRunning:\033[0m %s\n" "$green_check" "$GAMBIT_EXECUTABLE mutate --json $rel_conf_path --solc $SOLC" + stdout="$("$GAMBIT_EXECUTABLE" mutate --json "$conf_path" --solc "$SOLC")" printf " %s \033[1mGambit Output:\033[0m '\033[3m%s\033[0m'\n" "$green_check" "$stdout" if diff -q -r gambit_out "$regression_dir" 1>/dev/null; then printf " %s \033[1mDiffed:\033[0m gambit_out and %s\n" "$green_check" "$rel_regression_dir" @@ -119,6 +131,7 @@ summary() { } print_vars +check_solc_version build_release run_regressions summary From 3e4732cbcccd3093bb676892cddbe4ef28f0ed0d Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Mon, 11 Sep 2023 19:55:52 -0700 Subject: [PATCH 172/200] Unshot my self in the foot --- scripts/make_regressions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/make_regressions.sh b/scripts/make_regressions.sh index 9410cda5..a79e4b74 100644 --- a/scripts/make_regressions.sh +++ b/scripts/make_regressions.sh @@ -114,8 +114,8 @@ make_regressions() { echo "Error: couldn't cd $GAMBIT" exit 1 } - printf " %s \033[1mRunning:\033[0m %s\n" "$green_check" "gambit mutate --json $conf_path" - stdout="$("$GAMBIT_EXECUTABLE" mutate --json "$conf_path")" + printf " %s \033[1mRunning:\033[0m %s\n" "$green_check" "gambit mutate --json $conf_path --solc $SOLC" + stdout="$("$GAMBIT_EXECUTABLE" mutate --json "$conf_path" --solc "$SOLC")" printf " %s \033[1mGambit Output:\033[0m '\033[3m%s\033[0m'\n" "$green_check" "$stdout" exit_code=$? if [ $exit_code -ne 0 ]; then From 6554d3a073a0450a98f19630d25f4483a70b408b Mon Sep 17 00:00:00 2001 From: Chandrakana Nandi Date: Mon, 11 Sep 2023 19:57:36 -0700 Subject: [PATCH 173/200] update the regressions again --- .../all_ops.json/gambit_results.json | 212 +++++----- .../regressions/all_ops.json/mutants.log | 101 ++--- .../all_ops.json/mutants/26/EDC/EDC.sol | 22 ++ .../all_ops.json/mutants/27/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/28/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/29/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/30/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/31/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/32/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/33/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/34/LOR/LOR.sol | 4 +- .../all_ops.json/mutants/35/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/36/LOR/LOR.sol | 4 +- .../mutants/{26 => 37}/LOR/LOR.sol | 6 +- .../all_ops.json/mutants/38/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/39/LVR/LVR.sol | 4 +- .../all_ops.json/mutants/40/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/41/LVR/LVR.sol | 4 +- .../all_ops.json/mutants/42/LVR/LVR.sol | 4 +- .../all_ops.json/mutants/43/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/44/LVR/LVR.sol | 4 +- .../all_ops.json/mutants/45/LVR/LVR.sol | 4 +- .../all_ops.json/mutants/46/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/47/LVR/LVR.sol | 4 +- .../mutants/{37 => 48}/LVR/LVR.sol | 6 +- .../all_ops.json/mutants/49/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/50/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/51/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/52/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/53/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/54/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/55/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/56/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/57/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/58/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/59/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/60/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/61/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/62/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/63/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/64/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/65/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/66/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/67/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/68/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/69/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/70/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/71/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/72/ROR/ROR.sol | 4 +- .../all_ops.json/mutants/73/ROR/ROR.sol | 4 +- .../mutants/{48 => 74}/ROR/ROR.sol | 6 +- .../all_ops.json/mutants/75/UOR/UOR.sol | 6 +- .../mutants/76}/UOR/UOR.sol | 6 +- .../regressions/edc.json/gambit_results.json | 15 +- resources/regressions/edc.json/mutants.log | 1 + .../edc.json/mutants/1/Ops/EDC/EDC.sol | 22 ++ .../no_import_path.json/gambit_results.json | 363 +++++++++++++++++- .../no_import_path.json/mutants.log | 30 ++ .../mutants/1/contracts/C.sol | 43 +++ .../mutants/10/contracts/C.sol | 43 +++ .../mutants/11/contracts/C.sol | 43 +++ .../mutants/12/contracts/C.sol | 43 +++ .../mutants/13/contracts/C.sol | 43 +++ .../mutants/14/contracts/C.sol | 43 +++ .../mutants/15/contracts/C.sol | 43 +++ .../mutants/16/contracts/C.sol | 43 +++ .../mutants/17/contracts/C.sol | 43 +++ .../mutants/18/contracts/C.sol | 43 +++ .../mutants/19/contracts/C.sol | 43 +++ .../mutants/2/contracts/C.sol | 43 +++ .../mutants/20/contracts/C.sol | 43 +++ .../mutants/21/contracts/C.sol | 43 +++ .../mutants/22/contracts/C.sol | 43 +++ .../mutants/23/contracts/C.sol | 43 +++ .../mutants/24/contracts/C.sol | 43 +++ .../mutants/25/contracts/C.sol | 43 +++ .../mutants/26/contracts/C.sol | 43 +++ .../mutants/27/contracts/C.sol | 43 +++ .../mutants/28/contracts/C.sol | 43 +++ .../mutants/29/contracts/C.sol | 43 +++ .../mutants/3/contracts/C.sol | 43 +++ .../mutants/30/contracts/C.sol | 43 +++ .../mutants/4/contracts/C.sol | 43 +++ .../mutants/5/contracts/C.sol | 43 +++ .../mutants/6/contracts/C.sol | 43 +++ .../mutants/7/contracts/C.sol | 43 +++ .../mutants/8/contracts/C.sol | 43 +++ .../mutants/9/contracts/C.sol | 43 +++ .../test_log_invalid.json/gambit_results.json | 212 +++++----- .../test_log_invalid.json/invalid.log | 2 +- .../test_log_invalid.json/mutants.log | 101 ++--- .../mutants/26/EDC/EDC.sol | 22 ++ .../mutants/27/LOR/LOR.sol | 4 +- .../mutants/28/LOR/LOR.sol | 4 +- .../mutants/29/LOR/LOR.sol | 6 +- .../mutants/30/LOR/LOR.sol | 4 +- .../mutants/31/LOR/LOR.sol | 4 +- .../mutants/32/LOR/LOR.sol | 6 +- .../mutants/33/LOR/LOR.sol | 4 +- .../mutants/34/LOR/LOR.sol | 4 +- .../mutants/35/LOR/LOR.sol | 6 +- .../mutants/36/LOR/LOR.sol | 4 +- .../mutants/{26 => 37}/LOR/LOR.sol | 6 +- .../mutants/38/LVR/LVR.sol | 6 +- .../mutants/39/LVR/LVR.sol | 4 +- .../mutants/40/LVR/LVR.sol | 6 +- .../mutants/41/LVR/LVR.sol | 4 +- .../mutants/42/LVR/LVR.sol | 4 +- .../mutants/43/LVR/LVR.sol | 6 +- .../mutants/44/LVR/LVR.sol | 4 +- .../mutants/45/LVR/LVR.sol | 4 +- .../mutants/46/LVR/LVR.sol | 6 +- .../mutants/47/LVR/LVR.sol | 4 +- .../mutants/{37 => 48}/LVR/LVR.sol | 6 +- .../mutants/49/ROR/ROR.sol | 4 +- .../mutants/50/ROR/ROR.sol | 4 +- .../mutants/51/ROR/ROR.sol | 6 +- .../mutants/52/ROR/ROR.sol | 4 +- .../mutants/53/ROR/ROR.sol | 4 +- .../mutants/54/ROR/ROR.sol | 6 +- .../mutants/55/ROR/ROR.sol | 4 +- .../mutants/56/ROR/ROR.sol | 4 +- .../mutants/57/ROR/ROR.sol | 6 +- .../mutants/58/ROR/ROR.sol | 4 +- .../mutants/59/ROR/ROR.sol | 4 +- .../mutants/60/ROR/ROR.sol | 6 +- .../mutants/61/ROR/ROR.sol | 4 +- .../mutants/62/ROR/ROR.sol | 4 +- .../mutants/63/ROR/ROR.sol | 6 +- .../mutants/64/ROR/ROR.sol | 6 +- .../mutants/65/ROR/ROR.sol | 4 +- .../mutants/66/ROR/ROR.sol | 4 +- .../mutants/67/ROR/ROR.sol | 6 +- .../mutants/68/ROR/ROR.sol | 6 +- .../mutants/69/ROR/ROR.sol | 4 +- .../mutants/70/ROR/ROR.sol | 4 +- .../mutants/71/ROR/ROR.sol | 6 +- .../mutants/72/ROR/ROR.sol | 4 +- .../mutants/73/ROR/ROR.sol | 4 +- .../mutants/{48 => 74}/ROR/ROR.sol | 6 +- .../mutants/75/UOR/UOR.sol | 6 +- .../mutants/76}/UOR/UOR.sol | 6 +- .../gambit_results.json | 171 ++++++++- .../mutants.log | 14 + .../mutants/1/MultipleContracts/C.sol | 41 ++ .../mutants/10/MultipleContracts/C.sol | 41 ++ .../mutants/11/MultipleContracts/C.sol | 41 ++ .../mutants/12/MultipleContracts/C.sol | 41 ++ .../mutants/13/MultipleContracts/C.sol | 41 ++ .../mutants/14/MultipleContracts/C.sol | 41 ++ .../mutants/2/MultipleContracts/C.sol | 41 ++ .../mutants/3/MultipleContracts/C.sol | 41 ++ .../mutants/4/MultipleContracts/C.sol | 41 ++ .../mutants/5/MultipleContracts/C.sol | 41 ++ .../mutants/6/MultipleContracts/C.sol | 41 ++ .../mutants/7/MultipleContracts/C.sol | 41 ++ .../mutants/8/MultipleContracts/C.sol | 41 ++ .../mutants/9/MultipleContracts/C.sol | 41 ++ .../gambit_results.json | 159 +++++++- .../mutants.log | 13 + .../mutants/1/MultipleContracts/C.sol | 41 ++ .../mutants/10/MultipleContracts/C.sol | 41 ++ .../mutants/11/MultipleContracts/C.sol | 41 ++ .../mutants/12/MultipleContracts/C.sol | 41 ++ .../mutants/13/MultipleContracts/C.sol | 41 ++ .../mutants/2/MultipleContracts/C.sol | 41 ++ .../mutants/3/MultipleContracts/C.sol | 41 ++ .../mutants/4/MultipleContracts/C.sol | 41 ++ .../mutants/5/MultipleContracts/C.sol | 41 ++ .../mutants/6/MultipleContracts/C.sol | 41 ++ .../mutants/7/MultipleContracts/C.sol | 41 ++ .../mutants/8/MultipleContracts/C.sol | 41 ++ .../mutants/9/MultipleContracts/C.sol | 41 ++ .../gambit_results.json | 363 +++++++++++++++++- .../mutants.log | 30 ++ .../mutants/1/MultipleContracts/C.sol | 41 ++ .../mutants/10/MultipleContracts/C.sol | 41 ++ .../mutants/11/MultipleContracts/C.sol | 41 ++ .../mutants/12/MultipleContracts/C.sol | 41 ++ .../mutants/13/MultipleContracts/C.sol | 41 ++ .../mutants/14/MultipleContracts/C.sol | 41 ++ .../mutants/15/MultipleContracts/C.sol | 41 ++ .../mutants/16/MultipleContracts/C.sol | 41 ++ .../mutants/17/MultipleContracts/C.sol | 41 ++ .../mutants/18/MultipleContracts/C.sol | 41 ++ .../mutants/19/MultipleContracts/C.sol | 41 ++ .../mutants/2/MultipleContracts/C.sol | 41 ++ .../mutants/20/MultipleContracts/C.sol | 41 ++ .../mutants/21/MultipleContracts/C.sol | 41 ++ .../mutants/22/MultipleContracts/C.sol | 41 ++ .../mutants/23/MultipleContracts/C.sol | 41 ++ .../mutants/24/MultipleContracts/C.sol | 41 ++ .../mutants/25/MultipleContracts/C.sol | 41 ++ .../mutants/26/MultipleContracts/C.sol | 41 ++ .../mutants/27/MultipleContracts/C.sol | 41 ++ .../mutants/28/MultipleContracts/C.sol | 41 ++ .../mutants/29/MultipleContracts/C.sol | 41 ++ .../mutants/3/MultipleContracts/C.sol | 41 ++ .../mutants/30/MultipleContracts/C.sol | 41 ++ .../mutants/4/MultipleContracts/C.sol | 41 ++ .../mutants/5/MultipleContracts/C.sol | 41 ++ .../mutants/6/MultipleContracts/C.sol | 41 ++ .../mutants/7/MultipleContracts/C.sol | 41 ++ .../mutants/8/MultipleContracts/C.sol | 41 ++ .../mutants/9/MultipleContracts/C.sol | 41 ++ .../gambit_results.json | 99 ++++- .../mutants.log | 8 + .../mutants/1/MultipleContracts/C.sol | 41 ++ .../mutants/2/MultipleContracts/C.sol | 41 ++ .../mutants/3/MultipleContracts/C.sol | 41 ++ .../mutants/4/MultipleContracts/C.sol | 41 ++ .../mutants/5/MultipleContracts/C.sol | 41 ++ .../mutants/6/MultipleContracts/C.sol | 41 ++ .../mutants/7/MultipleContracts/C.sol | 41 ++ .../mutants/8/MultipleContracts/C.sol | 41 ++ .../gambit_results.json | 36 ++ .../test_multiple_files_1.json/mutants.log | 3 + .../mutants/28/MultipleContracts/C.sol | 41 ++ .../mutants/29/MultipleContracts/C.sol | 41 ++ .../mutants/30/MultipleContracts/C.sol | 41 ++ 220 files changed, 6012 insertions(+), 549 deletions(-) create mode 100644 resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol rename resources/regressions/all_ops.json/mutants/{26 => 37}/LOR/LOR.sol (85%) rename resources/regressions/all_ops.json/mutants/{37 => 48}/LVR/LVR.sol (89%) rename resources/regressions/all_ops.json/mutants/{48 => 74}/ROR/ROR.sol (92%) rename resources/regressions/{test_log_invalid.json/mutants/74 => all_ops.json/mutants/76}/UOR/UOR.sol (83%) create mode 100644 resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol create mode 100644 resources/regressions/no_import_path.json/mutants/1/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/10/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/11/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/12/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/13/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/14/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/15/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/16/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/17/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/18/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/19/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/2/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/20/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/21/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/22/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/23/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/24/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/25/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/26/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/27/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/28/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/29/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/3/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/30/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/4/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/5/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/6/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/7/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/8/contracts/C.sol create mode 100644 resources/regressions/no_import_path.json/mutants/9/contracts/C.sol create mode 100644 resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol rename resources/regressions/test_log_invalid.json/mutants/{26 => 37}/LOR/LOR.sol (85%) rename resources/regressions/test_log_invalid.json/mutants/{37 => 48}/LVR/LVR.sol (89%) rename resources/regressions/test_log_invalid.json/mutants/{48 => 74}/ROR/ROR.sol (92%) rename resources/regressions/{all_ops.json/mutants/74 => test_log_invalid.json/mutants/76}/UOR/UOR.sol (83%) create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol create mode 100644 resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol diff --git a/resources/regressions/all_ops.json/gambit_results.json b/resources/regressions/all_ops.json/gambit_results.json index 1ad7397a..1ff00837 100644 --- a/resources/regressions/all_ops.json/gambit_results.json +++ b/resources/regressions/all_ops.json/gambit_results.json @@ -299,13 +299,25 @@ "original": "BOR/BOR.sol", "repl": "&" }, + { + "col": 38, + "description": "ElimDelegateCall", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", + "id": "26", + "line": 16, + "name": "mutants/26/EDC/EDC.sol", + "op": "EDC", + "orig": "delegatecall", + "original": "EDC/EDC.sol", + "repl": "call" + }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "26", + "id": "27", "line": 9, - "name": "mutants/26/LOR/LOR.sol", + "name": "mutants/27/LOR/LOR.sol", "op": "LOR", "orig": "a && b", "original": "LOR/LOR.sol", @@ -315,9 +327,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "27", + "id": "28", "line": 9, - "name": "mutants/27/LOR/LOR.sol", + "name": "mutants/28/LOR/LOR.sol", "op": "LOR", "orig": "a && b", "original": "LOR/LOR.sol", @@ -327,9 +339,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "28", + "id": "29", "line": 9, - "name": "mutants/28/LOR/LOR.sol", + "name": "mutants/29/LOR/LOR.sol", "op": "LOR", "orig": "a && b", "original": "LOR/LOR.sol", @@ -339,9 +351,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "29", + "id": "30", "line": 14, - "name": "mutants/29/LOR/LOR.sol", + "name": "mutants/30/LOR/LOR.sol", "op": "LOR", "orig": "a || b", "original": "LOR/LOR.sol", @@ -351,9 +363,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "30", + "id": "31", "line": 14, - "name": "mutants/30/LOR/LOR.sol", + "name": "mutants/31/LOR/LOR.sol", "op": "LOR", "orig": "a || b", "original": "LOR/LOR.sol", @@ -363,9 +375,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "31", + "id": "32", "line": 14, - "name": "mutants/31/LOR/LOR.sol", + "name": "mutants/32/LOR/LOR.sol", "op": "LOR", "orig": "a || b", "original": "LOR/LOR.sol", @@ -375,9 +387,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n \n function not(bool a) public pure returns (bool) {\n", - "id": "32", + "id": "33", "line": 19, - "name": "mutants/32/LOR/LOR.sol", + "name": "mutants/33/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", "original": "LOR/LOR.sol", @@ -387,9 +399,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n \n function not(bool a) public pure returns (bool) {\n", - "id": "33", + "id": "34", "line": 19, - "name": "mutants/33/LOR/LOR.sol", + "name": "mutants/34/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", "original": "LOR/LOR.sol", @@ -399,9 +411,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n \n function not(bool a) public pure returns (bool) {\n", - "id": "34", + "id": "35", "line": 19, - "name": "mutants/34/LOR/LOR.sol", + "name": "mutants/35/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", "original": "LOR/LOR.sol", @@ -411,9 +423,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -19,7 +19,8 @@\n return (x < y) || (a != (x >= y));\n }\n \n+ /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;`\n function not(bool a) public pure returns (bool) {\n- return !a;\n+ return true;\n }\n }\n", - "id": "35", + "id": "36", "line": 23, - "name": "mutants/35/LOR/LOR.sol", + "name": "mutants/36/LOR/LOR.sol", "op": "LOR", "orig": "!a", "original": "LOR/LOR.sol", @@ -423,9 +435,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -19,7 +19,8 @@\n return (x < y) || (a != (x >= y));\n }\n \n+ /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;`\n function not(bool a) public pure returns (bool) {\n- return !a;\n+ return false;\n }\n }\n", - "id": "36", + "id": "37", "line": 23, - "name": "mutants/36/LOR/LOR.sol", + "name": "mutants/37/LOR/LOR.sol", "op": "LOR", "orig": "!a", "original": "LOR/LOR.sol", @@ -435,9 +447,9 @@ "col": 24, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", - "id": "37", + "id": "38", "line": 15, - "name": "mutants/37/LVR/LVR.sol", + "name": "mutants/38/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "LVR/LVR.sol", @@ -447,9 +459,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", - "id": "38", + "id": "39", "line": 21, - "name": "mutants/38/LVR/LVR.sol", + "name": "mutants/39/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "LVR/LVR.sol", @@ -459,9 +471,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", - "id": "39", + "id": "40", "line": 21, - "name": "mutants/39/LVR/LVR.sol", + "name": "mutants/40/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "LVR/LVR.sol", @@ -471,9 +483,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", - "id": "40", + "id": "41", "line": 27, - "name": "mutants/40/LVR/LVR.sol", + "name": "mutants/41/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "LVR/LVR.sol", @@ -483,9 +495,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", - "id": "41", + "id": "42", "line": 27, - "name": "mutants/41/LVR/LVR.sol", + "name": "mutants/42/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "LVR/LVR.sol", @@ -495,9 +507,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", - "id": "42", + "id": "43", "line": 27, - "name": "mutants/42/LVR/LVR.sol", + "name": "mutants/43/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "LVR/LVR.sol", @@ -507,9 +519,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", - "id": "43", + "id": "44", "line": 33, - "name": "mutants/43/LVR/LVR.sol", + "name": "mutants/44/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "LVR/LVR.sol", @@ -519,9 +531,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", - "id": "44", + "id": "45", "line": 33, - "name": "mutants/44/LVR/LVR.sol", + "name": "mutants/45/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "LVR/LVR.sol", @@ -531,9 +543,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", - "id": "45", + "id": "46", "line": 33, - "name": "mutants/45/LVR/LVR.sol", + "name": "mutants/46/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "LVR/LVR.sol", @@ -543,9 +555,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", - "id": "46", + "id": "47", "line": 39, - "name": "mutants/46/LVR/LVR.sol", + "name": "mutants/47/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "LVR/LVR.sol", @@ -555,9 +567,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", - "id": "47", + "id": "48", "line": 39, - "name": "mutants/47/LVR/LVR.sol", + "name": "mutants/48/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "LVR/LVR.sol", @@ -567,9 +579,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "48", + "id": "49", "line": 9, - "name": "mutants/48/ROR/ROR.sol", + "name": "mutants/49/ROR/ROR.sol", "op": "ROR", "orig": "<", "original": "ROR/ROR.sol", @@ -579,9 +591,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "49", + "id": "50", "line": 9, - "name": "mutants/49/ROR/ROR.sol", + "name": "mutants/50/ROR/ROR.sol", "op": "ROR", "orig": "<", "original": "ROR/ROR.sol", @@ -591,9 +603,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "50", + "id": "51", "line": 9, - "name": "mutants/50/ROR/ROR.sol", + "name": "mutants/51/ROR/ROR.sol", "op": "ROR", "orig": "x < y", "original": "ROR/ROR.sol", @@ -603,9 +615,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "51", + "id": "52", "line": 14, - "name": "mutants/51/ROR/ROR.sol", + "name": "mutants/52/ROR/ROR.sol", "op": "ROR", "orig": "<=", "original": "ROR/ROR.sol", @@ -615,9 +627,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "52", + "id": "53", "line": 14, - "name": "mutants/52/ROR/ROR.sol", + "name": "mutants/53/ROR/ROR.sol", "op": "ROR", "orig": "<=", "original": "ROR/ROR.sol", @@ -627,9 +639,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "53", + "id": "54", "line": 14, - "name": "mutants/53/ROR/ROR.sol", + "name": "mutants/54/ROR/ROR.sol", "op": "ROR", "orig": "x <= y", "original": "ROR/ROR.sol", @@ -639,9 +651,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "54", + "id": "55", "line": 19, - "name": "mutants/54/ROR/ROR.sol", + "name": "mutants/55/ROR/ROR.sol", "op": "ROR", "orig": ">", "original": "ROR/ROR.sol", @@ -651,9 +663,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "55", + "id": "56", "line": 19, - "name": "mutants/55/ROR/ROR.sol", + "name": "mutants/56/ROR/ROR.sol", "op": "ROR", "orig": ">", "original": "ROR/ROR.sol", @@ -663,9 +675,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "56", + "id": "57", "line": 19, - "name": "mutants/56/ROR/ROR.sol", + "name": "mutants/57/ROR/ROR.sol", "op": "ROR", "orig": "x > y", "original": "ROR/ROR.sol", @@ -675,9 +687,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "57", + "id": "58", "line": 24, - "name": "mutants/57/ROR/ROR.sol", + "name": "mutants/58/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "ROR/ROR.sol", @@ -687,9 +699,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "58", + "id": "59", "line": 24, - "name": "mutants/58/ROR/ROR.sol", + "name": "mutants/59/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "ROR/ROR.sol", @@ -699,9 +711,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "59", + "id": "60", "line": 24, - "name": "mutants/59/ROR/ROR.sol", + "name": "mutants/60/ROR/ROR.sol", "op": "ROR", "orig": "x >= y", "original": "ROR/ROR.sol", @@ -711,9 +723,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "60", + "id": "61", "line": 29, - "name": "mutants/60/ROR/ROR.sol", + "name": "mutants/61/ROR/ROR.sol", "op": "ROR", "orig": "==", "original": "ROR/ROR.sol", @@ -723,9 +735,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "61", + "id": "62", "line": 29, - "name": "mutants/61/ROR/ROR.sol", + "name": "mutants/62/ROR/ROR.sol", "op": "ROR", "orig": "==", "original": "ROR/ROR.sol", @@ -735,9 +747,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "62", + "id": "63", "line": 29, - "name": "mutants/62/ROR/ROR.sol", + "name": "mutants/63/ROR/ROR.sol", "op": "ROR", "orig": "x == y", "original": "ROR/ROR.sol", @@ -747,9 +759,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", - "id": "63", + "id": "64", "line": 34, - "name": "mutants/63/ROR/ROR.sol", + "name": "mutants/64/ROR/ROR.sol", "op": "ROR", "orig": "x == y", "original": "ROR/ROR.sol", @@ -759,9 +771,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "64", + "id": "65", "line": 39, - "name": "mutants/64/ROR/ROR.sol", + "name": "mutants/65/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "ROR/ROR.sol", @@ -771,9 +783,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "65", + "id": "66", "line": 39, - "name": "mutants/65/ROR/ROR.sol", + "name": "mutants/66/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "ROR/ROR.sol", @@ -783,9 +795,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "66", + "id": "67", "line": 39, - "name": "mutants/66/ROR/ROR.sol", + "name": "mutants/67/ROR/ROR.sol", "op": "ROR", "orig": "x != y", "original": "ROR/ROR.sol", @@ -795,9 +807,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", - "id": "67", + "id": "68", "line": 44, - "name": "mutants/67/ROR/ROR.sol", + "name": "mutants/68/ROR/ROR.sol", "op": "ROR", "orig": "x != y", "original": "ROR/ROR.sol", @@ -807,9 +819,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "68", + "id": "69", "line": 53, - "name": "mutants/68/ROR/ROR.sol", + "name": "mutants/69/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "ROR/ROR.sol", @@ -819,9 +831,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "69", + "id": "70", "line": 53, - "name": "mutants/69/ROR/ROR.sol", + "name": "mutants/70/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "ROR/ROR.sol", @@ -831,9 +843,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "70", + "id": "71", "line": 53, - "name": "mutants/70/ROR/ROR.sol", + "name": "mutants/71/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) >= z", "original": "ROR/ROR.sol", @@ -843,9 +855,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", - "id": "71", + "id": "72", "line": 62, - "name": "mutants/71/ROR/ROR.sol", + "name": "mutants/72/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "ROR/ROR.sol", @@ -855,9 +867,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", - "id": "72", + "id": "73", "line": 62, - "name": "mutants/72/ROR/ROR.sol", + "name": "mutants/73/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "ROR/ROR.sol", @@ -867,9 +879,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", - "id": "73", + "id": "74", "line": 62, - "name": "mutants/73/ROR/ROR.sol", + "name": "mutants/74/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) != z", "original": "ROR/ROR.sol", @@ -879,9 +891,9 @@ "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return -x;\n }\n \n // Expect a single mutant: ~x\n", - "id": "74", + "id": "75", "line": 14, - "name": "mutants/74/UOR/UOR.sol", + "name": "mutants/75/UOR/UOR.sol", "op": "UOR", "orig": "~", "original": "UOR/UOR.sol", @@ -891,9 +903,9 @@ "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~x;\n }\n }\n", - "id": "75", + "id": "76", "line": 19, - "name": "mutants/75/UOR/UOR.sol", + "name": "mutants/76/UOR/UOR.sol", "op": "UOR", "orig": "-", "original": "UOR/UOR.sol", diff --git a/resources/regressions/all_ops.json/mutants.log b/resources/regressions/all_ops.json/mutants.log index f0068ce4..e3828c3d 100644 --- a/resources/regressions/all_ops.json/mutants.log +++ b/resources/regressions/all_ops.json/mutants.log @@ -23,53 +23,54 @@ 23,BOR,BOR/BOR.sol,10:18,|,& 24,BOR,BOR/BOR.sol,16:18,&,| 25,BOR,BOR/BOR.sol,22:18,^,& -26,LOR,LOR/LOR.sol,9:16,a && b,a -27,LOR,LOR/LOR.sol,9:16,a && b,b -28,LOR,LOR/LOR.sol,9:16,a && b,false -29,LOR,LOR/LOR.sol,14:16,a || b,a -30,LOR,LOR/LOR.sol,14:16,a || b,b -31,LOR,LOR/LOR.sol,14:16,a || b,true -32,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y -33,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) -34,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true -35,LOR,LOR/LOR.sol,23:16,!a,true -36,LOR,LOR/LOR.sol,23:16,!a,false -37,LVR,LVR/LVR.sol,15:24,0,1 -38,LVR,LVR/LVR.sol,21:23,1,0 -39,LVR,LVR/LVR.sol,21:23,1,2 -40,LVR,LVR/LVR.sol,27:26,-1,0 -41,LVR,LVR/LVR.sol,27:26,-1,1 -42,LVR,LVR/LVR.sol,27:26,-1,-2 -43,LVR,LVR/LVR.sol,33:26,1,0 -44,LVR,LVR/LVR.sol,33:26,1,-1 -45,LVR,LVR/LVR.sol,33:26,1,2 -46,LVR,LVR/LVR.sol,39:23,0,-1 -47,LVR,LVR/LVR.sol,39:23,0,1 -48,ROR,ROR/ROR.sol,9:18,<,<= -49,ROR,ROR/ROR.sol,9:18,<,!= -50,ROR,ROR/ROR.sol,9:16,x < y,false -51,ROR,ROR/ROR.sol,14:18,<=,< -52,ROR,ROR/ROR.sol,14:18,<=,== -53,ROR,ROR/ROR.sol,14:16,x <= y,true -54,ROR,ROR/ROR.sol,19:18,>,>= -55,ROR,ROR/ROR.sol,19:18,>,!= -56,ROR,ROR/ROR.sol,19:16,x > y,false -57,ROR,ROR/ROR.sol,24:18,>=,> -58,ROR,ROR/ROR.sol,24:18,>=,== -59,ROR,ROR/ROR.sol,24:16,x >= y,true -60,ROR,ROR/ROR.sol,29:18,==,<= -61,ROR,ROR/ROR.sol,29:18,==,>= -62,ROR,ROR/ROR.sol,29:16,x == y,false -63,ROR,ROR/ROR.sol,34:16,x == y,false -64,ROR,ROR/ROR.sol,39:18,!=,< -65,ROR,ROR/ROR.sol,39:18,!=,> -66,ROR,ROR/ROR.sol,39:16,x != y,true -67,ROR,ROR/ROR.sol,44:16,x != y,true -68,ROR,ROR/ROR.sol,53:24,>=,> -69,ROR,ROR/ROR.sol,53:24,>=,== -70,ROR,ROR/ROR.sol,53:16,(x + y) >= z,true -71,ROR,ROR/ROR.sol,62:24,!=,< -72,ROR,ROR/ROR.sol,62:24,!=,> -73,ROR,ROR/ROR.sol,62:16,(x + y) != z,true -74,UOR,UOR/UOR.sol,14:16,~,- -75,UOR,UOR/UOR.sol,19:16,-,~ +26,EDC,EDC/EDC.sol,16:38,delegatecall,call +27,LOR,LOR/LOR.sol,9:16,a && b,a +28,LOR,LOR/LOR.sol,9:16,a && b,b +29,LOR,LOR/LOR.sol,9:16,a && b,false +30,LOR,LOR/LOR.sol,14:16,a || b,a +31,LOR,LOR/LOR.sol,14:16,a || b,b +32,LOR,LOR/LOR.sol,14:16,a || b,true +33,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y +34,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) +35,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true +36,LOR,LOR/LOR.sol,23:16,!a,true +37,LOR,LOR/LOR.sol,23:16,!a,false +38,LVR,LVR/LVR.sol,15:24,0,1 +39,LVR,LVR/LVR.sol,21:23,1,0 +40,LVR,LVR/LVR.sol,21:23,1,2 +41,LVR,LVR/LVR.sol,27:26,-1,0 +42,LVR,LVR/LVR.sol,27:26,-1,1 +43,LVR,LVR/LVR.sol,27:26,-1,-2 +44,LVR,LVR/LVR.sol,33:26,1,0 +45,LVR,LVR/LVR.sol,33:26,1,-1 +46,LVR,LVR/LVR.sol,33:26,1,2 +47,LVR,LVR/LVR.sol,39:23,0,-1 +48,LVR,LVR/LVR.sol,39:23,0,1 +49,ROR,ROR/ROR.sol,9:18,<,<= +50,ROR,ROR/ROR.sol,9:18,<,!= +51,ROR,ROR/ROR.sol,9:16,x < y,false +52,ROR,ROR/ROR.sol,14:18,<=,< +53,ROR,ROR/ROR.sol,14:18,<=,== +54,ROR,ROR/ROR.sol,14:16,x <= y,true +55,ROR,ROR/ROR.sol,19:18,>,>= +56,ROR,ROR/ROR.sol,19:18,>,!= +57,ROR,ROR/ROR.sol,19:16,x > y,false +58,ROR,ROR/ROR.sol,24:18,>=,> +59,ROR,ROR/ROR.sol,24:18,>=,== +60,ROR,ROR/ROR.sol,24:16,x >= y,true +61,ROR,ROR/ROR.sol,29:18,==,<= +62,ROR,ROR/ROR.sol,29:18,==,>= +63,ROR,ROR/ROR.sol,29:16,x == y,false +64,ROR,ROR/ROR.sol,34:16,x == y,false +65,ROR,ROR/ROR.sol,39:18,!=,< +66,ROR,ROR/ROR.sol,39:18,!=,> +67,ROR,ROR/ROR.sol,39:16,x != y,true +68,ROR,ROR/ROR.sol,44:16,x != y,true +69,ROR,ROR/ROR.sol,53:24,>=,> +70,ROR,ROR/ROR.sol,53:24,>=,== +71,ROR,ROR/ROR.sol,53:16,(x + y) >= z,true +72,ROR,ROR/ROR.sol,62:24,!=,< +73,ROR,ROR/ROR.sol,62:24,!=,> +74,ROR,ROR/ROR.sol,62:16,(x + y) != z,true +75,UOR,UOR/UOR.sol,14:16,~,- +76,UOR,UOR/UOR.sol,19:16,-,~ diff --git a/resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol b/resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol new file mode 100644 index 00000000..19754976 --- /dev/null +++ b/resources/regressions/all_ops.json/mutants/26/EDC/EDC.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.13; + +contract Helper { + function setVars(uint _num) public payable {} +} + +contract EDC { + uint public num; + address public sender; + uint public value; + bool public delegateSuccessful; + bytes public myData; + + /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(` + function setVars(address _contract) public payable { + (bool success, ) = _contract.call( + abi.encodeWithSignature("setVars(uint256)", 1) + ); + require(success, "Delegatecall failed"); + } +} diff --git a/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol index c97e8675..01536cd6 100644 --- a/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/27/LOR/LOR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` + /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return b; + return a; } // Expect three mutants: a, b, true diff --git a/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol index 492dc45c..c97e8675 100644 --- a/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/28/LOR/LOR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` + /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return false; + return b; } // Expect three mutants: a, b, true diff --git a/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol index 7f62ba05..492dc45c 100644 --- a/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/29/LOR/LOR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a && b; + return false; } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a; + return a || b; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol index efb5d5a8..7f62ba05 100644 --- a/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/30/LOR/LOR.sol @@ -10,9 +10,9 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` + /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return b; + return a; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol index 7d3c811a..efb5d5a8 100644 --- a/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/31/LOR/LOR.sol @@ -10,9 +10,9 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` + /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return true; + return b; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol index 4ceda907..7d3c811a 100644 --- a/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/32/LOR/LOR.sol @@ -10,14 +10,14 @@ contract LOR { } // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a || b; + return true; } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return x < y; + return (x < y) || (a != (x >= y)); } function not(bool a) public pure returns (bool) { diff --git a/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol index 690fae8d..4ceda907 100644 --- a/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/33/LOR/LOR.sol @@ -15,9 +15,9 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return a != (x >= y); + return x < y; } function not(bool a) public pure returns (bool) { diff --git a/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol index 2ef15642..690fae8d 100644 --- a/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/34/LOR/LOR.sol @@ -15,9 +15,9 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return true; + return a != (x >= y); } function not(bool a) public pure returns (bool) { diff --git a/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol index be0e75f4..2ef15642 100644 --- a/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/35/LOR/LOR.sol @@ -15,12 +15,12 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return (x < y) || (a != (x >= y)); + return true; } - /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;` function not(bool a) public pure returns (bool) { - return true; + return !a; } } diff --git a/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol index 35ee5751..be0e75f4 100644 --- a/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/36/LOR/LOR.sol @@ -19,8 +19,8 @@ contract LOR { return (x < y) || (a != (x >= y)); } - /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;` + /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;` function not(bool a) public pure returns (bool) { - return false; + return true; } } diff --git a/resources/regressions/all_ops.json/mutants/26/LOR/LOR.sol b/resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol similarity index 85% rename from resources/regressions/all_ops.json/mutants/26/LOR/LOR.sol rename to resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol index 01536cd6..35ee5751 100644 --- a/resources/regressions/all_ops.json/mutants/26/LOR/LOR.sol +++ b/resources/regressions/all_ops.json/mutants/37/LOR/LOR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a; + return a && b; } // Expect three mutants: a, b, true @@ -20,7 +19,8 @@ contract LOR { return (x < y) || (a != (x >= y)); } + /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;` function not(bool a) public pure returns (bool) { - return !a; + return false; } } diff --git a/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol index f2cb8295..e06271e2 100644 --- a/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/38/LVR/LVR.sol @@ -11,15 +11,15 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; + uint256 zero = 1; return zero; } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 0; + uint256 one = 1; return one; } diff --git a/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol index d18c6c48..f2cb8295 100644 --- a/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/39/LVR/LVR.sol @@ -17,9 +17,9 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 2; + uint256 one = 0; return one; } diff --git a/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol index 173dc540..d18c6c48 100644 --- a/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/40/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 2; return one; } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol index 72ffaedf..173dc540 100644 --- a/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/41/LVR/LVR.sol @@ -23,9 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 1; + int256 neg_one = 0; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol index 1e24417f..72ffaedf 100644 --- a/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/42/LVR/LVR.sol @@ -23,9 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -2; + int256 neg_one = 1; return neg_one; } diff --git a/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol index e088a4e3..1e24417f 100644 --- a/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/43/LVR/LVR.sol @@ -23,15 +23,15 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = -2; return neg_one; } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 0; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol index 2407079e..e088a4e3 100644 --- a/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/44/LVR/LVR.sol @@ -29,9 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = -1; + int256 pos_one = 0; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol index a5082f3b..2407079e 100644 --- a/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/45/LVR/LVR.sol @@ -29,9 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 2; + int256 pos_one = -1; return pos_one; } diff --git a/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol index 22af4185..a5082f3b 100644 --- a/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/46/LVR/LVR.sol @@ -29,15 +29,15 @@ contract LVR { } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = 2; return pos_one; } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = -1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol index e241973d..22af4185 100644 --- a/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/47/LVR/LVR.sol @@ -35,9 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 1; + int256 zero = -1; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol b/resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol similarity index 89% rename from resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol rename to resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol index e06271e2..e241973d 100644 --- a/resources/regressions/all_ops.json/mutants/37/LVR/LVR.sol +++ b/resources/regressions/all_ops.json/mutants/48/LVR/LVR.sol @@ -11,9 +11,8 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 1; + uint256 zero = 0; return zero; } @@ -36,8 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = 1; return zero; } } diff --git a/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol index 0c05265c..dec84f24 100644 --- a/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/49/ROR/ROR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x <= y; } // Expect 3 mutants: x < y, x == y, true diff --git a/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol index 6141947b..0c05265c 100644 --- a/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/50/ROR/ROR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x != y; } // Expect 3 mutants: x < y, x == y, true diff --git a/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol index 9f8ccd04..6141947b 100644 --- a/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/51/ROR/ROR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return false; } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol index 18e38f34..9f8ccd04 100644 --- a/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/52/ROR/ROR.sol @@ -10,9 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x < y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol index 55dd7c79..18e38f34 100644 --- a/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/53/ROR/ROR.sol @@ -10,9 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x == y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol index 52949d03..55dd7c79 100644 --- a/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/54/ROR/ROR.sol @@ -10,14 +10,14 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return true; } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x > y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol index a3e16320..52949d03 100644 --- a/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/55/ROR/ROR.sol @@ -15,9 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x >= y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol index a9024427..a3e16320 100644 --- a/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/56/ROR/ROR.sol @@ -15,9 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x != y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol index 337c9a92..a9024427 100644 --- a/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/57/ROR/ROR.sol @@ -15,14 +15,14 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return false; } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol index 7c02b73b..337c9a92 100644 --- a/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/58/ROR/ROR.sol @@ -20,9 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x > y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol index 3d299dfb..7c02b73b 100644 --- a/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/59/ROR/ROR.sol @@ -20,9 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x == y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol index c865469b..3d299dfb 100644 --- a/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/60/ROR/ROR.sol @@ -20,14 +20,14 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return true; } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x == y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol index 8cdc1c10..c865469b 100644 --- a/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/61/ROR/ROR.sol @@ -25,9 +25,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` + /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x <= y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol index de6a4360..8cdc1c10 100644 --- a/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/62/ROR/ROR.sol @@ -25,9 +25,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` + /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x >= y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol index ab40e6c9..de6a4360 100644 --- a/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/63/ROR/ROR.sol @@ -25,14 +25,14 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return false; } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x == y; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol index f42e7b7e..ab40e6c9 100644 --- a/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/64/ROR/ROR.sol @@ -30,14 +30,14 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; + return false; } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol index e5f50322..f42e7b7e 100644 --- a/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/65/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x < y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol index 83684484..e5f50322 100644 --- a/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/66/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x > y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol index 3ae92133..83684484 100644 --- a/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/67/ROR/ROR.sol @@ -35,14 +35,14 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return true; } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol index bdeac3af..3ae92133 100644 --- a/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/68/ROR/ROR.sol @@ -40,8 +40,9 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol index 430379f6..bdeac3af 100644 --- a/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/69/ROR/ROR.sol @@ -49,9 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) == z; + return (x + y) > z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol index 3d67c155..430379f6 100644 --- a/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/70/ROR/ROR.sol @@ -49,9 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return true; + return (x + y) == z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol index 13612614..3d67c155 100644 --- a/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/71/ROR/ROR.sol @@ -49,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true @@ -58,8 +59,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) < z; + return (x + y) != z; } } diff --git a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol index dd0c83ca..13612614 100644 --- a/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/72/ROR/ROR.sol @@ -58,8 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) < z; } } diff --git a/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol index 84889114..dd0c83ca 100644 --- a/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/73/ROR/ROR.sol @@ -58,8 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return true; + return (x + y) > z; } } diff --git a/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol b/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol similarity index 92% rename from resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol rename to resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol index dec84f24..84889114 100644 --- a/resources/regressions/all_ops.json/mutants/48/ROR/ROR.sol +++ b/resources/regressions/all_ops.json/mutants/74/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return true; } } diff --git a/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol index 84eae0ca..50d09571 100644 --- a/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol +++ b/resources/regressions/all_ops.json/mutants/75/UOR/UOR.sol @@ -10,13 +10,13 @@ contract UOR { } // Expect a single mutant: -x + /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;` function signed_bw_not(int256 x) public pure returns (int256) { - return ~x; + return -x; } // Expect a single mutant: ~x - /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;` function signed_neg(int256 x) public pure returns (int256) { - return ~x; + return -x; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol b/resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol similarity index 83% rename from resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol rename to resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol index 50d09571..84eae0ca 100644 --- a/resources/regressions/test_log_invalid.json/mutants/74/UOR/UOR.sol +++ b/resources/regressions/all_ops.json/mutants/76/UOR/UOR.sol @@ -10,13 +10,13 @@ contract UOR { } // Expect a single mutant: -x - /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;` function signed_bw_not(int256 x) public pure returns (int256) { - return -x; + return ~x; } // Expect a single mutant: ~x + /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;` function signed_neg(int256 x) public pure returns (int256) { - return -x; + return ~x; } } diff --git a/resources/regressions/edc.json/gambit_results.json b/resources/regressions/edc.json/gambit_results.json index 0637a088..0b99ff0b 100644 --- a/resources/regressions/edc.json/gambit_results.json +++ b/resources/regressions/edc.json/gambit_results.json @@ -1 +1,14 @@ -[] \ No newline at end of file +[ + { + "col": 38, + "description": "ElimDelegateCall", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", + "id": "1", + "line": 16, + "name": "mutants/1/Ops/EDC/EDC.sol", + "op": "EDC", + "orig": "delegatecall", + "original": "Ops/EDC/EDC.sol", + "repl": "call" + } +] \ No newline at end of file diff --git a/resources/regressions/edc.json/mutants.log b/resources/regressions/edc.json/mutants.log index e69de29b..379d8f77 100644 --- a/resources/regressions/edc.json/mutants.log +++ b/resources/regressions/edc.json/mutants.log @@ -0,0 +1 @@ +1,EDC,Ops/EDC/EDC.sol,16:38,delegatecall,call diff --git a/resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol b/resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol new file mode 100644 index 00000000..19754976 --- /dev/null +++ b/resources/regressions/edc.json/mutants/1/Ops/EDC/EDC.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.13; + +contract Helper { + function setVars(uint _num) public payable {} +} + +contract EDC { + uint public num; + address public sender; + uint public value; + bool public delegateSuccessful; + bytes public myData; + + /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(` + function setVars(address _contract) public payable { + (bool success, ) = _contract.call( + abi.encodeWithSignature("setVars(uint256)", 1) + ); + require(success, "Delegatecall failed"); + } +} diff --git a/resources/regressions/no_import_path.json/gambit_results.json b/resources/regressions/no_import_path.json/gambit_results.json index 0637a088..fe404328 100644 --- a/resources/regressions/no_import_path.json/gambit_results.json +++ b/resources/regressions/no_import_path.json/gambit_results.json @@ -1 +1,362 @@ -[] \ No newline at end of file +[ + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n import \"contracts/Imported.sol\";\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "1", + "line": 9, + "name": "mutants/1/contracts/C.sol", + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 16, + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n import \"contracts/Imported.sol\";\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "2", + "line": 9, + "name": "mutants/2/contracts/C.sol", + "op": "ROR", + "orig": "c[0] == e", + "original": "contracts/C.sol", + "repl": "false" + }, + { + "col": 18, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n import \"contracts/Imported.sol\";\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "3", + "line": 9, + "name": "mutants/3/contracts/C.sol", + "op": "LVR", + "orig": "0", + "original": "contracts/C.sol", + "repl": "1" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "id": "4", + "line": 13, + "name": "mutants/4/contracts/C.sol", + "op": "STD", + "orig": "return a + b", + "original": "contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "id": "5", + "line": 13, + "name": "mutants/5/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "contracts/C.sol", + "repl": "-" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "id": "6", + "line": 13, + "name": "mutants/6/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "contracts/C.sol", + "repl": "*" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "id": "7", + "line": 13, + "name": "mutants/7/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "contracts/C.sol", + "repl": "/" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -9,8 +9,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "id": "8", + "line": 13, + "name": "mutants/8/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "contracts/C.sol", + "repl": "%" + }, + { + "col": 44, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "9", + "line": 19, + "name": "mutants/9/contracts/C.sol", + "op": "LVR", + "orig": "1", + "original": "contracts/C.sol", + "repl": "0" + }, + { + "col": 44, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "10", + "line": 19, + "name": "mutants/10/contracts/C.sol", + "op": "LVR", + "orig": "1", + "original": "contracts/C.sol", + "repl": "2" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -16,8 +16,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "id": "11", + "line": 20, + "name": "mutants/11/contracts/C.sol", + "op": "STD", + "orig": "a[0] = msg.sender", + "original": "contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 11, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -16,8 +16,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", + "id": "12", + "line": 20, + "name": "mutants/12/contracts/C.sol", + "op": "LVR", + "orig": "0", + "original": "contracts/C.sol", + "repl": "1" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "id": "13", + "line": 21, + "name": "mutants/13/contracts/C.sol", + "op": "STD", + "orig": "return a", + "original": "contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 21, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "14", + "line": 25, + "name": "mutants/14/contracts/C.sol", + "op": "LVR", + "orig": "10", + "original": "contracts/C.sol", + "repl": "0" + }, + { + "col": 21, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "15", + "line": 25, + "name": "mutants/15/contracts/C.sol", + "op": "LVR", + "orig": "10", + "original": "contracts/C.sol", + "repl": "11" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "id": "16", + "line": 26, + "name": "mutants/16/contracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "contracts/C.sol", + "repl": "+" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "17", + "line": 26, + "name": "mutants/17/contracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "contracts/C.sol", + "repl": "-" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "18", + "line": 26, + "name": "mutants/18/contracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "contracts/C.sol", + "repl": "*" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "19", + "line": 26, + "name": "mutants/19/contracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "contracts/C.sol", + "repl": "/" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -22,8 +22,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "20", + "line": 26, + "name": "mutants/20/contracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "contracts/C.sol", + "repl": "%" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "21", + "line": 27, + "name": "mutants/21/contracts/C.sol", + "op": "STD", + "orig": "return res", + "original": "contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -27,8 +27,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "22", + "line": 31, + "name": "mutants/22/contracts/C.sol", + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 16, + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -27,8 +27,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "id": "23", + "line": 31, + "name": "mutants/23/contracts/C.sol", + "op": "ROR", + "orig": "c[0] == e", + "original": "contracts/C.sol", + "repl": "false" + }, + { + "col": 18, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -27,8 +27,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "id": "24", + "line": 31, + "name": "mutants/24/contracts/C.sol", + "op": "LVR", + "orig": "0", + "original": "contracts/C.sol", + "repl": "1" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -32,8 +32,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "id": "25", + "line": 36, + "name": "mutants/25/contracts/C.sol", + "op": "STD", + "orig": "Utils.getarray(b, address(this))", + "original": "contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "id": "26", + "line": 40, + "name": "mutants/26/contracts/C.sol", + "op": "STD", + "orig": "return c + d", + "original": "contracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "27", + "line": 40, + "name": "mutants/27/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "contracts/C.sol", + "repl": "-" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "28", + "line": 40, + "name": "mutants/28/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "contracts/C.sol", + "repl": "*" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "29", + "line": 40, + "name": "mutants/29/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "contracts/C.sol", + "repl": "/" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -36,7 +36,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "30", + "line": 40, + "name": "mutants/30/contracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "contracts/C.sol", + "repl": "%" + } +] \ No newline at end of file diff --git a/resources/regressions/no_import_path.json/mutants.log b/resources/regressions/no_import_path.json/mutants.log index e69de29b..de5c3a27 100644 --- a/resources/regressions/no_import_path.json/mutants.log +++ b/resources/regressions/no_import_path.json/mutants.log @@ -0,0 +1,30 @@ +1,STD,contracts/C.sol,9:9,assert(c[0] == e),assert(true) +2,ROR,contracts/C.sol,9:16,c[0] == e,false +3,LVR,contracts/C.sol,9:18,0,1 +4,STD,contracts/C.sol,13:9,return a + b,assert(true) +5,AOR,contracts/C.sol,13:18,+,- +6,AOR,contracts/C.sol,13:18,+,* +7,AOR,contracts/C.sol,13:18,+,/ +8,AOR,contracts/C.sol,13:18,+,% +9,LVR,contracts/C.sol,19:44,1,0 +10,LVR,contracts/C.sol,19:44,1,2 +11,STD,contracts/C.sol,20:9,a[0] = msg.sender,assert(true) +12,LVR,contracts/C.sol,20:11,0,1 +13,STD,contracts/C.sol,21:9,return a,assert(true) +14,LVR,contracts/C.sol,25:21,10,0 +15,LVR,contracts/C.sol,25:21,10,11 +16,AOR,contracts/C.sol,26:25,**,+ +17,AOR,contracts/C.sol,26:25,**,- +18,AOR,contracts/C.sol,26:25,**,* +19,AOR,contracts/C.sol,26:25,**,/ +20,AOR,contracts/C.sol,26:25,**,% +21,STD,contracts/C.sol,27:9,return res,assert(true) +22,STD,contracts/C.sol,31:9,assert(c[0] == e),assert(true) +23,ROR,contracts/C.sol,31:16,c[0] == e,false +24,LVR,contracts/C.sol,31:18,0,1 +25,STD,contracts/C.sol,36:9,"Utils.getarray(b, address(this))",assert(true) +26,STD,contracts/C.sol,40:9,return c + d,assert(true) +27,AOR,contracts/C.sol,40:18,+,- +28,AOR,contracts/C.sol,40:18,+,* +29,AOR,contracts/C.sol,40:18,+,/ +30,AOR,contracts/C.sol,40:18,+,% diff --git a/resources/regressions/no_import_path.json/mutants/1/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/1/contracts/C.sol new file mode 100644 index 00000000..53921f1e --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/1/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) internal pure { + assert(true); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/10/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/10/contracts/C.sol new file mode 100644 index 00000000..eab6041d --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/10/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](2); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/11/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/11/contracts/C.sol new file mode 100644 index 00000000..c112a1fe --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/11/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` + address[] memory a = new address[](1); + assert(true); + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/12/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/12/contracts/C.sol new file mode 100644 index 00000000..97b84a0a --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/12/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` + address[] memory a = new address[](1); + a[1] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/13/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/13/contracts/C.sol new file mode 100644 index 00000000..8321873c --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/13/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` + a[0] = msg.sender; + assert(true); + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/14/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/14/contracts/C.sol new file mode 100644 index 00000000..60a4db1c --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/14/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 0; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/15/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/15/contracts/C.sol new file mode 100644 index 00000000..2567941a --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/15/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 11; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/16/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/16/contracts/C.sol new file mode 100644 index 00000000..3e409958 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/16/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a + decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/17/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/17/contracts/C.sol new file mode 100644 index 00000000..71f2d2c3 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/17/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/18/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/18/contracts/C.sol new file mode 100644 index 00000000..43c3a73b --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/18/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/19/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/19/contracts/C.sol new file mode 100644 index 00000000..697ef1c3 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/19/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/2/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/2/contracts/C.sol new file mode 100644 index 00000000..9b4e8ff7 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/2/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) internal pure { + assert(false); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/20/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/20/contracts/C.sol new file mode 100644 index 00000000..cdaa3314 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/20/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/21/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/21/contracts/C.sol new file mode 100644 index 00000000..ca8a4da8 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/21/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/22/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/22/contracts/C.sol new file mode 100644 index 00000000..3fe88f14 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/22/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/23/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/23/contracts/C.sol new file mode 100644 index 00000000..3767f986 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/23/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(false); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/24/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/24/contracts/C.sol new file mode 100644 index 00000000..63ab6010 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/24/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(c[1] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/25/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/25/contracts/C.sol new file mode 100644 index 00000000..165e0995 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/25/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` + address[] memory b = this.foo(); + assert(true); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/26/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/26/contracts/C.sol new file mode 100644 index 00000000..1a619f47 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/26/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + assert(true); + } +} diff --git a/resources/regressions/no_import_path.json/mutants/27/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/27/contracts/C.sol new file mode 100644 index 00000000..a68b62f4 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/27/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/28/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/28/contracts/C.sol new file mode 100644 index 00000000..e9094108 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/28/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/29/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/29/contracts/C.sol new file mode 100644 index 00000000..c884f370 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/29/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/3/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/3/contracts/C.sol new file mode 100644 index 00000000..25bd0cd8 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/3/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) internal pure { + assert(c[1] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/30/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/30/contracts/C.sol new file mode 100644 index 00000000..01a3dfdc --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/30/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/4/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/4/contracts/C.sol new file mode 100644 index 00000000..fd6e5b9c --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/4/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + assert(true); + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/5/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/5/contracts/C.sol new file mode 100644 index 00000000..d9f773c1 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/5/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a - b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/6/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/6/contracts/C.sol new file mode 100644 index 00000000..5ca3a37d --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/6/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a * b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/7/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/7/contracts/C.sol new file mode 100644 index 00000000..74e195f7 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/7/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a / b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/8/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/8/contracts/C.sol new file mode 100644 index 00000000..2c42d823 --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/8/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a % b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/no_import_path.json/mutants/9/contracts/C.sol b/resources/regressions/no_import_path.json/mutants/9/contracts/C.sol new file mode 100644 index 00000000..6f3eacdc --- /dev/null +++ b/resources/regressions/no_import_path.json/mutants/9/contracts/C.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +import "contracts/Imported.sol"; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](0); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_log_invalid.json/gambit_results.json b/resources/regressions/test_log_invalid.json/gambit_results.json index 1ad7397a..1ff00837 100644 --- a/resources/regressions/test_log_invalid.json/gambit_results.json +++ b/resources/regressions/test_log_invalid.json/gambit_results.json @@ -299,13 +299,25 @@ "original": "BOR/BOR.sol", "repl": "&" }, + { + "col": 38, + "description": "ElimDelegateCall", + "diff": "--- original\n+++ mutant\n@@ -12,8 +12,9 @@\n bool public delegateSuccessful;\n bytes public myData;\n \n+ /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(`\n function setVars(address _contract) public payable {\n- (bool success, ) = _contract.delegatecall(\n+ (bool success, ) = _contract.call(\n abi.encodeWithSignature(\"setVars(uint256)\", 1)\n );\n require(success, \"Delegatecall failed\");\n", + "id": "26", + "line": 16, + "name": "mutants/26/EDC/EDC.sol", + "op": "EDC", + "orig": "delegatecall", + "original": "EDC/EDC.sol", + "repl": "call" + }, { "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return a;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "26", + "id": "27", "line": 9, - "name": "mutants/26/LOR/LOR.sol", + "name": "mutants/27/LOR/LOR.sol", "op": "LOR", "orig": "a && b", "original": "LOR/LOR.sol", @@ -315,9 +327,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return b;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "27", + "id": "28", "line": 9, - "name": "mutants/27/LOR/LOR.sol", + "name": "mutants/28/LOR/LOR.sol", "op": "LOR", "orig": "a && b", "original": "LOR/LOR.sol", @@ -327,9 +339,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract LOR {\n // Expect three mutants: a, b, false\n+ /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;`\n function and(bool a, bool b) public pure returns (bool) {\n- return a && b;\n+ return false;\n }\n \n // Expect three mutants: a, b, true\n", - "id": "28", + "id": "29", "line": 9, - "name": "mutants/28/LOR/LOR.sol", + "name": "mutants/29/LOR/LOR.sol", "op": "LOR", "orig": "a && b", "original": "LOR/LOR.sol", @@ -339,9 +351,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return a;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "29", + "id": "30", "line": 14, - "name": "mutants/29/LOR/LOR.sol", + "name": "mutants/30/LOR/LOR.sol", "op": "LOR", "orig": "a || b", "original": "LOR/LOR.sol", @@ -351,9 +363,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return b;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "30", + "id": "31", "line": 14, - "name": "mutants/30/LOR/LOR.sol", + "name": "mutants/31/LOR/LOR.sol", "op": "LOR", "orig": "a || b", "original": "LOR/LOR.sol", @@ -363,9 +375,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect three mutants: a, b, true\n+ /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;`\n function or(bool a, bool b) public pure returns (bool) {\n- return a || b;\n+ return true;\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n", - "id": "31", + "id": "32", "line": 14, - "name": "mutants/31/LOR/LOR.sol", + "name": "mutants/32/LOR/LOR.sol", "op": "LOR", "orig": "a || b", "original": "LOR/LOR.sol", @@ -375,9 +387,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return x < y;\n }\n \n function not(bool a) public pure returns (bool) {\n", - "id": "32", + "id": "33", "line": 19, - "name": "mutants/32/LOR/LOR.sol", + "name": "mutants/33/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", "original": "LOR/LOR.sol", @@ -387,9 +399,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return a != (x >= y);\n }\n \n function not(bool a) public pure returns (bool) {\n", - "id": "33", + "id": "34", "line": 19, - "name": "mutants/33/LOR/LOR.sol", + "name": "mutants/34/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", "original": "LOR/LOR.sol", @@ -399,9 +411,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect three mutants, x < y, a != (x >= y), true\n+ /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));`\n function more_or(bool a, int x, int y) public pure returns (bool) {\n- return (x < y) || (a != (x >= y));\n+ return true;\n }\n \n function not(bool a) public pure returns (bool) {\n", - "id": "34", + "id": "35", "line": 19, - "name": "mutants/34/LOR/LOR.sol", + "name": "mutants/35/LOR/LOR.sol", "op": "LOR", "orig": "(x < y) || (a != (x >= y))", "original": "LOR/LOR.sol", @@ -411,9 +423,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -19,7 +19,8 @@\n return (x < y) || (a != (x >= y));\n }\n \n+ /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;`\n function not(bool a) public pure returns (bool) {\n- return !a;\n+ return true;\n }\n }\n", - "id": "35", + "id": "36", "line": 23, - "name": "mutants/35/LOR/LOR.sol", + "name": "mutants/36/LOR/LOR.sol", "op": "LOR", "orig": "!a", "original": "LOR/LOR.sol", @@ -423,9 +435,9 @@ "col": 16, "description": "LogicalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -19,7 +19,8 @@\n return (x < y) || (a != (x >= y));\n }\n \n+ /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;`\n function not(bool a) public pure returns (bool) {\n- return !a;\n+ return false;\n }\n }\n", - "id": "36", + "id": "37", "line": 23, - "name": "mutants/36/LOR/LOR.sol", + "name": "mutants/37/LOR/LOR.sol", "op": "LOR", "orig": "!a", "original": "LOR/LOR.sol", @@ -435,9 +447,9 @@ "col": 24, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -11,8 +11,9 @@\n int256 zero_s = 0;\n \n // Expect 1 mutant: 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;`\n function unsigned_zero() public pure returns (uint256) {\n- uint256 zero = 0;\n+ uint256 zero = 1;\n return zero;\n }\n \n", - "id": "37", + "id": "38", "line": 15, - "name": "mutants/37/LVR/LVR.sol", + "name": "mutants/38/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "LVR/LVR.sol", @@ -447,9 +459,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 0;\n return one;\n }\n \n", - "id": "38", + "id": "39", "line": 21, - "name": "mutants/38/LVR/LVR.sol", + "name": "mutants/39/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "LVR/LVR.sol", @@ -459,9 +471,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -17,8 +17,9 @@\n }\n \n // Expect 2 mutant: 0, 2\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;`\n function unsigned_one() public pure returns (uint256) {\n- uint256 one = 1;\n+ uint256 one = 2;\n return one;\n }\n \n", - "id": "39", + "id": "40", "line": 21, - "name": "mutants/39/LVR/LVR.sol", + "name": "mutants/40/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "LVR/LVR.sol", @@ -471,9 +483,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 0;\n return neg_one;\n }\n \n", - "id": "40", + "id": "41", "line": 27, - "name": "mutants/40/LVR/LVR.sol", + "name": "mutants/41/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "LVR/LVR.sol", @@ -483,9 +495,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = 1;\n return neg_one;\n }\n \n", - "id": "41", + "id": "42", "line": 27, - "name": "mutants/41/LVR/LVR.sol", + "name": "mutants/42/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "LVR/LVR.sol", @@ -495,9 +507,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -23,8 +23,9 @@\n }\n \n // Expect 2 mutants: 0, 1\n+ /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;`\n function signed_neg_one() public pure returns (int256) {\n- int256 neg_one = -1;\n+ int256 neg_one = -2;\n return neg_one;\n }\n \n", - "id": "42", + "id": "43", "line": 27, - "name": "mutants/42/LVR/LVR.sol", + "name": "mutants/43/LVR/LVR.sol", "op": "LVR", "orig": "-1", "original": "LVR/LVR.sol", @@ -507,9 +519,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 0;\n return pos_one;\n }\n \n", - "id": "43", + "id": "44", "line": 33, - "name": "mutants/43/LVR/LVR.sol", + "name": "mutants/44/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "LVR/LVR.sol", @@ -519,9 +531,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = -1;\n return pos_one;\n }\n \n", - "id": "44", + "id": "45", "line": 33, - "name": "mutants/44/LVR/LVR.sol", + "name": "mutants/45/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "LVR/LVR.sol", @@ -531,9 +543,9 @@ "col": 26, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -29,8 +29,9 @@\n }\n \n // Expect 2 mutants: -1, 0\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;`\n function signed_pos_one() public pure returns (int256) {\n- int256 pos_one = 1;\n+ int256 pos_one = 2;\n return pos_one;\n }\n \n", - "id": "45", + "id": "46", "line": 33, - "name": "mutants/45/LVR/LVR.sol", + "name": "mutants/46/LVR/LVR.sol", "op": "LVR", "orig": "1", "original": "LVR/LVR.sol", @@ -543,9 +555,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = -1;\n return zero;\n }\n }\n", - "id": "46", + "id": "47", "line": 39, - "name": "mutants/46/LVR/LVR.sol", + "name": "mutants/47/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "LVR/LVR.sol", @@ -555,9 +567,9 @@ "col": 23, "description": "LiteralValueReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 2 mutants: -1, 1\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;`\n function signed_zero() public pure returns (int256) {\n- int256 zero = 0;\n+ int256 zero = 1;\n return zero;\n }\n }\n", - "id": "47", + "id": "48", "line": 39, - "name": "mutants/47/LVR/LVR.sol", + "name": "mutants/48/LVR/LVR.sol", "op": "LVR", "orig": "0", "original": "LVR/LVR.sol", @@ -567,9 +579,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x <= y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "48", + "id": "49", "line": 9, - "name": "mutants/48/ROR/ROR.sol", + "name": "mutants/49/ROR/ROR.sol", "op": "ROR", "orig": "<", "original": "ROR/ROR.sol", @@ -579,9 +591,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "49", + "id": "50", "line": 9, - "name": "mutants/49/ROR/ROR.sol", + "name": "mutants/50/ROR/ROR.sol", "op": "ROR", "orig": "<", "original": "ROR/ROR.sol", @@ -591,9 +603,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -5,8 +5,9 @@\n // This contract provides test functions for relational operator replacement (ROR)\n contract ROR {\n // Expect 3 mutants: x <= y, x != y, false\n+ /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;`\n function less(uint256 x, uint256 y) public pure returns (bool) {\n- return x < y;\n+ return false;\n }\n \n // Expect 3 mutants: x < y, x == y, true\n", - "id": "50", + "id": "51", "line": 9, - "name": "mutants/50/ROR/ROR.sol", + "name": "mutants/51/ROR/ROR.sol", "op": "ROR", "orig": "x < y", "original": "ROR/ROR.sol", @@ -603,9 +615,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x < y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "51", + "id": "52", "line": 14, - "name": "mutants/51/ROR/ROR.sol", + "name": "mutants/52/ROR/ROR.sol", "op": "ROR", "orig": "<=", "original": "ROR/ROR.sol", @@ -615,9 +627,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "52", + "id": "53", "line": 14, - "name": "mutants/52/ROR/ROR.sol", + "name": "mutants/53/ROR/ROR.sol", "op": "ROR", "orig": "<=", "original": "ROR/ROR.sol", @@ -627,9 +639,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect 3 mutants: x < y, x == y, true\n+ /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;`\n function less_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x <= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n", - "id": "53", + "id": "54", "line": 14, - "name": "mutants/53/ROR/ROR.sol", + "name": "mutants/54/ROR/ROR.sol", "op": "ROR", "orig": "x <= y", "original": "ROR/ROR.sol", @@ -639,9 +651,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x >= y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "54", + "id": "55", "line": 19, - "name": "mutants/54/ROR/ROR.sol", + "name": "mutants/55/ROR/ROR.sol", "op": "ROR", "orig": ">", "original": "ROR/ROR.sol", @@ -651,9 +663,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return x != y;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "55", + "id": "56", "line": 19, - "name": "mutants/55/ROR/ROR.sol", + "name": "mutants/56/ROR/ROR.sol", "op": "ROR", "orig": ">", "original": "ROR/ROR.sol", @@ -663,9 +675,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n }\n \n // Expect 3 mutants: x >= y, x != y, false\n+ /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;`\n function more(uint256 x, uint256 y) public pure returns (bool) {\n- return x > y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x == y, true\n", - "id": "56", + "id": "57", "line": 19, - "name": "mutants/56/ROR/ROR.sol", + "name": "mutants/57/ROR/ROR.sol", "op": "ROR", "orig": "x > y", "original": "ROR/ROR.sol", @@ -675,9 +687,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x > y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "57", + "id": "58", "line": 24, - "name": "mutants/57/ROR/ROR.sol", + "name": "mutants/58/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "ROR/ROR.sol", @@ -687,9 +699,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return x == y;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "58", + "id": "59", "line": 24, - "name": "mutants/58/ROR/ROR.sol", + "name": "mutants/59/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "ROR/ROR.sol", @@ -699,9 +711,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n // Expect 3 mutants: x > y, x == y, true\n+ /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;`\n function more_equal(uint256 x, uint256 y) public pure returns (bool) {\n- return x >= y;\n+ return true;\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n", - "id": "59", + "id": "60", "line": 24, - "name": "mutants/59/ROR/ROR.sol", + "name": "mutants/60/ROR/ROR.sol", "op": "ROR", "orig": "x >= y", "original": "ROR/ROR.sol", @@ -711,9 +723,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x <= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "60", + "id": "61", "line": 29, - "name": "mutants/60/ROR/ROR.sol", + "name": "mutants/61/ROR/ROR.sol", "op": "ROR", "orig": "==", "original": "ROR/ROR.sol", @@ -723,9 +735,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return x >= y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "61", + "id": "62", "line": 29, - "name": "mutants/61/ROR/ROR.sol", + "name": "mutants/62/ROR/ROR.sol", "op": "ROR", "orig": "==", "original": "ROR/ROR.sol", @@ -735,9 +747,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n }\n \n // Expect 3 mutants: x >= y, x <= y, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "62", + "id": "63", "line": 29, - "name": "mutants/62/ROR/ROR.sol", + "name": "mutants/63/ROR/ROR.sol", "op": "ROR", "orig": "x == y", "original": "ROR/ROR.sol", @@ -747,9 +759,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;`\n function equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x == y;\n+ return false;\n }\n \n // Expect 3 mutants: x > y, x < y, true\n", - "id": "63", + "id": "64", "line": 34, - "name": "mutants/63/ROR/ROR.sol", + "name": "mutants/64/ROR/ROR.sol", "op": "ROR", "orig": "x == y", "original": "ROR/ROR.sol", @@ -759,9 +771,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x < y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "64", + "id": "65", "line": 39, - "name": "mutants/64/ROR/ROR.sol", + "name": "mutants/65/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "ROR/ROR.sol", @@ -771,9 +783,9 @@ "col": 18, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return x > y;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "65", + "id": "66", "line": 39, - "name": "mutants/65/ROR/ROR.sol", + "name": "mutants/66/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "ROR/ROR.sol", @@ -783,9 +795,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -35,8 +35,9 @@\n }\n \n // Expect 3 mutants: x > y, x < y, true\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 2 mutants: true, false\n", - "id": "66", + "id": "67", "line": 39, - "name": "mutants/66/ROR/ROR.sol", + "name": "mutants/67/ROR/ROR.sol", "op": "ROR", "orig": "x != y", "original": "ROR/ROR.sol", @@ -795,9 +807,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -40,8 +40,9 @@\n }\n \n // Expect 2 mutants: true, false\n+ /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;`\n function not_equal_not_ord(bool x, bool y) public pure returns (bool) {\n- return x != y;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) == z, true\n", - "id": "67", + "id": "68", "line": 44, - "name": "mutants/67/ROR/ROR.sol", + "name": "mutants/68/ROR/ROR.sol", "op": "ROR", "orig": "x != y", "original": "ROR/ROR.sol", @@ -807,9 +819,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) > z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "68", + "id": "69", "line": 53, - "name": "mutants/68/ROR/ROR.sol", + "name": "mutants/69/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "ROR/ROR.sol", @@ -819,9 +831,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return (x + y) == z;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "69", + "id": "70", "line": 53, - "name": "mutants/69/ROR/ROR.sol", + "name": "mutants/70/ROR/ROR.sol", "op": "ROR", "orig": ">=", "original": "ROR/ROR.sol", @@ -831,9 +843,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -49,8 +49,9 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;`\n ) public pure returns (bool) {\n- return (x + y) >= z;\n+ return true;\n }\n \n // Expect 3 mutants: (x + y) > z, (x + y) < z, true\n", - "id": "70", + "id": "71", "line": 53, - "name": "mutants/70/ROR/ROR.sol", + "name": "mutants/71/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) >= z", "original": "ROR/ROR.sol", @@ -843,9 +855,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) < z;\n }\n }\n", - "id": "71", + "id": "72", "line": 62, - "name": "mutants/71/ROR/ROR.sol", + "name": "mutants/72/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "ROR/ROR.sol", @@ -855,9 +867,9 @@ "col": 24, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return (x + y) > z;\n }\n }\n", - "id": "72", + "id": "73", "line": 62, - "name": "mutants/72/ROR/ROR.sol", + "name": "mutants/73/ROR/ROR.sol", "op": "ROR", "orig": "!=", "original": "ROR/ROR.sol", @@ -867,9 +879,9 @@ "col": 16, "description": "RelationalOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -58,7 +58,8 @@\n uint256 x,\n uint256 y,\n uint256 z\n+ /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;`\n ) public pure returns (bool) {\n- return (x + y) != z;\n+ return true;\n }\n }\n", - "id": "73", + "id": "74", "line": 62, - "name": "mutants/73/ROR/ROR.sol", + "name": "mutants/74/ROR/ROR.sol", "op": "ROR", "orig": "(x + y) != z", "original": "ROR/ROR.sol", @@ -879,9 +891,9 @@ "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n }\n \n // Expect a single mutant: -x\n+ /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;`\n function signed_bw_not(int256 x) public pure returns (int256) {\n- return ~x;\n+ return -x;\n }\n \n // Expect a single mutant: ~x\n", - "id": "74", + "id": "75", "line": 14, - "name": "mutants/74/UOR/UOR.sol", + "name": "mutants/75/UOR/UOR.sol", "op": "UOR", "orig": "~", "original": "UOR/UOR.sol", @@ -891,9 +903,9 @@ "col": 16, "description": "UnaryOperatorReplacement", "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n }\n \n // Expect a single mutant: ~x\n+ /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;`\n function signed_neg(int256 x) public pure returns (int256) {\n- return -x;\n+ return ~x;\n }\n }\n", - "id": "75", + "id": "76", "line": 19, - "name": "mutants/75/UOR/UOR.sol", + "name": "mutants/76/UOR/UOR.sol", "op": "UOR", "orig": "-", "original": "UOR/UOR.sol", diff --git a/resources/regressions/test_log_invalid.json/invalid.log b/resources/regressions/test_log_invalid.json/invalid.log index 0cbf1ac2..c9994f05 100644 --- a/resources/regressions/test_log_invalid.json/invalid.log +++ b/resources/regressions/test_log_invalid.json/invalid.log @@ -1 +1 @@ -1,UOR,/Users/chandra/research/gambit/benchmarks/Ops/UOR/UOR.sol,8:15,~,- +1,UOR,UOR/UOR.sol,8:15,~,- diff --git a/resources/regressions/test_log_invalid.json/mutants.log b/resources/regressions/test_log_invalid.json/mutants.log index f0068ce4..e3828c3d 100644 --- a/resources/regressions/test_log_invalid.json/mutants.log +++ b/resources/regressions/test_log_invalid.json/mutants.log @@ -23,53 +23,54 @@ 23,BOR,BOR/BOR.sol,10:18,|,& 24,BOR,BOR/BOR.sol,16:18,&,| 25,BOR,BOR/BOR.sol,22:18,^,& -26,LOR,LOR/LOR.sol,9:16,a && b,a -27,LOR,LOR/LOR.sol,9:16,a && b,b -28,LOR,LOR/LOR.sol,9:16,a && b,false -29,LOR,LOR/LOR.sol,14:16,a || b,a -30,LOR,LOR/LOR.sol,14:16,a || b,b -31,LOR,LOR/LOR.sol,14:16,a || b,true -32,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y -33,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) -34,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true -35,LOR,LOR/LOR.sol,23:16,!a,true -36,LOR,LOR/LOR.sol,23:16,!a,false -37,LVR,LVR/LVR.sol,15:24,0,1 -38,LVR,LVR/LVR.sol,21:23,1,0 -39,LVR,LVR/LVR.sol,21:23,1,2 -40,LVR,LVR/LVR.sol,27:26,-1,0 -41,LVR,LVR/LVR.sol,27:26,-1,1 -42,LVR,LVR/LVR.sol,27:26,-1,-2 -43,LVR,LVR/LVR.sol,33:26,1,0 -44,LVR,LVR/LVR.sol,33:26,1,-1 -45,LVR,LVR/LVR.sol,33:26,1,2 -46,LVR,LVR/LVR.sol,39:23,0,-1 -47,LVR,LVR/LVR.sol,39:23,0,1 -48,ROR,ROR/ROR.sol,9:18,<,<= -49,ROR,ROR/ROR.sol,9:18,<,!= -50,ROR,ROR/ROR.sol,9:16,x < y,false -51,ROR,ROR/ROR.sol,14:18,<=,< -52,ROR,ROR/ROR.sol,14:18,<=,== -53,ROR,ROR/ROR.sol,14:16,x <= y,true -54,ROR,ROR/ROR.sol,19:18,>,>= -55,ROR,ROR/ROR.sol,19:18,>,!= -56,ROR,ROR/ROR.sol,19:16,x > y,false -57,ROR,ROR/ROR.sol,24:18,>=,> -58,ROR,ROR/ROR.sol,24:18,>=,== -59,ROR,ROR/ROR.sol,24:16,x >= y,true -60,ROR,ROR/ROR.sol,29:18,==,<= -61,ROR,ROR/ROR.sol,29:18,==,>= -62,ROR,ROR/ROR.sol,29:16,x == y,false -63,ROR,ROR/ROR.sol,34:16,x == y,false -64,ROR,ROR/ROR.sol,39:18,!=,< -65,ROR,ROR/ROR.sol,39:18,!=,> -66,ROR,ROR/ROR.sol,39:16,x != y,true -67,ROR,ROR/ROR.sol,44:16,x != y,true -68,ROR,ROR/ROR.sol,53:24,>=,> -69,ROR,ROR/ROR.sol,53:24,>=,== -70,ROR,ROR/ROR.sol,53:16,(x + y) >= z,true -71,ROR,ROR/ROR.sol,62:24,!=,< -72,ROR,ROR/ROR.sol,62:24,!=,> -73,ROR,ROR/ROR.sol,62:16,(x + y) != z,true -74,UOR,UOR/UOR.sol,14:16,~,- -75,UOR,UOR/UOR.sol,19:16,-,~ +26,EDC,EDC/EDC.sol,16:38,delegatecall,call +27,LOR,LOR/LOR.sol,9:16,a && b,a +28,LOR,LOR/LOR.sol,9:16,a && b,b +29,LOR,LOR/LOR.sol,9:16,a && b,false +30,LOR,LOR/LOR.sol,14:16,a || b,a +31,LOR,LOR/LOR.sol,14:16,a || b,b +32,LOR,LOR/LOR.sol,14:16,a || b,true +33,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),x < y +34,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),a != (x >= y) +35,LOR,LOR/LOR.sol,19:16,(x < y) || (a != (x >= y)),true +36,LOR,LOR/LOR.sol,23:16,!a,true +37,LOR,LOR/LOR.sol,23:16,!a,false +38,LVR,LVR/LVR.sol,15:24,0,1 +39,LVR,LVR/LVR.sol,21:23,1,0 +40,LVR,LVR/LVR.sol,21:23,1,2 +41,LVR,LVR/LVR.sol,27:26,-1,0 +42,LVR,LVR/LVR.sol,27:26,-1,1 +43,LVR,LVR/LVR.sol,27:26,-1,-2 +44,LVR,LVR/LVR.sol,33:26,1,0 +45,LVR,LVR/LVR.sol,33:26,1,-1 +46,LVR,LVR/LVR.sol,33:26,1,2 +47,LVR,LVR/LVR.sol,39:23,0,-1 +48,LVR,LVR/LVR.sol,39:23,0,1 +49,ROR,ROR/ROR.sol,9:18,<,<= +50,ROR,ROR/ROR.sol,9:18,<,!= +51,ROR,ROR/ROR.sol,9:16,x < y,false +52,ROR,ROR/ROR.sol,14:18,<=,< +53,ROR,ROR/ROR.sol,14:18,<=,== +54,ROR,ROR/ROR.sol,14:16,x <= y,true +55,ROR,ROR/ROR.sol,19:18,>,>= +56,ROR,ROR/ROR.sol,19:18,>,!= +57,ROR,ROR/ROR.sol,19:16,x > y,false +58,ROR,ROR/ROR.sol,24:18,>=,> +59,ROR,ROR/ROR.sol,24:18,>=,== +60,ROR,ROR/ROR.sol,24:16,x >= y,true +61,ROR,ROR/ROR.sol,29:18,==,<= +62,ROR,ROR/ROR.sol,29:18,==,>= +63,ROR,ROR/ROR.sol,29:16,x == y,false +64,ROR,ROR/ROR.sol,34:16,x == y,false +65,ROR,ROR/ROR.sol,39:18,!=,< +66,ROR,ROR/ROR.sol,39:18,!=,> +67,ROR,ROR/ROR.sol,39:16,x != y,true +68,ROR,ROR/ROR.sol,44:16,x != y,true +69,ROR,ROR/ROR.sol,53:24,>=,> +70,ROR,ROR/ROR.sol,53:24,>=,== +71,ROR,ROR/ROR.sol,53:16,(x + y) >= z,true +72,ROR,ROR/ROR.sol,62:24,!=,< +73,ROR,ROR/ROR.sol,62:24,!=,> +74,ROR,ROR/ROR.sol,62:16,(x + y) != z,true +75,UOR,UOR/UOR.sol,14:16,~,- +76,UOR,UOR/UOR.sol,19:16,-,~ diff --git a/resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol b/resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol new file mode 100644 index 00000000..19754976 --- /dev/null +++ b/resources/regressions/test_log_invalid.json/mutants/26/EDC/EDC.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.13; + +contract Helper { + function setVars(uint _num) public payable {} +} + +contract EDC { + uint public num; + address public sender; + uint public value; + bool public delegateSuccessful; + bytes public myData; + + /// ElimDelegateCall(`delegatecall` |==> `call`) of: `(bool success, ) = _contract.delegatecall(` + function setVars(address _contract) public payable { + (bool success, ) = _contract.call( + abi.encodeWithSignature("setVars(uint256)", 1) + ); + require(success, "Delegatecall failed"); + } +} diff --git a/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol index c97e8675..01536cd6 100644 --- a/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/27/LOR/LOR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` + /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return b; + return a; } // Expect three mutants: a, b, true diff --git a/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol index 492dc45c..c97e8675 100644 --- a/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/28/LOR/LOR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` + /// LogicalOperatorReplacement(`a && b` |==> `b`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return false; + return b; } // Expect three mutants: a, b, true diff --git a/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol index 7f62ba05..492dc45c 100644 --- a/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/29/LOR/LOR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false + /// LogicalOperatorReplacement(`a && b` |==> `false`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a && b; + return false; } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a; + return a || b; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol index efb5d5a8..7f62ba05 100644 --- a/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/30/LOR/LOR.sol @@ -10,9 +10,9 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` + /// LogicalOperatorReplacement(`a || b` |==> `a`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return b; + return a; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol index 7d3c811a..efb5d5a8 100644 --- a/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/31/LOR/LOR.sol @@ -10,9 +10,9 @@ contract LOR { } // Expect three mutants: a, b, true - /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` + /// LogicalOperatorReplacement(`a || b` |==> `b`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return true; + return b; } // Expect three mutants, x < y, a != (x >= y), true diff --git a/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol index 4ceda907..7d3c811a 100644 --- a/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/32/LOR/LOR.sol @@ -10,14 +10,14 @@ contract LOR { } // Expect three mutants: a, b, true + /// LogicalOperatorReplacement(`a || b` |==> `true`) of: `return a || b;` function or(bool a, bool b) public pure returns (bool) { - return a || b; + return true; } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return x < y; + return (x < y) || (a != (x >= y)); } function not(bool a) public pure returns (bool) { diff --git a/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol index 690fae8d..4ceda907 100644 --- a/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/33/LOR/LOR.sol @@ -15,9 +15,9 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `x < y`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return a != (x >= y); + return x < y; } function not(bool a) public pure returns (bool) { diff --git a/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol index 2ef15642..690fae8d 100644 --- a/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/34/LOR/LOR.sol @@ -15,9 +15,9 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true - /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `a != (x >= y)`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return true; + return a != (x >= y); } function not(bool a) public pure returns (bool) { diff --git a/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol index be0e75f4..2ef15642 100644 --- a/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/35/LOR/LOR.sol @@ -15,12 +15,12 @@ contract LOR { } // Expect three mutants, x < y, a != (x >= y), true + /// LogicalOperatorReplacement(`(x < y) || (a != (x >= y))` |==> `true`) of: `return (x < y) || (a != (x >= y));` function more_or(bool a, int x, int y) public pure returns (bool) { - return (x < y) || (a != (x >= y)); + return true; } - /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;` function not(bool a) public pure returns (bool) { - return true; + return !a; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol index 35ee5751..be0e75f4 100644 --- a/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/36/LOR/LOR.sol @@ -19,8 +19,8 @@ contract LOR { return (x < y) || (a != (x >= y)); } - /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;` + /// LogicalOperatorReplacement(`!a` |==> `true`) of: `return !a;` function not(bool a) public pure returns (bool) { - return false; + return true; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/26/LOR/LOR.sol b/resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol similarity index 85% rename from resources/regressions/test_log_invalid.json/mutants/26/LOR/LOR.sol rename to resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol index 01536cd6..35ee5751 100644 --- a/resources/regressions/test_log_invalid.json/mutants/26/LOR/LOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/37/LOR/LOR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract LOR { // Expect three mutants: a, b, false - /// LogicalOperatorReplacement(`a && b` |==> `a`) of: `return a && b;` function and(bool a, bool b) public pure returns (bool) { - return a; + return a && b; } // Expect three mutants: a, b, true @@ -20,7 +19,8 @@ contract LOR { return (x < y) || (a != (x >= y)); } + /// LogicalOperatorReplacement(`!a` |==> `false`) of: `return !a;` function not(bool a) public pure returns (bool) { - return !a; + return false; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol index f2cb8295..e06271e2 100644 --- a/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/38/LVR/LVR.sol @@ -11,15 +11,15 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 0; + uint256 zero = 1; return zero; } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 0; + uint256 one = 1; return one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol index d18c6c48..f2cb8295 100644 --- a/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/39/LVR/LVR.sol @@ -17,9 +17,9 @@ contract LVR { } // Expect 2 mutant: 0, 2 - /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` + /// LiteralValueReplacement(`1` |==> `0`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 2; + uint256 one = 0; return one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol index 173dc540..d18c6c48 100644 --- a/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/40/LVR/LVR.sol @@ -17,15 +17,15 @@ contract LVR { } // Expect 2 mutant: 0, 2 + /// LiteralValueReplacement(`1` |==> `2`) of: `uint256 one = 1;` function unsigned_one() public pure returns (uint256) { - uint256 one = 1; + uint256 one = 2; return one; } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 0; + int256 neg_one = -1; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol index 72ffaedf..173dc540 100644 --- a/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/41/LVR/LVR.sol @@ -23,9 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` + /// LiteralValueReplacement(`-1` |==> `0`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = 1; + int256 neg_one = 0; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol index 1e24417f..72ffaedf 100644 --- a/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/42/LVR/LVR.sol @@ -23,9 +23,9 @@ contract LVR { } // Expect 2 mutants: 0, 1 - /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` + /// LiteralValueReplacement(`-1` |==> `1`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -2; + int256 neg_one = 1; return neg_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol index e088a4e3..1e24417f 100644 --- a/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/43/LVR/LVR.sol @@ -23,15 +23,15 @@ contract LVR { } // Expect 2 mutants: 0, 1 + /// LiteralValueReplacement(`-1` |==> `-2`) of: `int256 neg_one = -1;` function signed_neg_one() public pure returns (int256) { - int256 neg_one = -1; + int256 neg_one = -2; return neg_one; } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 0; + int256 pos_one = 1; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol index 2407079e..e088a4e3 100644 --- a/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/44/LVR/LVR.sol @@ -29,9 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` + /// LiteralValueReplacement(`1` |==> `0`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = -1; + int256 pos_one = 0; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol index a5082f3b..2407079e 100644 --- a/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/45/LVR/LVR.sol @@ -29,9 +29,9 @@ contract LVR { } // Expect 2 mutants: -1, 0 - /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` + /// LiteralValueReplacement(`1` |==> `-1`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 2; + int256 pos_one = -1; return pos_one; } diff --git a/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol index 22af4185..a5082f3b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/46/LVR/LVR.sol @@ -29,15 +29,15 @@ contract LVR { } // Expect 2 mutants: -1, 0 + /// LiteralValueReplacement(`1` |==> `2`) of: `int256 pos_one = 1;` function signed_pos_one() public pure returns (int256) { - int256 pos_one = 1; + int256 pos_one = 2; return pos_one; } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = -1; + int256 zero = 0; return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol index e241973d..22af4185 100644 --- a/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/47/LVR/LVR.sol @@ -35,9 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` + /// LiteralValueReplacement(`0` |==> `-1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 1; + int256 zero = -1; return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol b/resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol similarity index 89% rename from resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol rename to resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol index e06271e2..e241973d 100644 --- a/resources/regressions/test_log_invalid.json/mutants/37/LVR/LVR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/48/LVR/LVR.sol @@ -11,9 +11,8 @@ contract LVR { int256 zero_s = 0; // Expect 1 mutant: 1 - /// LiteralValueReplacement(`0` |==> `1`) of: `uint256 zero = 0;` function unsigned_zero() public pure returns (uint256) { - uint256 zero = 1; + uint256 zero = 0; return zero; } @@ -36,8 +35,9 @@ contract LVR { } // Expect 2 mutants: -1, 1 + /// LiteralValueReplacement(`0` |==> `1`) of: `int256 zero = 0;` function signed_zero() public pure returns (int256) { - int256 zero = 0; + int256 zero = 1; return zero; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol index 0c05265c..dec84f24 100644 --- a/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/49/ROR/ROR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` + /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x <= y; } // Expect 3 mutants: x < y, x == y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol index 6141947b..0c05265c 100644 --- a/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/50/ROR/ROR.sol @@ -5,9 +5,9 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` + /// RelationalOperatorReplacement(`<` |==> `!=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x != y; } // Expect 3 mutants: x < y, x == y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol index 9f8ccd04..6141947b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/51/ROR/ROR.sol @@ -5,14 +5,14 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false + /// RelationalOperatorReplacement(`x < y` |==> `false`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return false; } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x <= y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol index 18e38f34..9f8ccd04 100644 --- a/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/52/ROR/ROR.sol @@ -10,9 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` + /// RelationalOperatorReplacement(`<=` |==> `<`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x < y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol index 55dd7c79..18e38f34 100644 --- a/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/53/ROR/ROR.sol @@ -10,9 +10,9 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true - /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` + /// RelationalOperatorReplacement(`<=` |==> `==`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x == y; } // Expect 3 mutants: x >= y, x != y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol index 52949d03..55dd7c79 100644 --- a/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/54/ROR/ROR.sol @@ -10,14 +10,14 @@ contract ROR { } // Expect 3 mutants: x < y, x == y, true + /// RelationalOperatorReplacement(`x <= y` |==> `true`) of: `return x <= y;` function less_equal(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return true; } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x > y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol index a3e16320..52949d03 100644 --- a/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/55/ROR/ROR.sol @@ -15,9 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` + /// RelationalOperatorReplacement(`>` |==> `>=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return x >= y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol index a9024427..a3e16320 100644 --- a/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/56/ROR/ROR.sol @@ -15,9 +15,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false - /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` + /// RelationalOperatorReplacement(`>` |==> `!=`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x != y; } // Expect 3 mutants: x > y, x == y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol index 337c9a92..a9024427 100644 --- a/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/57/ROR/ROR.sol @@ -15,14 +15,14 @@ contract ROR { } // Expect 3 mutants: x >= y, x != y, false + /// RelationalOperatorReplacement(`x > y` |==> `false`) of: `return x > y;` function more(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return false; } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x >= y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol index 7c02b73b..337c9a92 100644 --- a/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/58/ROR/ROR.sol @@ -20,9 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return x > y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol index 3d299dfb..7c02b73b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/59/ROR/ROR.sol @@ -20,9 +20,9 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true - /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x == y; } // Expect 3 mutants: x >= y, x <= y, false diff --git a/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol index c865469b..3d299dfb 100644 --- a/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/60/ROR/ROR.sol @@ -20,14 +20,14 @@ contract ROR { } // Expect 3 mutants: x > y, x == y, true + /// RelationalOperatorReplacement(`x >= y` |==> `true`) of: `return x >= y;` function more_equal(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return true; } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x == y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol index 8cdc1c10..c865469b 100644 --- a/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/61/ROR/ROR.sol @@ -25,9 +25,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` + /// RelationalOperatorReplacement(`==` |==> `<=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x >= y; + return x <= y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol index de6a4360..8cdc1c10 100644 --- a/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/62/ROR/ROR.sol @@ -25,9 +25,9 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` + /// RelationalOperatorReplacement(`==` |==> `>=`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return false; + return x >= y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol index ab40e6c9..de6a4360 100644 --- a/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/63/ROR/ROR.sol @@ -25,14 +25,14 @@ contract ROR { } // Expect 3 mutants: x >= y, x <= y, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x == y; + return false; } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return false; + return x == y; } // Expect 3 mutants: x > y, x < y, true diff --git a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol index f42e7b7e..ab40e6c9 100644 --- a/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/64/ROR/ROR.sol @@ -30,14 +30,14 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x == y` |==> `false`) of: `return x == y;` function equal_not_ord(bool x, bool y) public pure returns (bool) { - return x == y; + return false; } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x < y; + return x != y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol index e5f50322..f42e7b7e 100644 --- a/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/65/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x > y; + return x < y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol index 83684484..e5f50322 100644 --- a/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/66/ROR/ROR.sol @@ -35,9 +35,9 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return true; + return x > y; } // Expect 2 mutants: true, false diff --git a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol index 3ae92133..83684484 100644 --- a/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/67/ROR/ROR.sol @@ -35,14 +35,14 @@ contract ROR { } // Expect 3 mutants: x > y, x < y, true + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_ord(uint256 x, uint256 y) public pure returns (bool) { - return x != y; + return true; } // Expect 2 mutants: true, false - /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return true; + return x != y; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol index bdeac3af..3ae92133 100644 --- a/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/68/ROR/ROR.sol @@ -40,8 +40,9 @@ contract ROR { } // Expect 2 mutants: true, false + /// RelationalOperatorReplacement(`x != y` |==> `true`) of: `return x != y;` function not_equal_not_ord(bool x, bool y) public pure returns (bool) { - return x != y; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) == z, true @@ -49,9 +50,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) >= z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol index 430379f6..bdeac3af 100644 --- a/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/69/ROR/ROR.sol @@ -49,9 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` + /// RelationalOperatorReplacement(`>=` |==> `>`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) == z; + return (x + y) > z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol index 3d67c155..430379f6 100644 --- a/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/70/ROR/ROR.sol @@ -49,9 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` + /// RelationalOperatorReplacement(`>=` |==> `==`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return true; + return (x + y) == z; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true diff --git a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol index 13612614..3d67c155 100644 --- a/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/71/ROR/ROR.sol @@ -49,8 +49,9 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`(x + y) >= z` |==> `true`) of: `return (x + y) >= z;` ) public pure returns (bool) { - return (x + y) >= z; + return true; } // Expect 3 mutants: (x + y) > z, (x + y) < z, true @@ -58,8 +59,7 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) < z; + return (x + y) != z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol index dd0c83ca..13612614 100644 --- a/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/72/ROR/ROR.sol @@ -58,8 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` + /// RelationalOperatorReplacement(`!=` |==> `<`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) > z; + return (x + y) < z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol index 84889114..dd0c83ca 100644 --- a/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/73/ROR/ROR.sol @@ -58,8 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z - /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` + /// RelationalOperatorReplacement(`!=` |==> `>`) of: `return (x + y) != z;` ) public pure returns (bool) { - return true; + return (x + y) > z; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol b/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol similarity index 92% rename from resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol rename to resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol index dec84f24..84889114 100644 --- a/resources/regressions/test_log_invalid.json/mutants/48/ROR/ROR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/74/ROR/ROR.sol @@ -5,9 +5,8 @@ pragma experimental ABIEncoderV2; // This contract provides test functions for relational operator replacement (ROR) contract ROR { // Expect 3 mutants: x <= y, x != y, false - /// RelationalOperatorReplacement(`<` |==> `<=`) of: `return x < y;` function less(uint256 x, uint256 y) public pure returns (bool) { - return x <= y; + return x < y; } // Expect 3 mutants: x < y, x == y, true @@ -59,7 +58,8 @@ contract ROR { uint256 x, uint256 y, uint256 z + /// RelationalOperatorReplacement(`(x + y) != z` |==> `true`) of: `return (x + y) != z;` ) public pure returns (bool) { - return (x + y) != z; + return true; } } diff --git a/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol index 84eae0ca..50d09571 100644 --- a/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/75/UOR/UOR.sol @@ -10,13 +10,13 @@ contract UOR { } // Expect a single mutant: -x + /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;` function signed_bw_not(int256 x) public pure returns (int256) { - return ~x; + return -x; } // Expect a single mutant: ~x - /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;` function signed_neg(int256 x) public pure returns (int256) { - return ~x; + return -x; } } diff --git a/resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol b/resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol similarity index 83% rename from resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol rename to resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol index 50d09571..84eae0ca 100644 --- a/resources/regressions/all_ops.json/mutants/74/UOR/UOR.sol +++ b/resources/regressions/test_log_invalid.json/mutants/76/UOR/UOR.sol @@ -10,13 +10,13 @@ contract UOR { } // Expect a single mutant: -x - /// UnaryOperatorReplacement(`~` |==> `-`) of: `return ~x;` function signed_bw_not(int256 x) public pure returns (int256) { - return -x; + return ~x; } // Expect a single mutant: ~x + /// UnaryOperatorReplacement(`-` |==> `~`) of: `return -x;` function signed_neg(int256 x) public pure returns (int256) { - return -x; + return ~x; } } diff --git a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json index 0637a088..062246f9 100644 --- a/resources/regressions/test_multiple_contracts_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_1.json/gambit_results.json @@ -1 +1,170 @@ -[] \ No newline at end of file +[ + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "1", + "line": 7, + "name": "mutants/1/MultipleContracts/C.sol", + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 16, + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "2", + "line": 7, + "name": "mutants/2/MultipleContracts/C.sol", + "op": "ROR", + "orig": "c[0] == e", + "original": "MultipleContracts/C.sol", + "repl": "false" + }, + { + "col": 18, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "3", + "line": 7, + "name": "mutants/3/MultipleContracts/C.sol", + "op": "LVR", + "orig": "0", + "original": "MultipleContracts/C.sol", + "repl": "1" + }, + { + "col": 21, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "4", + "line": 23, + "name": "mutants/4/MultipleContracts/C.sol", + "op": "LVR", + "orig": "10", + "original": "MultipleContracts/C.sol", + "repl": "0" + }, + { + "col": 21, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "5", + "line": 23, + "name": "mutants/5/MultipleContracts/C.sol", + "op": "LVR", + "orig": "10", + "original": "MultipleContracts/C.sol", + "repl": "11" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "id": "6", + "line": 24, + "name": "mutants/6/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "+" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "7", + "line": 24, + "name": "mutants/7/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "-" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "8", + "line": 24, + "name": "mutants/8/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "*" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "9", + "line": 24, + "name": "mutants/9/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "/" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "10", + "line": 24, + "name": "mutants/10/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "%" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "11", + "line": 25, + "name": "mutants/11/MultipleContracts/C.sol", + "op": "STD", + "orig": "return res", + "original": "MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "12", + "line": 29, + "name": "mutants/12/MultipleContracts/C.sol", + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 16, + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "id": "13", + "line": 29, + "name": "mutants/13/MultipleContracts/C.sol", + "op": "ROR", + "orig": "c[0] == e", + "original": "MultipleContracts/C.sol", + "repl": "false" + }, + { + "col": 18, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "id": "14", + "line": 29, + "name": "mutants/14/MultipleContracts/C.sol", + "op": "LVR", + "orig": "0", + "original": "MultipleContracts/C.sol", + "repl": "1" + } +] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants.log b/resources/regressions/test_multiple_contracts_1.json/mutants.log index e69de29b..10b860e6 100644 --- a/resources/regressions/test_multiple_contracts_1.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_1.json/mutants.log @@ -0,0 +1,14 @@ +1,STD,MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) +2,ROR,MultipleContracts/C.sol,7:16,c[0] == e,false +3,LVR,MultipleContracts/C.sol,7:18,0,1 +4,LVR,MultipleContracts/C.sol,23:21,10,0 +5,LVR,MultipleContracts/C.sol,23:21,10,11 +6,AOR,MultipleContracts/C.sol,24:25,**,+ +7,AOR,MultipleContracts/C.sol,24:25,**,- +8,AOR,MultipleContracts/C.sol,24:25,**,* +9,AOR,MultipleContracts/C.sol,24:25,**,/ +10,AOR,MultipleContracts/C.sol,24:25,**,% +11,STD,MultipleContracts/C.sol,25:9,return res,assert(true) +12,STD,MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +13,ROR,MultipleContracts/C.sol,29:16,c[0] == e,false +14,LVR,MultipleContracts/C.sol,29:18,0,1 diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol new file mode 100644 index 00000000..5f69007a --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/1/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) internal pure { + assert(true); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol new file mode 100644 index 00000000..4979f42e --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/10/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol new file mode 100644 index 00000000..5933d066 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/11/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol new file mode 100644 index 00000000..a4c6c970 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/12/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol new file mode 100644 index 00000000..781e87b1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/13/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(false); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol new file mode 100644 index 00000000..7749a0cb --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/14/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(c[1] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol new file mode 100644 index 00000000..ecdc98c4 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/2/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) internal pure { + assert(false); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol new file mode 100644 index 00000000..e9466e07 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/3/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) internal pure { + assert(c[1] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol new file mode 100644 index 00000000..f2136ed3 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/4/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 0; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol new file mode 100644 index 00000000..f69e3360 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/5/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 11; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol new file mode 100644 index 00000000..13319cbe --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/6/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a + decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol new file mode 100644 index 00000000..3279b41e --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/7/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol new file mode 100644 index 00000000..95cc94e7 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/8/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol new file mode 100644 index 00000000..cc3476f1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_1.json/mutants/9/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json index 0637a088..4934b616 100644 --- a/resources/regressions/test_multiple_contracts_2.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_2.json/gambit_results.json @@ -1 +1,158 @@ -[] \ No newline at end of file +[ + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "id": "1", + "line": 11, + "name": "mutants/1/MultipleContracts/C.sol", + "op": "STD", + "orig": "return a + b", + "original": "MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "id": "2", + "line": 11, + "name": "mutants/2/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "-" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "id": "3", + "line": 11, + "name": "mutants/3/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "*" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "id": "4", + "line": 11, + "name": "mutants/4/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "/" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "id": "5", + "line": 11, + "name": "mutants/5/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "%" + }, + { + "col": 21, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "6", + "line": 23, + "name": "mutants/6/MultipleContracts/C.sol", + "op": "LVR", + "orig": "10", + "original": "MultipleContracts/C.sol", + "repl": "0" + }, + { + "col": 21, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "7", + "line": 23, + "name": "mutants/7/MultipleContracts/C.sol", + "op": "LVR", + "orig": "10", + "original": "MultipleContracts/C.sol", + "repl": "11" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "id": "8", + "line": 24, + "name": "mutants/8/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "+" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "9", + "line": 24, + "name": "mutants/9/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "-" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "10", + "line": 24, + "name": "mutants/10/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "*" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "11", + "line": 24, + "name": "mutants/11/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "/" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "12", + "line": 24, + "name": "mutants/12/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "%" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "13", + "line": 25, + "name": "mutants/13/MultipleContracts/C.sol", + "op": "STD", + "orig": "return res", + "original": "MultipleContracts/C.sol", + "repl": "assert(true)" + } +] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants.log b/resources/regressions/test_multiple_contracts_2.json/mutants.log index e69de29b..72885532 100644 --- a/resources/regressions/test_multiple_contracts_2.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_2.json/mutants.log @@ -0,0 +1,13 @@ +1,STD,MultipleContracts/C.sol,11:9,return a + b,assert(true) +2,AOR,MultipleContracts/C.sol,11:18,+,- +3,AOR,MultipleContracts/C.sol,11:18,+,* +4,AOR,MultipleContracts/C.sol,11:18,+,/ +5,AOR,MultipleContracts/C.sol,11:18,+,% +6,LVR,MultipleContracts/C.sol,23:21,10,0 +7,LVR,MultipleContracts/C.sol,23:21,10,11 +8,AOR,MultipleContracts/C.sol,24:25,**,+ +9,AOR,MultipleContracts/C.sol,24:25,**,- +10,AOR,MultipleContracts/C.sol,24:25,**,* +11,AOR,MultipleContracts/C.sol,24:25,**,/ +12,AOR,MultipleContracts/C.sol,24:25,**,% +13,STD,MultipleContracts/C.sol,25:9,return res,assert(true) diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol new file mode 100644 index 00000000..f7a48737 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/1/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + assert(true); + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol new file mode 100644 index 00000000..95cc94e7 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/10/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol new file mode 100644 index 00000000..cc3476f1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/11/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol new file mode 100644 index 00000000..4979f42e --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/12/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol new file mode 100644 index 00000000..5933d066 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/13/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol new file mode 100644 index 00000000..9e5f617a --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/2/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a - b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol new file mode 100644 index 00000000..86125329 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/3/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a * b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol new file mode 100644 index 00000000..e85ef12c --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/4/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a / b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol new file mode 100644 index 00000000..b32909ed --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/5/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a % b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol new file mode 100644 index 00000000..f2136ed3 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/6/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 0; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol new file mode 100644 index 00000000..f69e3360 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/7/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 11; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol new file mode 100644 index 00000000..13319cbe --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/8/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a + decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol new file mode 100644 index 00000000..3279b41e --- /dev/null +++ b/resources/regressions/test_multiple_contracts_2.json/mutants/9/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json index 0637a088..43afb12d 100644 --- a/resources/regressions/test_multiple_contracts_3.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_3.json/gambit_results.json @@ -1 +1,362 @@ -[] \ No newline at end of file +[ + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "1", + "line": 7, + "name": "mutants/1/MultipleContracts/C.sol", + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 16, + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "2", + "line": 7, + "name": "mutants/2/MultipleContracts/C.sol", + "op": "ROR", + "orig": "c[0] == e", + "original": "MultipleContracts/C.sol", + "repl": "false" + }, + { + "col": 18, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -3,8 +3,9 @@\n pragma solidity ^0.8.13;\n \n library Utils {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) internal pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function add(int8 a, int8 b) public pure returns (int8) {\n", + "id": "3", + "line": 7, + "name": "mutants/3/MultipleContracts/C.sol", + "op": "LVR", + "orig": "0", + "original": "MultipleContracts/C.sol", + "repl": "1" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ assert(true);\n }\n }\n \n", + "id": "4", + "line": 11, + "name": "mutants/4/MultipleContracts/C.sol", + "op": "STD", + "orig": "return a + b", + "original": "MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "id": "5", + "line": 11, + "name": "mutants/5/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "-" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "id": "6", + "line": 11, + "name": "mutants/6/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "*" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "id": "7", + "line": 11, + "name": "mutants/7/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "/" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "id": "8", + "line": 11, + "name": "mutants/8/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "%" + }, + { + "col": 44, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](0);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "9", + "line": 17, + "name": "mutants/9/MultipleContracts/C.sol", + "op": "LVR", + "orig": "1", + "original": "MultipleContracts/C.sol", + "repl": "0" + }, + { + "col": 44, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -13,8 +13,9 @@\n }\n \n contract C {\n+ /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);`\n function foo() external view returns (address[] memory) {\n- address[] memory a = new address[](1);\n+ address[] memory a = new address[](2);\n a[0] = msg.sender;\n return a;\n }\n", + "id": "10", + "line": 17, + "name": "mutants/10/MultipleContracts/C.sol", + "op": "LVR", + "orig": "1", + "original": "MultipleContracts/C.sol", + "repl": "2" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ assert(true);\n return a;\n }\n \n", + "id": "11", + "line": 18, + "name": "mutants/11/MultipleContracts/C.sol", + "op": "STD", + "orig": "a[0] = msg.sender", + "original": "MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 11, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -14,8 +14,9 @@\n \n contract C {\n function foo() external view returns (address[] memory) {\n+ /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;`\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ a[1] = msg.sender;\n return a;\n }\n \n", + "id": "12", + "line": 18, + "name": "mutants/12/MultipleContracts/C.sol", + "op": "LVR", + "orig": "0", + "original": "MultipleContracts/C.sol", + "repl": "1" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -15,8 +15,9 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n+ /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;`\n a[0] = msg.sender;\n- return a;\n+ assert(true);\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n", + "id": "13", + "line": 19, + "name": "mutants/13/MultipleContracts/C.sol", + "op": "STD", + "orig": "return a", + "original": "MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 21, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 0;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "14", + "line": 23, + "name": "mutants/14/MultipleContracts/C.sol", + "op": "LVR", + "orig": "10", + "original": "MultipleContracts/C.sol", + "repl": "0" + }, + { + "col": 21, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -19,8 +19,9 @@\n return a;\n }\n \n+ /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;`\n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n- uint256 a = 10;\n+ uint256 a = 11;\n uint256 res = a ** decimals;\n return res;\n }\n", + "id": "15", + "line": 23, + "name": "mutants/15/MultipleContracts/C.sol", + "op": "LVR", + "orig": "10", + "original": "MultipleContracts/C.sol", + "repl": "11" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a + decimals;\n return res;\n }\n \n", + "id": "16", + "line": 24, + "name": "mutants/16/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "+" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a - decimals;\n return res;\n }\n \n", + "id": "17", + "line": 24, + "name": "mutants/17/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "-" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a * decimals;\n return res;\n }\n \n", + "id": "18", + "line": 24, + "name": "mutants/18/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "*" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a / decimals;\n return res;\n }\n \n", + "id": "19", + "line": 24, + "name": "mutants/19/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "/" + }, + { + "col": 25, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -20,8 +20,9 @@\n }\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n+ /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ uint256 res = a % decimals;\n return res;\n }\n \n", + "id": "20", + "line": 24, + "name": "mutants/20/MultipleContracts/C.sol", + "op": "AOR", + "orig": "**", + "original": "MultipleContracts/C.sol", + "repl": "%" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -21,8 +21,9 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n+ /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;`\n uint256 res = a ** decimals;\n- return res;\n+ assert(true);\n }\n \n function getarray(address[] memory c, address e) public pure {\n", + "id": "21", + "line": 25, + "name": "mutants/21/MultipleContracts/C.sol", + "op": "STD", + "orig": "return res", + "original": "MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "22", + "line": 29, + "name": "mutants/22/MultipleContracts/C.sol", + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 16, + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "id": "23", + "line": 29, + "name": "mutants/23/MultipleContracts/C.sol", + "op": "ROR", + "orig": "c[0] == e", + "original": "MultipleContracts/C.sol", + "repl": "false" + }, + { + "col": 18, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "id": "24", + "line": 29, + "name": "mutants/24/MultipleContracts/C.sol", + "op": "LVR", + "orig": "0", + "original": "MultipleContracts/C.sol", + "repl": "1" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -30,8 +30,9 @@\n }\n \n function callmyself() external view {\n+ /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "id": "25", + "line": 34, + "name": "mutants/25/MultipleContracts/C.sol", + "op": "STD", + "orig": "Utils.getarray(b, address(this))", + "original": "MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ assert(true);\n }\n }\n", + "id": "26", + "line": 38, + "name": "mutants/26/MultipleContracts/C.sol", + "op": "STD", + "orig": "return c + d", + "original": "MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "27", + "line": 38, + "name": "mutants/27/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "-" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "28", + "line": 38, + "name": "mutants/28/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "*" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "29", + "line": 38, + "name": "mutants/29/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "/" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "30", + "line": 38, + "name": "mutants/30/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "%" + } +] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants.log b/resources/regressions/test_multiple_contracts_3.json/mutants.log index e69de29b..496a0413 100644 --- a/resources/regressions/test_multiple_contracts_3.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_3.json/mutants.log @@ -0,0 +1,30 @@ +1,STD,MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) +2,ROR,MultipleContracts/C.sol,7:16,c[0] == e,false +3,LVR,MultipleContracts/C.sol,7:18,0,1 +4,STD,MultipleContracts/C.sol,11:9,return a + b,assert(true) +5,AOR,MultipleContracts/C.sol,11:18,+,- +6,AOR,MultipleContracts/C.sol,11:18,+,* +7,AOR,MultipleContracts/C.sol,11:18,+,/ +8,AOR,MultipleContracts/C.sol,11:18,+,% +9,LVR,MultipleContracts/C.sol,17:44,1,0 +10,LVR,MultipleContracts/C.sol,17:44,1,2 +11,STD,MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) +12,LVR,MultipleContracts/C.sol,18:11,0,1 +13,STD,MultipleContracts/C.sol,19:9,return a,assert(true) +14,LVR,MultipleContracts/C.sol,23:21,10,0 +15,LVR,MultipleContracts/C.sol,23:21,10,11 +16,AOR,MultipleContracts/C.sol,24:25,**,+ +17,AOR,MultipleContracts/C.sol,24:25,**,- +18,AOR,MultipleContracts/C.sol,24:25,**,* +19,AOR,MultipleContracts/C.sol,24:25,**,/ +20,AOR,MultipleContracts/C.sol,24:25,**,% +21,STD,MultipleContracts/C.sol,25:9,return res,assert(true) +22,STD,MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +23,ROR,MultipleContracts/C.sol,29:16,c[0] == e,false +24,LVR,MultipleContracts/C.sol,29:18,0,1 +25,STD,MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) +26,STD,MultipleContracts/C.sol,38:9,return c + d,assert(true) +27,AOR,MultipleContracts/C.sol,38:18,+,- +28,AOR,MultipleContracts/C.sol,38:18,+,* +29,AOR,MultipleContracts/C.sol,38:18,+,/ +30,AOR,MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol new file mode 100644 index 00000000..5f69007a --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/1/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) internal pure { + assert(true); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol new file mode 100644 index 00000000..16f8bc88 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/10/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `2`) of: `address[] memory a = new address[](1);` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](2); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol new file mode 100644 index 00000000..427647a6 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/11/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + /// StatementDeletion(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` + address[] memory a = new address[](1); + assert(true); + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol new file mode 100644 index 00000000..9db93f13 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/12/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + /// LiteralValueReplacement(`0` |==> `1`) of: `a[0] = msg.sender;` + address[] memory a = new address[](1); + a[1] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol new file mode 100644 index 00000000..a9342ea1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/13/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + /// StatementDeletion(`return a` |==> `assert(true)`) of: `return a;` + a[0] = msg.sender; + assert(true); + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol new file mode 100644 index 00000000..f2136ed3 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/14/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `0`) of: `uint256 a = 10;` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 0; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol new file mode 100644 index 00000000..f69e3360 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/15/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + /// LiteralValueReplacement(`10` |==> `11`) of: `uint256 a = 10;` + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 11; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol new file mode 100644 index 00000000..13319cbe --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/16/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `+`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a + decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol new file mode 100644 index 00000000..3279b41e --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/17/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `-`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a - decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol new file mode 100644 index 00000000..95cc94e7 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/18/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `*`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a * decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol new file mode 100644 index 00000000..cc3476f1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/19/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `/`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a / decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol new file mode 100644 index 00000000..ecdc98c4 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/2/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) internal pure { + assert(false); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol new file mode 100644 index 00000000..4979f42e --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/20/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + /// ArithmeticOperatorReplacement(`**` |==> `%`) of: `uint256 res = a ** decimals;` + uint256 a = 10; + uint256 res = a % decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol new file mode 100644 index 00000000..5933d066 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/21/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + /// StatementDeletion(`return res` |==> `assert(true)`) of: `return res;` + uint256 res = a ** decimals; + assert(true); + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol new file mode 100644 index 00000000..a4c6c970 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/22/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol new file mode 100644 index 00000000..781e87b1 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/23/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(false); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol new file mode 100644 index 00000000..7749a0cb --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/24/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(c[1] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol new file mode 100644 index 00000000..a14e05da --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/25/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + /// StatementDeletion(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` + address[] memory b = this.foo(); + assert(true); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol new file mode 100644 index 00000000..4887a934 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/26/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// StatementDeletion(`return c + d` |==> `assert(true)`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + assert(true); + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol new file mode 100644 index 00000000..7a0c07d0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/27/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol new file mode 100644 index 00000000..d73584b8 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/28/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol new file mode 100644 index 00000000..c226dcfd --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/29/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol new file mode 100644 index 00000000..e9466e07 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/3/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) internal pure { + assert(c[1] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol new file mode 100644 index 00000000..c6022ee9 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/30/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol new file mode 100644 index 00000000..f7a48737 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/4/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// StatementDeletion(`return a + b` |==> `assert(true)`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + assert(true); + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol new file mode 100644 index 00000000..9e5f617a --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/5/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a - b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol new file mode 100644 index 00000000..86125329 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/6/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a * b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol new file mode 100644 index 00000000..e85ef12c --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/7/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a / b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol new file mode 100644 index 00000000..b32909ed --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/8/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a % b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol new file mode 100644 index 00000000..f9a5de25 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_3.json/mutants/9/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + /// LiteralValueReplacement(`1` |==> `0`) of: `address[] memory a = new address[](1);` + function foo() external view returns (address[] memory) { + address[] memory a = new address[](0); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json index 0637a088..364ba55a 100644 --- a/resources/regressions/test_multiple_contracts_4.json/gambit_results.json +++ b/resources/regressions/test_multiple_contracts_4.json/gambit_results.json @@ -1 +1,98 @@ -[] \ No newline at end of file +[ + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a - b;\n }\n }\n \n", + "id": "1", + "line": 11, + "name": "mutants/1/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "-" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a * b;\n }\n }\n \n", + "id": "2", + "line": 11, + "name": "mutants/2/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "*" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a / b;\n }\n }\n \n", + "id": "3", + "line": 11, + "name": "mutants/3/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "/" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n assert(c[0] == e);\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;`\n function add(int8 a, int8 b) public pure returns (int8) {\n- return a + b;\n+ return a % b;\n }\n }\n \n", + "id": "4", + "line": 11, + "name": "mutants/4/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "%" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c - d;\n }\n }\n", + "id": "5", + "line": 38, + "name": "mutants/5/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "-" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c * d;\n }\n }\n", + "id": "6", + "line": 38, + "name": "mutants/6/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "*" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c / d;\n }\n }\n", + "id": "7", + "line": 38, + "name": "mutants/7/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "/" + }, + { + "col": 18, + "description": "ArithmeticOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n Utils.getarray(b, address(this));\n }\n \n+ /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;`\n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ return c % d;\n }\n }\n", + "id": "8", + "line": 38, + "name": "mutants/8/MultipleContracts/C.sol", + "op": "AOR", + "orig": "+", + "original": "MultipleContracts/C.sol", + "repl": "%" + } +] \ No newline at end of file diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants.log b/resources/regressions/test_multiple_contracts_4.json/mutants.log index e69de29b..d2ac261e 100644 --- a/resources/regressions/test_multiple_contracts_4.json/mutants.log +++ b/resources/regressions/test_multiple_contracts_4.json/mutants.log @@ -0,0 +1,8 @@ +1,AOR,MultipleContracts/C.sol,11:18,+,- +2,AOR,MultipleContracts/C.sol,11:18,+,* +3,AOR,MultipleContracts/C.sol,11:18,+,/ +4,AOR,MultipleContracts/C.sol,11:18,+,% +5,AOR,MultipleContracts/C.sol,38:18,+,- +6,AOR,MultipleContracts/C.sol,38:18,+,* +7,AOR,MultipleContracts/C.sol,38:18,+,/ +8,AOR,MultipleContracts/C.sol,38:18,+,% diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol new file mode 100644 index 00000000..9e5f617a --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/1/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a - b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol new file mode 100644 index 00000000..86125329 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/2/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a * b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol new file mode 100644 index 00000000..e85ef12c --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/3/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a / b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol new file mode 100644 index 00000000..b32909ed --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/4/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return a + b;` + function add(int8 a, int8 b) public pure returns (int8) { + return a % b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol new file mode 100644 index 00000000..7a0c07d0 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/5/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `-`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c - d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol new file mode 100644 index 00000000..d73584b8 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/6/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `*`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c * d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol new file mode 100644 index 00000000..c226dcfd --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/7/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `/`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c / d; + } +} diff --git a/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol b/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol new file mode 100644 index 00000000..c6022ee9 --- /dev/null +++ b/resources/regressions/test_multiple_contracts_4.json/mutants/8/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + /// ArithmeticOperatorReplacement(`+` |==> `%`) of: `return c + d;` + function add(int8 c, int8 d) public pure returns (int8) { + return c % d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/gambit_results.json b/resources/regressions/test_multiple_files_1.json/gambit_results.json index eb293859..78c5d1b7 100644 --- a/resources/regressions/test_multiple_files_1.json/gambit_results.json +++ b/resources/regressions/test_multiple_files_1.json/gambit_results.json @@ -322,5 +322,41 @@ "orig": "**", "original": "Ops/AOR/AOR.sol", "repl": "%" + }, + { + "col": 9, + "description": "StatementDeletion", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "id": "28", + "line": 29, + "name": "mutants/28/MultipleContracts/C.sol", + "op": "STD", + "orig": "assert(c[0] == e)", + "original": "MultipleContracts/C.sol", + "repl": "assert(true)" + }, + { + "col": 16, + "description": "RelationalOperatorReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(false);\n }\n \n function callmyself() external view {\n", + "id": "29", + "line": 29, + "name": "mutants/29/MultipleContracts/C.sol", + "op": "ROR", + "orig": "c[0] == e", + "original": "MultipleContracts/C.sol", + "repl": "false" + }, + { + "col": 18, + "description": "LiteralValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -25,8 +25,9 @@\n return res;\n }\n \n+ /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);`\n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ assert(c[1] == e);\n }\n \n function callmyself() external view {\n", + "id": "30", + "line": 29, + "name": "mutants/30/MultipleContracts/C.sol", + "op": "LVR", + "orig": "0", + "original": "MultipleContracts/C.sol", + "repl": "1" } ] \ No newline at end of file diff --git a/resources/regressions/test_multiple_files_1.json/mutants.log b/resources/regressions/test_multiple_files_1.json/mutants.log index 507ee3cb..3ee4d5ce 100644 --- a/resources/regressions/test_multiple_files_1.json/mutants.log +++ b/resources/regressions/test_multiple_files_1.json/mutants.log @@ -25,3 +25,6 @@ 25,AOR,Ops/AOR/AOR.sol,58:18,**,* 26,AOR,Ops/AOR/AOR.sol,58:18,**,/ 27,AOR,Ops/AOR/AOR.sol,58:18,**,% +28,STD,MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +29,ROR,MultipleContracts/C.sol,29:16,c[0] == e,false +30,LVR,MultipleContracts/C.sol,29:18,0,1 diff --git a/resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol new file mode 100644 index 00000000..a4c6c970 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/28/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// StatementDeletion(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(true); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol new file mode 100644 index 00000000..781e87b1 --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/29/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// RelationalOperatorReplacement(`c[0] == e` |==> `false`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(false); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} diff --git a/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol b/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol new file mode 100644 index 00000000..7749a0cb --- /dev/null +++ b/resources/regressions/test_multiple_files_1.json/mutants/30/MultipleContracts/C.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + /// LiteralValueReplacement(`0` |==> `1`) of: `assert(c[0] == e);` + function getarray(address[] memory c, address e) public pure { + assert(c[1] == e); + } + + function callmyself() external view { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + } + + function add(int8 c, int8 d) public pure returns (int8) { + return c + d; + } +} From b3a1ddb0f896150a30ed31549f7737b0417bbedd Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 13:41:35 -0700 Subject: [PATCH 174/200] readme --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 67541023..109fbbef 100644 --- a/README.md +++ b/README.md @@ -142,13 +142,12 @@ --> # Gambit: Mutant Generation for Solidity -Gambit is a state-of-the-art mutant generation system for Solidity. By applying -predefined syntax transformations called _mutation operators_ (for example, -convert `a + b` to `a - b`) to a Solidity program's source code, Gambit -generates variants of the program called _mutants_. -Mutants are used to evaluate a test suite or a specification: each mutant -represents a potential bug in the program, and stronger test suites and -specifications should detect more mutants as faulty. +Gambit is a state-of-the-art mutant generation system for Solidity. Gambit +injects faults into a Solidity program by applying predefined syntactic +transformations, called _mutation _operators_, to the program's source code. The +resulting faulty programs, called _mutants_, are used to evaluate a test suite +or a specification: each mutant represents a potential bug in the program, and +stronger test suites and specifications should detect more mutants as faulty. ## Requirements @@ -324,10 +323,10 @@ location without affecting the build configuration. Gambit resolves imports while parsing, and this requires that you specify any import paths and remappings that you would pass to `solc`. -Instead of `solc`'s `--base-name` and `--input-path` arguments, Gambit uses +Instead of `solc`'s `--base-name` and `--import-path` arguments, Gambit uses a simpler scheme and replaces both of these with a single `--import_paths` argument. For instance, if the `solc` invocation is `solc C.sol --base-name . ---input-path modules` , then the Gambit invocation becomes `gambit mutate C.sol +--import-path modules` , then the Gambit invocation becomes `gambit mutate C.sol --import_paths . modules`. Remappings are specified with the `--import_maps` argument. If the `solc` From 251e149fc81462f1d8f049614e954ce9cb5f62a3 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 15:07:15 -0700 Subject: [PATCH 175/200] Fixed some comments --- src/cli.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index c2be472d..40370d64 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -59,14 +59,15 @@ fn default_import_paths() -> Vec { /// Mutate solidity code. /// -/// The `mutate` command requires either a `--filename` or a `--json` -/// configuration file to be passed, and these are mutually exclusive. +/// The `mutate` command requires either a filename or a `--json` configuration +/// file to be passed, and these are mutually exclusive. /// /// # Examples -/// 1. `gambit mutate --filename path/to/file.sol` this will apply all mutations to file.sol. /// -/// 2. `gambit mutate --json path/to/config.json`: this runs mutations specified -/// in the configuration file +/// 1. `gambit mutate path/to/file.sol` will apply all mutations to file.sol. +/// +/// 2. `gambit mutate --json path/to/config.json` runs mutations specified in +/// the configuration file /// /// Only one filename can be specified from command line at a time, but multiple /// files can be specified in a configuration. From 64e95b5b60191e24d82655baeade7fdcd006436d Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 16:05:09 -0700 Subject: [PATCH 176/200] Fix regression --- src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 40370d64..feeb8314 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -138,7 +138,7 @@ pub struct MutateParams { pub no_overwrite: bool, /// Solidity binary name, e.g., --solc solc8.10, --solc 7.5, etc. - #[arg(long, default_value = "solc")] + #[arg(long, default_value = None)] #[serde(default = "default_solc")] pub solc: Option, From 6ecf83ce4cdc6915dd131fab34742e36e53add6e Mon Sep 17 00:00:00 2001 From: Chandrakana Nandi Date: Tue, 12 Sep 2023 16:05:41 -0700 Subject: [PATCH 177/200] things to clean up code --- .github/workflows/gambit.yml | 4 ++-- benchmarks/FallbackMutations/Fallback.sol | 17 ++++++++++++++ .../config-jsons/test_fallback_mutations.json | 13 +++++++++++ src/mutation.rs | 22 +++++-------------- 4 files changed, 37 insertions(+), 19 deletions(-) create mode 100644 benchmarks/FallbackMutations/Fallback.sol create mode 100644 benchmarks/config-jsons/test_fallback_mutations.json diff --git a/.github/workflows/gambit.yml b/.github/workflows/gambit.yml index 346092de..95943438 100644 --- a/.github/workflows/gambit.yml +++ b/.github/workflows/gambit.yml @@ -33,7 +33,7 @@ jobs: sudo mv solc /usr/bin/solc fi - name: Build and Test - run: make all_linux + run: SOLC=solc make all_linux - name: Rename gambit binary if: startsWith(github.event.ref, 'refs/tags/v') # only on new tag creation @@ -71,7 +71,7 @@ jobs: sudo mv solc-macos /usr/local/bin/solc fi - name: Build and Test - run: make all_macos + run: SOLC=solc make all_macos - name: Darwin link as Universal run: lipo -create -output gambit-macos target/aarch64-apple-darwin/release/gambit target/x86_64-apple-darwin/release/gambit diff --git a/benchmarks/FallbackMutations/Fallback.sol b/benchmarks/FallbackMutations/Fallback.sol new file mode 100644 index 00000000..e1936be0 --- /dev/null +++ b/benchmarks/FallbackMutations/Fallback.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +contract Fallback { + function checkArgumentsAreReplaced( + uint256 num, + address addr, + bool b + ) public returns (uint256) { + if (num == 0) { + return 0; + } else { + return checkArgumentsAreReplaced(num - 1, addr, !b); + } + } +} diff --git a/benchmarks/config-jsons/test_fallback_mutations.json b/benchmarks/config-jsons/test_fallback_mutations.json new file mode 100644 index 00000000..8222b186 --- /dev/null +++ b/benchmarks/config-jsons/test_fallback_mutations.json @@ -0,0 +1,13 @@ +[ + { + "filename": "../FallbackMutations/Fallback.sol", + "import_paths": [ + "../FallbackMutations" + ], + "solc": "solc8.13", + "mutations": [], + "fallback_mutations": [ + "evr" + ] + } +] \ No newline at end of file diff --git a/src/mutation.rs b/src/mutation.rs index e7eb9086..0364ce2c 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -925,16 +925,16 @@ fn statement_deletion( | Statement::For { .. } | Statement::DoWhile(..) | Statement::Assembly(..) - | Statement::TryCatch(..) => vec![], - - // Also, do not mutate underscore statement - Statement::Underscore(_) => vec![], + | Statement::TryCatch(..) + // Also do not delete underscore statement + | Statement::Underscore(_) => vec![], Statement::Expression(..) | Statement::Delete(..) | Statement::Continue(..) | Statement::Break(..) | Statement::Revert { .. } + | Statement::Return(..) | Statement::Emit { .. } => vec![Mutant::new( file_resolver, namespace, @@ -942,19 +942,7 @@ fn statement_deletion( *op, orig, "assert(true)".to_string(), - )], - - // Returns are special: we should perform some analysis to figure out if - // we can delete this without making an invalid program. For now we - // delete and hope for the best :) - Statement::Return(..) => vec![Mutant::new( - file_resolver, - namespace, - loc, - *op, - orig, - "assert(true)".to_string(), - )], + )] } } From 010e776ef9fc1355ea8ab9395beb6527ff012dfc Mon Sep 17 00:00:00 2001 From: Chandrakana Nandi Date: Tue, 12 Sep 2023 16:10:55 -0700 Subject: [PATCH 178/200] fall back tests --- .../gambit_results.json | 50 +++++++++++++++++++ .../test_fallback_mutations.json/mutants.log | 4 ++ .../mutants/1/Fallback.sol | 18 +++++++ .../mutants/2/Fallback.sol | 18 +++++++ .../mutants/3/Fallback.sol | 18 +++++++ .../mutants/4/Fallback.sol | 18 +++++++ 6 files changed, 126 insertions(+) create mode 100644 resources/regressions/test_fallback_mutations.json/gambit_results.json create mode 100644 resources/regressions/test_fallback_mutations.json/mutants.log create mode 100644 resources/regressions/test_fallback_mutations.json/mutants/1/Fallback.sol create mode 100644 resources/regressions/test_fallback_mutations.json/mutants/2/Fallback.sol create mode 100644 resources/regressions/test_fallback_mutations.json/mutants/3/Fallback.sol create mode 100644 resources/regressions/test_fallback_mutations.json/mutants/4/Fallback.sol diff --git a/resources/regressions/test_fallback_mutations.json/gambit_results.json b/resources/regressions/test_fallback_mutations.json/gambit_results.json new file mode 100644 index 00000000..d5f30ad1 --- /dev/null +++ b/resources/regressions/test_fallback_mutations.json/gambit_results.json @@ -0,0 +1,50 @@ +[ + { + "col": 13, + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n uint256 num,\n address addr,\n bool b\n+ /// ExpressionValueReplacement(`num == 0` |==> `true`) of: `if (num == 0) {`\n ) public returns (uint256) {\n- if (num == 0) {\n+ if (true) {\n return 0;\n } else {\n return checkArgumentsAreReplaced(num - 1, addr, !b);\n", + "id": "1", + "line": 11, + "name": "mutants/1/Fallback.sol", + "op": "EVR", + "orig": "num == 0", + "original": "Fallback.sol", + "repl": "true" + }, + { + "col": 13, + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -7,8 +7,9 @@\n uint256 num,\n address addr,\n bool b\n+ /// ExpressionValueReplacement(`num == 0` |==> `false`) of: `if (num == 0) {`\n ) public returns (uint256) {\n- if (num == 0) {\n+ if (false) {\n return 0;\n } else {\n return checkArgumentsAreReplaced(num - 1, addr, !b);\n", + "id": "2", + "line": 11, + "name": "mutants/2/Fallback.sol", + "op": "EVR", + "orig": "num == 0", + "original": "Fallback.sol", + "repl": "false" + }, + { + "col": 20, + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n ) public returns (uint256) {\n if (num == 0) {\n return 0;\n+ /// ExpressionValueReplacement(`checkArgumentsAreReplaced(num - 1, addr, !b)` |==> `0`) of: `return checkArgumentsAreReplaced(num - 1, addr, !b);`\n } else {\n- return checkArgumentsAreReplaced(num - 1, addr, !b);\n+ return 0;\n }\n }\n }\n", + "id": "3", + "line": 14, + "name": "mutants/3/Fallback.sol", + "op": "EVR", + "orig": "checkArgumentsAreReplaced(num - 1, addr, !b)", + "original": "Fallback.sol", + "repl": "0" + }, + { + "col": 20, + "description": "ExpressionValueReplacement", + "diff": "--- original\n+++ mutant\n@@ -10,8 +10,9 @@\n ) public returns (uint256) {\n if (num == 0) {\n return 0;\n+ /// ExpressionValueReplacement(`checkArgumentsAreReplaced(num - 1, addr, !b)` |==> `1`) of: `return checkArgumentsAreReplaced(num - 1, addr, !b);`\n } else {\n- return checkArgumentsAreReplaced(num - 1, addr, !b);\n+ return 1;\n }\n }\n }\n", + "id": "4", + "line": 14, + "name": "mutants/4/Fallback.sol", + "op": "EVR", + "orig": "checkArgumentsAreReplaced(num - 1, addr, !b)", + "original": "Fallback.sol", + "repl": "1" + } +] \ No newline at end of file diff --git a/resources/regressions/test_fallback_mutations.json/mutants.log b/resources/regressions/test_fallback_mutations.json/mutants.log new file mode 100644 index 00000000..f1227dce --- /dev/null +++ b/resources/regressions/test_fallback_mutations.json/mutants.log @@ -0,0 +1,4 @@ +1,EVR,Fallback.sol,11:13,num == 0,true +2,EVR,Fallback.sol,11:13,num == 0,false +3,EVR,Fallback.sol,14:20,"checkArgumentsAreReplaced(num - 1, addr, !b)",0 +4,EVR,Fallback.sol,14:20,"checkArgumentsAreReplaced(num - 1, addr, !b)",1 diff --git a/resources/regressions/test_fallback_mutations.json/mutants/1/Fallback.sol b/resources/regressions/test_fallback_mutations.json/mutants/1/Fallback.sol new file mode 100644 index 00000000..8f353bd3 --- /dev/null +++ b/resources/regressions/test_fallback_mutations.json/mutants/1/Fallback.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +contract Fallback { + function checkArgumentsAreReplaced( + uint256 num, + address addr, + bool b + /// ExpressionValueReplacement(`num == 0` |==> `true`) of: `if (num == 0) {` + ) public returns (uint256) { + if (true) { + return 0; + } else { + return checkArgumentsAreReplaced(num - 1, addr, !b); + } + } +} diff --git a/resources/regressions/test_fallback_mutations.json/mutants/2/Fallback.sol b/resources/regressions/test_fallback_mutations.json/mutants/2/Fallback.sol new file mode 100644 index 00000000..f2b60012 --- /dev/null +++ b/resources/regressions/test_fallback_mutations.json/mutants/2/Fallback.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +contract Fallback { + function checkArgumentsAreReplaced( + uint256 num, + address addr, + bool b + /// ExpressionValueReplacement(`num == 0` |==> `false`) of: `if (num == 0) {` + ) public returns (uint256) { + if (false) { + return 0; + } else { + return checkArgumentsAreReplaced(num - 1, addr, !b); + } + } +} diff --git a/resources/regressions/test_fallback_mutations.json/mutants/3/Fallback.sol b/resources/regressions/test_fallback_mutations.json/mutants/3/Fallback.sol new file mode 100644 index 00000000..72c0f12d --- /dev/null +++ b/resources/regressions/test_fallback_mutations.json/mutants/3/Fallback.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +contract Fallback { + function checkArgumentsAreReplaced( + uint256 num, + address addr, + bool b + ) public returns (uint256) { + if (num == 0) { + return 0; + /// ExpressionValueReplacement(`checkArgumentsAreReplaced(num - 1, addr, !b)` |==> `0`) of: `return checkArgumentsAreReplaced(num - 1, addr, !b);` + } else { + return 0; + } + } +} diff --git a/resources/regressions/test_fallback_mutations.json/mutants/4/Fallback.sol b/resources/regressions/test_fallback_mutations.json/mutants/4/Fallback.sol new file mode 100644 index 00000000..cf93e156 --- /dev/null +++ b/resources/regressions/test_fallback_mutations.json/mutants/4/Fallback.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +contract Fallback { + function checkArgumentsAreReplaced( + uint256 num, + address addr, + bool b + ) public returns (uint256) { + if (num == 0) { + return 0; + /// ExpressionValueReplacement(`checkArgumentsAreReplaced(num - 1, addr, !b)` |==> `1`) of: `return checkArgumentsAreReplaced(num - 1, addr, !b);` + } else { + return 1; + } + } +} From 07dff72697412ce801073d478d95302d8fb56185 Mon Sep 17 00:00:00 2001 From: Chandrakana Nandi Date: Tue, 12 Sep 2023 16:34:31 -0700 Subject: [PATCH 179/200] update readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 109fbbef..dedba5d0 100644 --- a/README.md +++ b/README.md @@ -323,10 +323,10 @@ location without affecting the build configuration. Gambit resolves imports while parsing, and this requires that you specify any import paths and remappings that you would pass to `solc`. -Instead of `solc`'s `--base-name` and `--import-path` arguments, Gambit uses +Instead of `solc`'s `--base-path` and `--include-path` arguments, Gambit uses a simpler scheme and replaces both of these with a single `--import_paths` -argument. For instance, if the `solc` invocation is `solc C.sol --base-name . ---import-path modules` , then the Gambit invocation becomes `gambit mutate C.sol +argument. For instance, if the `solc` invocation is `solc C.sol --base-path . +--include-path modules` , then the Gambit invocation becomes `gambit mutate C.sol --import_paths . modules`. Remappings are specified with the `--import_maps` argument. If the `solc` From d6a2e2f6dcab9e3065b142ec43ffaae3de12c6b7 Mon Sep 17 00:00:00 2001 From: Chandrakana Nandi Date: Tue, 12 Sep 2023 16:52:26 -0700 Subject: [PATCH 180/200] remove comment --- src/lib.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index b6568ffc..47b5b43e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -130,10 +130,6 @@ pub fn run_mutate( /* * * FILTER/VALIDATE * * =============== */ - - // TODO: Separate out Filtering from Validation - - // Check if we are filtering let mut solc = Solc::new( params.solc.clone().unwrap_or_else(|| "solc".to_string()), outdir_path.clone(), From 72078049dd4ebf3ff507bd165ba4b753cb581fde Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 20:16:44 -0700 Subject: [PATCH 181/200] Removed filenames from mutator (useless) --- src/lib.rs | 7 ++++-- src/mutation.rs | 59 ++++++++++++++++++------------------------------- src/mutator.rs | 27 +++------------------- 3 files changed, 30 insertions(+), 63 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index b6568ffc..f5b89fa2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -118,8 +118,11 @@ pub fn run_mutate( * ====== */ log::info!("Creating mutator"); let mut mutator = Mutator::from(params); - log::info!("Generating mutants"); - let sources = mutator.filenames().clone(); + let sources = params + .filename + .iter() + .map(|x| x.clone()) + .collect::>(); let mutants = mutator.mutate(sources)?.clone(); log::info!( "(pre filter/validate) Generated {} mutants for {}", diff --git a/src/mutation.rs b/src/mutation.rs index e7eb9086..4b50e3f0 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -1467,14 +1467,15 @@ contract A { ops: &Vec, expected: usize, ) { - let mutator = apply_mutation_to_statements(statements, params, None, ops).unwrap(); + let (mutator, sol_source) = + apply_mutation_to_statements(statements, params, None, ops).unwrap(); assert_eq!( expected, mutator.mutants().len(), "Error: applied ops\n -> {:?}\nto program\n -> {:?}\nat {:?} for more info", ops, statements.join(" "), - mutator.filenames().join(" ") + sol_source ); } @@ -1485,7 +1486,8 @@ contract A { ops: &Vec, expected: &Vec<&str>, ) { - let mutator = apply_mutation_to_statements(statements, params, None, ops).unwrap(); + let (mutator, sol_file) = + apply_mutation_to_statements(statements, params, None, ops).unwrap(); let expected_set: HashSet<&str> = expected.iter().map(|s| s.trim()).collect(); let actuals_set: HashSet<&str> = mutator .mutants() @@ -1517,7 +1519,7 @@ contract A { program, ansi_term::Color::Green.paint(expected_str), ansi_term::Color::Red.paint(actuals_str), - mutator.filenames().join(" ") + sol_file ); assert_eq!( @@ -1533,7 +1535,7 @@ contract A { program, ansi_term::Color::Green.paint(expected_str), ansi_term::Color::Red.paint(actuals_str), - mutator.filenames().join(" ") + sol_file ); } @@ -1542,7 +1544,7 @@ contract A { params: &Vec<&str>, returns: Option<&str>, ops: &Vec, - ) -> Result> { + ) -> Result<(Mutator, String), Box> { let source = wrap_and_write_solidity_to_temp_file(statements, params, returns).unwrap(); let prefix = format!( "gambit-compile-dir-{}", @@ -1552,22 +1554,22 @@ contract A { .prefix(prefix.as_str()) .rand_bytes(5) .tempdir_in(source.parent().unwrap())?; - let mut mutator = make_mutator(ops, &vec![], source, outdir.into_path()); - let sources = mutator.filenames().clone(); - mutator.mutate(sources)?; + let mut mutator = make_mutator(ops, &vec![], outdir.into_path()); + let source_name = source.to_str().unwrap().to_string(); + mutator.mutate(vec![source_name.clone()])?; - Ok(mutator) + Ok((mutator, source_name)) } fn _assert_num_mutants_for_source(source: &str, ops: &Vec, expected: usize) { - let mutator = apply_mutation_to_source(source, ops).unwrap(); + let (mutator, sol_file) = apply_mutation_to_source(source, ops).unwrap(); assert_eq!( expected, mutator.mutants().len(), "Error: applied ops\n -> {:?}\nto program\n -> {:?}\n\nSee {:?} for more info", ops, source, - mutator.filenames().join(" ") + sol_file ); } @@ -1576,14 +1578,14 @@ contract A { ops: &Vec, expected: &Vec<&str>, ) { - let mutator = apply_mutation_to_source(source, ops).unwrap(); + let (mutator, sol_file) = apply_mutation_to_source(source, ops).unwrap(); assert_eq!( expected.len(), mutator.mutants().len(), "Error: applied ops\n -> {:?}\nto program\n -> {:?}\nat {} for more info", ops, source, - mutator.filenames().join(" ") + sol_file ); let actuals: HashSet<&str> = mutator.mutants().iter().map(|m| m.repl.as_str()).collect(); @@ -1594,33 +1596,18 @@ contract A { fn apply_mutation_to_source( source: &str, ops: &Vec, - ) -> Result> { + ) -> Result<(Mutator, String), Box> { let source = write_solidity_to_temp_file(source.to_string()).unwrap(); + let source_filename = source.to_str().unwrap().to_string(); let outdir = Builder::new() .prefix("gambit-compile-dir") .rand_bytes(5) .tempdir()?; - let mut mutator = make_mutator(ops, &vec![], source.clone(), outdir.into_path()); - // let source_os_str = source.as_os_str(); - // println!("source: {:?}", source_os_str); - // let ns = parse_and_resolve( - // source_os_str, - // &mut mutator.file_resolver, - // solang::Target::EVM, - // ); - // println!("FUNCTIONS"); - // println!("ns: {:?}", ns.files); - // for function in ns.functions { - // println!("[{}]:\n", function.name); - // for (i, s) in function.body.iter().enumerate() { - // println!(" {}: {:?}", i + 1, &s); - // } - // } + let mut mutator = make_mutator(ops, &vec![], outdir.into_path()); mutator.file_resolver.add_import_path(&PathBuf::from("/")); - let sources = mutator.filenames().clone(); - mutator.mutate(sources)?; + mutator.mutate(vec![source_filename.clone()])?; - Ok(mutator) + Ok((mutator, source_filename)) } /// Create a mutator for a single file, creating required components (e.g., @@ -1628,7 +1615,6 @@ contract A { fn make_mutator( ops: &Vec, fallback: &Vec, - filename: PathBuf, outdir: PathBuf, ) -> Mutator { let conf = MutatorConf { @@ -1638,10 +1624,9 @@ contract A { contract: None, }; - let sources = vec![filename.to_str().unwrap().to_string()]; let solc = Solc::new("solc".into(), PathBuf::from(outdir)); let mut cache = FileResolver::default(); cache.add_import_path(&PathBuf::from("")); - Mutator::new(conf, cache, sources, solc) + Mutator::new(conf, cache, solc) } } diff --git a/src/mutator.rs b/src/mutator.rs index 0070c2af..3970ee4a 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -80,9 +80,6 @@ pub struct Mutator { /// Configuration for this mutator pub conf: MutatorConf, - /// The original sources - pub filenames: Vec, - /// The mutants, in order of generation pub mutants: Vec, @@ -100,7 +97,6 @@ impl std::fmt::Debug for Mutator { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("Mutator") .field("conf", &self.conf) - .field("file_names", &self.filenames) .field("mutants", &self.mutants) .field("_tmp", &self._tmp) .finish() @@ -138,12 +134,6 @@ impl From<&MutateParams> for Mutator { solc.with_allow_paths(allowpaths); } - let mut filenames: Vec = vec![]; - if let Some(filename) = ¶ms.filename { - log::info!("Creating Source from filename: {}", filename); - filenames.push(filename.clone()); - } - // Every mutator has a FileResolver. A FileResolver is a solang-provided // struct that resolves files, performs import resolution, and then // performs type resolution. @@ -205,26 +195,19 @@ impl From<&MutateParams> for Mutator { } } - Mutator::new(conf, file_resolver, filenames, solc) + Mutator::new(conf, file_resolver, solc) } } impl Mutator { - pub fn new( - conf: MutatorConf, - file_resolver: FileResolver, - filenames: Vec, - solc: Solc, - ) -> Mutator { + pub fn new(conf: MutatorConf, file_resolver: FileResolver, solc: Solc) -> Mutator { log::info!( - "Creating mutator:\n conf: {:#?}\n sources: {:?}\n solc: {:#?}", + "Creating mutator:\n conf: {:#?}\n solc: {:#?}", conf, - filenames, solc ); Mutator { conf, - filenames, mutants: vec![], file_resolver, namespace: None, @@ -371,10 +354,6 @@ impl Mutator { &self.mutants } - pub fn filenames(&self) -> &Vec { - &self.filenames - } - pub fn apply_operators_to_expression(&mut self, expr: &Expression) { if expr.loc().try_file_no().is_some() { let mut mutants = vec![]; From d432eff72f565c2feeb9318b93b0a01b308b3fd9 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 20:18:03 -0700 Subject: [PATCH 182/200] Fixes to README --- README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index dedba5d0..b363c7b2 100644 --- a/README.md +++ b/README.md @@ -166,23 +166,26 @@ You can download prebuilt Gambit binaries for Mac and Linux from our To build Gambit from source, clone [the Gambit repository](https://github.com/Certora/gambit) and run +``` +cargo build --release +``` + +from this repository's root. This will create the `target/release/gambit` +binary. To install globally, run + ``` cargo install --path . ``` -from this repository's root. This will build Gambit and install it to a globally visible +This will build Gambit and install it to a globally visible location on your `PATH`. -You can also build gambit with `cargo build --release` from the root of this -repository. This will create the `target/release/gambit` binary which you can -manually place on your path or invoke directly. - ## Usage -Gambit has two main commands: the [`mutate` command](#the-mutate-command) and -the [`summary` command](#the-summary-command). The `mutate` command is -responsible for mutating code. The `summary` command allows the user to get a -high level summary of the results of an execution of `gambit mutate`. +Gambit has two main commands: the [`mutate` command](#the-mutate-command), which +is responsible for generating mutants, and the [`summary` +command](#the-summary-command), which allows the user to get a high-level +summary of a `gambit mutate` execution. From a153ef318bbe9441e3fa742932cea0e786c01a30 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 20:18:50 -0700 Subject: [PATCH 183/200] Fixed outdated comment --- src/mutator.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mutator.rs b/src/mutator.rs index 3970ee4a..d68ddf9b 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -224,13 +224,9 @@ impl Mutator { } /// Run all mutations! This is the main external entry point into mutation. - /// This function: - /// - /// 1. Mutates each file - /// 2. TODO: Optionally validates (default: yes) all generated/filtered mutants - /// - /// and returns a Vec of mutants. These are not yet written to disk, and can - /// be further validated, suppressed, and downsampled as desired. + /// This function mutates each file and returns a Vec of mutants. These are + /// not yet written to disk, and can be further validated, suppressed, and + /// downsampled as desired. pub fn mutate( &mut self, filenames: Vec, From 30c78341be7445a9ca110aacff15a2f8917b1aed Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 20:23:11 -0700 Subject: [PATCH 184/200] Renamed sol_path to vfs_path --- src/lib.rs | 2 +- src/mutant_writer.rs | 8 ++++---- src/mutation.rs | 18 +++++++++--------- src/mutator.rs | 6 +++--- src/util.rs | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d97a3481..938c409f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -182,7 +182,7 @@ pub fn run_mutate( w.write_record([ mid.to_string().as_str(), mutant.op.short_name().as_str(), - mutant.sol_path().to_str().unwrap(), + mutant.vfs_path().to_str().unwrap(), line_col.as_str(), mutant.orig.as_str(), mutant.repl.as_str(), diff --git a/src/mutant_writer.rs b/src/mutant_writer.rs index d935aa85..add7b048 100644 --- a/src/mutant_writer.rs +++ b/src/mutant_writer.rs @@ -55,7 +55,7 @@ impl MutantWriter { w.write_record([ mid.to_string().as_str(), mutant.op.short_name().as_str(), - mutant.sol_path().to_str().unwrap(), + mutant.vfs_path().to_str().unwrap(), line_col.as_str(), mutant.orig.as_str(), mutant.repl.as_str(), @@ -81,7 +81,7 @@ impl MutantWriter { "op": mutant.op.short_name(), "id": mid.to_string(), "diff": diff, - "original": mutant.sol_path(), + "original": mutant.vfs_path(), "orig": &mutant.orig, "repl": &mutant.repl, "line": &mutant.get_line_column().0 + 1, @@ -113,7 +113,7 @@ impl MutantWriter { mutants_dir: &Path, mutant: &Mutant, ) -> Result> { - let filename = mutants_dir.join(mutant.sol_path()); + let filename = mutants_dir.join(mutant.vfs_path()); let mutant_contents = mutant.mutant_source()?; log::debug!("Writing mutant {:?} to {}", mutant, &filename.display()); @@ -183,7 +183,7 @@ impl MutantWriter { /// This is computed from the relative path of the original sourcefile, relative to /// the specified `sourceroot`, and is computed with `Source.relative_filename()` fn get_mutant_filename(mutants_dir: &Path, mid: usize, mutant: &Mutant) -> PathBuf { - let rel_filename = mutant.sol_path(); + let rel_filename = mutant.vfs_path(); mutants_dir .join(Path::new(&mid.to_string())) .join(rel_filename) diff --git a/src/mutation.rs b/src/mutation.rs index d546ef84..073d7082 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -1,4 +1,4 @@ -use crate::{get_indent, get_sol_path, print_error, print_warning, Mutator}; +use crate::{get_indent, get_vfs_path, print_error, print_warning, Mutator}; use clap::ValueEnum; use num_bigint::BigInt; use num_traits::{One, Signed, Zero}; @@ -29,9 +29,9 @@ pub struct MutantLoc { pub col_no: usize, /// The full path to the original source file pub path: PathBuf, - /// The solidity path, relative to its import root, to the original source - /// file; if a file path is specified absolutely then this is None - pub sol_path: PathBuf, + /// The path in the Virtual File System. This is interpreted as the path of + /// the original source file relative to an import root + pub vfs_path: PathBuf, } impl Debug for MutantLoc { @@ -51,8 +51,8 @@ impl MutantLoc { let (line_no, col_no) = file.offset_to_line_column(loc.start()); let path = file.path.clone(); - let sol_path = if let Some(sol_path) = get_sol_path(resolver, &file.path) { - sol_path + let vfs_path = if let Some(vfs_path) = get_vfs_path(resolver, &file.path) { + vfs_path } else if let Ok(can_path) = file.path.canonicalize() { print_warning( "File Not In Import Paths", @@ -81,7 +81,7 @@ impl MutantLoc { line_no, col_no, path, - sol_path, + vfs_path, } } } @@ -137,8 +137,8 @@ impl Mutant { &self.mutant_loc.path } - pub fn sol_path(&self) -> &PathBuf { - &self.mutant_loc.sol_path + pub fn vfs_path(&self) -> &PathBuf { + &self.mutant_loc.vfs_path } pub fn get_line_column(&self) -> (usize, usize) { diff --git a/src/mutator.rs b/src/mutator.rs index d68ddf9b..ba32f982 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -1,5 +1,5 @@ use crate::{ - default_gambit_output_directory, get_sol_path, mutation::MutationType, + default_gambit_output_directory, get_vfs_path, mutation::MutationType, normalize_mutation_operator_name, print_error, print_warning, Mutant, MutateParams, Mutation, Solc, }; @@ -254,8 +254,8 @@ impl Mutator { /// Mutate a single file. fn mutate_file(&mut self, filename: &String) -> Result, Box> { // Check if we can mutate path - let sol_path = get_sol_path(&self.file_resolver, &PathBuf::from(filename)); - if sol_path.is_none() { + let vfs_path = get_vfs_path(&self.file_resolver, &PathBuf::from(filename)); + if vfs_path.is_none() { let import_paths: Vec = self .file_resolver .get_import_paths() diff --git a/src/util.rs b/src/util.rs index 6f2fd2a7..487e4efd 100644 --- a/src/util.rs +++ b/src/util.rs @@ -330,7 +330,7 @@ pub fn statement_type(stmt: &Statement) -> &str { } /// Get the import path, if available, from resolver for the import_no -pub fn get_sol_path(resolver: &FileResolver, filepath: &Path) -> Option { +pub fn get_vfs_path(resolver: &FileResolver, filepath: &Path) -> Option { let import_paths = resolver.get_import_paths(); for import_path in import_paths.iter().filter_map(|p| match p { (None, ip) => Some(ip), From ca50512ea92aafcf8f7acd5b4b5d51b587c89843 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 20:45:16 -0700 Subject: [PATCH 185/200] added note --- src/lib.rs | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 938c409f..8796d06b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -133,6 +133,29 @@ pub fn run_mutate( /* * * FILTER/VALIDATE * * =============== */ + + // We allow users to filter generated mutants down (currently just + // by --num_mutants, which randomly downsamples to a specified + // number of mutants). + // + // We also allow users to validate the generated mutants by + // compiling them with Solc. + // + // When we are both filtering and validating there is a cyclic + // dependency: + // + // + Filter depends on Validation: we don't want to filter down to 5 + // mutants and have 4 of them be invalid. Therefore, when we + // filter we need to know if a mutant is valid. + // + Validation depends on Filter: We don't want to validate 1000 + // mutants if we are going to filter down to 5 mutants. Validation + // is by far the most expensive part of Gambit, so skipping + // validation for 90% of the generated mutants is desirable. + // Therefore, when we are filtering and validating, we defer + // validation until the filter tries to produce a mutant + + // Set up our Validator, which is just a wrapper around a Solc + // instance. let mut solc = Solc::new( params.solc.clone().unwrap_or_else(|| "solc".to_string()), outdir_path.clone(), @@ -140,7 +163,18 @@ pub fn run_mutate( solc.with_vfs_roots_from_params(params); let mut validator = Validator { solc }; log::debug!("Validator: {:?}", validator); + + // There are three cases we consier: + // 1. We are downsampling due to `--num_mutants` being supplied by + // the user. + // + // 2. `--num_mutants` was not specified, and the user requested that + // we skip validation + // + // 3. `--num_mutants` was not specified and the user did NOT request + // that we skip validation let (sampled, invalid) = if let Some(num_mutants) = params.num_mutants { + // Case 1: We are downsampling log::info!("Filtering down to {} mutants", num_mutants); log::debug!(" seed: {:?}", params.seed); log::debug!(" validating?: {}", !params.skip_validate); @@ -163,15 +197,23 @@ pub fn run_mutate( } (sampled, invalid) } else if params.skip_validate { + // Case 2: We did not downsample and we are skipping validation log::info!("Skipping validation"); (mutants, vec![]) } else { + // Case 3: We did not downsample and we are validating let (sampled, invalid) = validator.get_valid_mutants(&mutants); log::info!("Validation resulted in {} valid mutants", sampled.len()); log::info!(" and {} invalid mutants", invalid.len()); (sampled, invalid) }; + // Note: This probably belongs below w/ other mutant writer stuff, + // but the invalid mutant info goes out of scope at the end of this + // loop. We would want to preserve this by storing it in a map from + // output directories to invalid mutants. Then, when we iterate + // through outdirectories for mutant writing we could access the + // corresponding invalid mutants if params.log_invalid { let invalid_log = &outdir_path.join("invalid.log"); let mut w = Writer::from_path(invalid_log)?; From 7982488dbfeefa1831deeaa3fb6c52247ff80035 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 20:52:50 -0700 Subject: [PATCH 186/200] added comments, and return slice of generated mutants from apply_operators* --- src/mutator.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/mutator.rs b/src/mutator.rs index ba32f982..a2815914 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -350,7 +350,10 @@ impl Mutator { &self.mutants } - pub fn apply_operators_to_expression(&mut self, expr: &Expression) { + /// Apply all regular mutation operators to an expression, and add those + /// mutants to self.mutants. Return the slice of new mutants + pub fn apply_operators_to_expression(&mut self, expr: &Expression) -> &[Mutant] { + let num_mutants_at_start = self.mutants.len(); if expr.loc().try_file_no().is_some() { let mut mutants = vec![]; for op in self.mutation_operators() { @@ -361,9 +364,13 @@ impl Mutator { } self.mutants.append(&mut mutants); } + return &self.mutants[num_mutants_at_start..self.mutants.len()]; } - pub fn apply_fallback_operators_to_expression(&mut self, expr: &Expression) { + /// Apply all fallback mutation operators to an expression, and add those + /// mutants to self.mutants. Return the slice of new mutants + pub fn apply_fallback_operators_to_expression(&mut self, expr: &Expression) -> &[Mutant] { + let num_mutants_at_start = self.mutants.len(); if expr.loc().try_file_no().is_some() { let mut mutants = vec![]; for op in self.fallback_mutation_operators() { @@ -371,9 +378,13 @@ impl Mutator { } self.mutants.append(&mut mutants); } + return &self.mutants[num_mutants_at_start..self.mutants.len()]; } - pub fn apply_operators_to_statement(&mut self, stmt: &Statement) { + /// Apply all regular mutation operators to a statement, and add those + /// mutants to self.mutants. Return the slice of new mutants + pub fn apply_operators_to_statement(&mut self, stmt: &Statement) -> &[Mutant] { + let num_mutants_at_start = self.mutants.len(); if stmt.loc().try_file_no().is_some() { let mut mutants = vec![]; for op in self.mutation_operators() { @@ -381,6 +392,7 @@ impl Mutator { } self.mutants.append(&mut mutants); } + return &self.mutants[num_mutants_at_start..self.mutants.len()]; } } From e6c8f84688cb05973aea5f00d11521b09ea72a08 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 20:57:03 -0700 Subject: [PATCH 187/200] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b363c7b2..c0e9df66 100644 --- a/README.md +++ b/README.md @@ -343,7 +343,7 @@ Gambit uses provided import paths and import remappings to invoke `solc`. For instance, if you invoke `gambit mutate C.sol --import_paths A B C --import_maps @x=y/@x`, then Gambit will validate a generated mutant by calling `solc MutatedC.sol --base-path A/ --include-path B/ --include-path C/ @x=y/@x`. If -you need to specify a solc `--allow-paths` argument, use the `mutate` +you need to specify a `solc` `--allow-paths` argument, use the `mutate` command's `--solc_allow_paths` argument. From d3cbe31f0dc9a99bb30464d16db32ef47c054db0 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 21:38:03 -0700 Subject: [PATCH 188/200] readme --- README.md | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index c0e9df66..3d859cf2 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,7 @@ summary of a `gambit mutate` execution. -## The `mutate` Command +## The `mutate` command Gambit's `mutate` command expects user-provided _mutation parameters_ describing which files to mutate, which mutation operators to apply, and several other @@ -204,34 +204,34 @@ The `mutate` command does the following: 1. **Parse:** Gambit begins by parsing the specified Solidity files provided on command line or in the configuration file -2. **Function filters:** The `mutate` command provides the `--functions` and - `--contract` filters to allow users to filter which functions should be - mutated. When `--functions` is specified, Gambit will only mutate functions - with a name contained in the provided list of functions. When `--contract` is - specified, Gambit will only mutate functions within the specified contract. If - neither option is specified, Gambit will mutate all functions. - -3. **Mutation:** Gambit recursively visits the body of each function retained in - (2) and applies the mutation operators specified by the user; if no mutation - operators were specified then Gambit uses a default set of mutation - operators. - -4. **Validation:** By default Gambit will _validate_ each - generated mutant by compiling it with the `solc` compiler. If compilation - fails Gambit will not export the mutant to disk or report it in - `gambit_results.json` or `mutants.log`. Validation can be skipped with the - `--skip_validate` option. To log invalidated mutants, use the `--log_invalid` - option. +2. **Function filters:** The `mutate` command provides two ways to filter which + functions are mutated: the `--functions` filter and the `--contract` filter. + When `--functions` is specified, Gambit will only mutate functions with a name + contained in the provided list of functions. When `--contract` is specified, + Gambit will only mutate functions within the specified contract. If neither + option is specified, Gambit will mutate all functions. + +3. **Mutation:** Gambit recursively visits the body of each function not + filtered out in (2) and applies the mutation operators specified by the user; + if no mutation operators were specified then Gambit uses a default set of + mutation operators. + +4. **Validation:** By default Gambit will _validate_ each generated mutant by + compiling it with the `solc` compiler. If compilation fails Gambit will not + export the mutant to disk or report it in `gambit_results.json` or + `mutants.log`. Validation can be skipped with the `--skip_validate` option. + To log invalidated mutants, use the `--log_invalid` option. -5. **Down sampling:** If the user provides the `--num_mutants n` argument, - Gambit will randomly down sample to `n` mutants. +5. **Random down sampling:** If the user provides the `--num_mutants n` + argument, Gambit will randomly down sample to `n` mutants. 6. **Write to disk:** After all mutants are generated, validated, and optionally - down sampled, the `mutate` writes the results to disk. This includes - as well as specify several + down sampled, the `mutate` command exports the generated mutants and writes + to the output directory (`gambit_out` by default), and writes a summary of + each mutant to `gambit_out/gambit_results.json`. -### Running `mutate` with Command Line Arguments +### Running `mutate` with command line arguments By default the `mutate` command expects mutation parameters to be specified on the command line. @@ -241,10 +241,10 @@ gambit mutate FILENAME [ARGS...] ``` - -#### `mutate` CLI Arguments + +#### `mutate` command line interface options -Gambit's `mutate` CLI supports the following options: +Gambit's `mutate` command line interface supports the following options: TODO: Fix this From 3ded860d81f1da6ec82b6bdb1b9d9784725e4060 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 22:20:54 -0700 Subject: [PATCH 189/200] typo --- README.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3d859cf2..bf449e5b 100644 --- a/README.md +++ b/README.md @@ -183,9 +183,9 @@ location on your `PATH`. ## Usage Gambit has two main commands: the [`mutate` command](#the-mutate-command), which -is responsible for generating mutants, and the [`summary` -command](#the-summary-command), which allows the user to get a high-level -summary of a `gambit mutate` execution. +is responsible for generating mutants, and the +[`summary` command](#the-summary-command), which allows the user to get a +high-level summary of a `gambit mutate` execution. @@ -196,8 +196,9 @@ which files to mutate, which mutation operators to apply, and several other options. By default, these mutation parameters are specified by the user with [command line arguments](#running-mutate-with-command-line-arguments). To handle more complex use cases, and to allow for easy reproducibility, Gambit -can read mutation parameters from a [JSON configuration -file](#running-mutate-with-a-configuration-file) with the `--json` argument. +can read mutation parameters from a +[JSON configuration file](#running-mutate-with-a-configuration-file) with the +`--json` argument. The `mutate` command does the following: @@ -234,7 +235,7 @@ The `mutate` command does the following: ### Running `mutate` with command line arguments By default the `mutate` command expects mutation parameters to be specified -on the command line. +on the command line: ``` gambit mutate FILENAME [ARGS...] @@ -246,8 +247,6 @@ gambit mutate FILENAME [ARGS...] Gambit's `mutate` command line interface supports the following options: -TODO: Fix this - | Option | Description | | :------------------- | :--------------------------------------------------------------------------------------------------------------------------- | | `--contract` | specify a specific contract name to mutate; by default mutate all contracts | @@ -321,6 +320,14 @@ Relative paths in a Gambit configuration file are _relative to the parent directory of the configuration file_. This allows Gambit to be run from any location without affecting the build configuration. +_**Warning:** +Remapping targets are **not relative paths**! If you specify a remapping +`@map=expanded/@map`, the target `expanded/@map` doesn't need to be a valid +path. Instead, it needs to be be valid when extending a provided `import_path`. +So if the only import path is `.`, then `./expanded/@map` has to exist. But if +import paths `contracts` and `modules` are given, then one of either +`contracts/expanded/@map` or `modules/expanded/@map` needs to exist._ + ### Import Paths and Remappings Gambit resolves imports while parsing, and this requires that you specify any From 007836ccf9cc962ab571b3bcbdf023eba6ae39b1 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 22:21:10 -0700 Subject: [PATCH 190/200] Added warning to generate_rtd_markdown --- scripts/generate_rtd_markdown.py | 38 +++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/scripts/generate_rtd_markdown.py b/scripts/generate_rtd_markdown.py index 366e1a02..4e718ffc 100644 --- a/scripts/generate_rtd_markdown.py +++ b/scripts/generate_rtd_markdown.py @@ -81,6 +81,14 @@ def is_note_end(line: str) -> bool: return len(l) == 1 or l[-2] != "_" +def is_warning_end(line: str) -> bool: + """ + A warning ends when a line is ended by an underscore. We double check to + ensure that the line doesn't end with two underscores. + """ + return is_note_end(line) + + def is_escaped_closed_comment(line: str) -> bool: return line.strip() == r"--\>" @@ -92,7 +100,8 @@ def translate_readme_to_rtd(readme_file_path: str) -> str: lines2 = [] suppress_start = -1 # Track if we are suppressing - note_start = -1 # Track if we've started a note + admonition_start = -1 + admonition_start = -1 # Track if we've started a note emit_start = -1 for i, line in enumerate(lines): # First, check if we are suppressing @@ -105,19 +114,36 @@ def translate_readme_to_rtd(readme_file_path: str) -> str: if anchor is not None: lines2.append(anchor) elif "_**note:**" == line.strip().lower(): - if note_start > -1: + if admonition_start > -1: raise RuntimeError( - f"Already in note from line {note_start + 1}, cannot start new note on line {i+1}" + f"Already in note from line {admonition_start + 1}, cannot start new note on line {i+1}" ) - note_start = i + admonition_start = i lines2.append("```{note}") elif "_**note:**" in line.strip().lower(): raise RuntimeError( f"Illegal note start on line {i+1}: new note tags '_**Note:**' and their closing '_' must be on their own lines" ) - elif note_start > -1 and is_note_end(line): - note_start = -1 + elif admonition_start > -1 and is_note_end(line): + admonition_start = -1 + lines2.append(line.rstrip().rstrip("_")) + lines2.append("```") + + elif "_**warning:**" == line.strip().lower(): + if admonition_start > -1: + raise RuntimeError( + f"Already in warning from line {admonition_start + 1}, cannot start new warning on line {i+1}" + ) + admonition_start = i + lines2.append("```{warning}") + elif "_**warning:**" in line.strip().lower(): + raise RuntimeError( + f"Illegal warning start on line {i+1}: new warning tags '_**Warning:**' and their closing '_' must be on their own lines" + ) + + elif admonition_start > -1 and is_warning_end(line): + admonition_start = -1 lines2.append(line.rstrip().rstrip("_")) lines2.append("```") From 0075f05abc0a8f279d15fb18a864641144dbd5d1 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 22:29:55 -0700 Subject: [PATCH 191/200] minor fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf449e5b..1d8962b8 100644 --- a/README.md +++ b/README.md @@ -349,7 +349,7 @@ Gambit invocation becomes `gambit mutate C.sol --import_maps Gambit uses provided import paths and import remappings to invoke `solc`. For instance, if you invoke `gambit mutate C.sol --import_paths A B C --import_maps @x=y/@x`, then Gambit will validate a generated mutant by calling `solc -MutatedC.sol --base-path A/ --include-path B/ --include-path C/ @x=y/@x`. If +MutatedC.sol --base-path A --include-path B --include-path C @x=y/@x`. If you need to specify a `solc` `--allow-paths` argument, use the `mutate` command's `--solc_allow_paths` argument. From 56b085247e4b3aecdb4e5a8b7087e2aea3a560e5 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Tue, 12 Sep 2023 22:38:17 -0700 Subject: [PATCH 192/200] Fixed internal link across two lines error, updated readme --- README.md | 12 +++++++----- scripts/generate_rtd_markdown.py | 7 ++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1d8962b8..1b042a95 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,8 @@ stronger test suites and specifications should detect more mutants as faulty. You can download prebuilt Gambit binaries for Mac and Linux from our [releases](https://github.com/Certora/gambit/releases) page. -To build Gambit from source, clone [the Gambit repository](https://github.com/Certora/gambit) and run +To build Gambit from source, clone [the Gambit +repository](https://github.com/Certora/gambit) and run ``` cargo build --release @@ -183,9 +184,9 @@ location on your `PATH`. ## Usage Gambit has two main commands: the [`mutate` command](#the-mutate-command), which -is responsible for generating mutants, and the -[`summary` command](#the-summary-command), which allows the user to get a -high-level summary of a `gambit mutate` execution. +is responsible for generating mutants, and the [`summary` +command](#the-summary-command), which allows the user to get a high-level +summary of a `gambit mutate` execution. @@ -514,7 +515,8 @@ Gambit implements the following mutation operators | **unary-operator-replacement** | Replace a unary operator with another | `-b` -> `~b` | | **statement-deletion** | Replace a statement with a no-op (`assert(true)`) | `self.checkInvariants();` -> `assert(true);` | -For more details on each mutation type, refer to the [full documentation](https://docs.certora.com/en/latest/docs/gambit/gambit.html#mutation-types). +For more details on each mutation type, refer to the [full +documentation](https://docs.certora.com/en/latest/docs/gambit/gambit.html#mutation-types). ## Contact diff --git a/scripts/generate_rtd_markdown.py b/scripts/generate_rtd_markdown.py index 4e718ffc..a5e218f4 100644 --- a/scripts/generate_rtd_markdown.py +++ b/scripts/generate_rtd_markdown.py @@ -175,9 +175,10 @@ def translate_readme_to_rtd(readme_file_path: str) -> str: ) else: # replace internal links - l = replace_internal_references(line) - lines2.append(l.strip("\n")) - return "\n".join(lines2) + "\n" + lines2.append(line.strip("\n")) + combined = "\n".join(lines2) + "\n" + combined = replace_internal_references(combined) + return combined def main(): From 8a775632e1ad5b8617117ab0b2ba7ca69c14e488 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 13 Sep 2023 17:11:39 -0700 Subject: [PATCH 193/200] Fix in mutator: add diagnostics --- src/mutator.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mutator.rs b/src/mutator.rs index a2815914..475979aa 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -276,6 +276,12 @@ impl Mutator { log::info!(" {} files", ns.files.len()); log::info!(" {} contracts", ns.contracts.len()); log::info!(" {} functions", ns.functions.len()); + + if ns.diagnostics.any_errors() { + ns.print_diagnostics(&self.file_resolver, true); + return Err("error".into()); + } + self.namespace = Some(ns.clone()); let resolved = match self.file_resolver.resolve_file(None, os_filename) { @@ -304,7 +310,7 @@ impl Mutator { continue; } } - if function.is_accessor || function.is_virtual || !function.has_body { + if function.is_accessor || !function.has_body { continue; } let contract = if let Some(contract_no) = function.contract_no { From f6b10429e235235f33f55f888a1e0b26c0bdff6a Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 13 Sep 2023 18:36:40 -0700 Subject: [PATCH 194/200] Some bug fixes and cleanup --- src/lib.rs | 6 +- src/main.rs | 8 +- src/mutation.rs | 238 ++++++++++++++++++++++++++++++------------------ src/mutator.rs | 10 +- 4 files changed, 160 insertions(+), 102 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 8796d06b..d09d7b61 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -118,11 +118,7 @@ pub fn run_mutate( * ====== */ log::info!("Creating mutator"); let mut mutator = Mutator::from(params); - let sources = params - .filename - .iter() - .map(|x| x.clone()) - .collect::>(); + let sources = params.filename.iter().cloned().collect::>(); let mutants = mutator.mutate(sources)?.clone(); log::info!( "(pre filter/validate) Generated {} mutants for {}", diff --git a/src/main.rs b/src/main.rs index d9d876b9..cbb3f905 100644 --- a/src/main.rs +++ b/src/main.rs @@ -69,7 +69,7 @@ fn print_experimental_feature_warnings(params: &MutateParams) { print_experimental_feature_warning("fallback_mutations", "1.0.0"); } - let experimental_mutation_operators = vec![("evr", "1.0.0")] + let experimental_mutation_operators = [("evr", "1.0.0")] .iter() .map(|item| (normalize_mutation_operator_name(item.0), item.1)) .collect::>(); @@ -78,7 +78,7 @@ fn print_experimental_feature_warnings(params: &MutateParams) { let all_mutations = match (¶ms.mutations, ¶ms.fallback_mutations) { (Some(mutations), None) => mutations.clone(), (None, Some(fallback_mutations)) => fallback_mutations.clone(), - (Some(r1), Some(r2)) => r1.into_iter().chain(r2).cloned().collect(), + (Some(r1), Some(r2)) => r1.iter().chain(r2).cloned().collect(), _ => vec![], } .iter() @@ -221,8 +221,8 @@ fn run_mutate_on_json(params: Box) -> Result<(), Box) -> Loc { - match expr { +fn get_op_loc(expr: &Expression, source: &Arc) -> Option { + Some(match expr { // Regular Binary operator Expression::Add { left, right, .. } | Expression::Subtract { left, right, .. } @@ -438,6 +438,35 @@ fn get_op_loc(expr: &Expression, source: &Arc) -> Loc { | Expression::And { left, right, .. } => { let start = left.loc().end(); let end = right.loc().start(); + if start >= end { + // Okay, we gotta do this the hard way. Here is what happened: + // We had an op+assignment expression like `a += b`, which got + // desugared to `a = a + b`. There is a bug in Solang's + // desugaring https://github.com/hyperledger/solang/issues/1521 + // that triggers when the LHS of a += b is a storage access. + // This bug causes the location of the LHS to be that of the + // entire expression, so LHS.end() is actually the end of the + // entire expression (so printing source[LHS.start()..LHS.end()] + // would print a += b). + // + // We detect this, issue a warning with the logger, and continue + log::warn!( + "Error: invalid location generated by Solang for LHS of expression {}", + &source[expr.loc().start()..expr.loc().end()], + ); + log::warn!( + "expr.start()..lhs.end(): {}", + &source[expr.loc().start()..start] + ); + log::warn!( + "lhs.start()..expr.end(): {}", + &source[end..expr.loc().end()] + ); + log::warn!("left: {}", &source[left.loc().start()..left.loc().end()]); + log::warn!("right: {}", &source[right.loc().start()..right.loc().end()]); + log::warn!("No mutants generated for this node"); + return None; + } let op = get_operator(expr); let substr = &source[start..end]; let first_op_char = op.chars().next().unwrap(); @@ -502,7 +531,7 @@ fn get_op_loc(expr: &Expression, source: &Arc) -> Loc { } _ => panic!("No op location for {:?}", expr), - } + }) } /// Get a string representation of an operator @@ -569,35 +598,43 @@ fn arith_op_replacement( }; let op_loc = get_op_loc(expr, contents); - replacements - .iter() - .map(|r| { - Mutant::new( - file_resolver, - namespace.clone(), - op_loc, - *op, - arith_op.to_string(), - r.to_string(), - ) - }) - .collect() + if let Some(op_loc) = op_loc { + replacements + .iter() + .map(|r| { + Mutant::new( + file_resolver, + namespace.clone(), + op_loc, + *op, + arith_op.to_string(), + r.to_string(), + ) + }) + .collect() + } else { + vec![] + } } Expression::Power { .. } => { let op_loc = get_op_loc(expr, contents); - replacements - .iter() - .map(|r| { - Mutant::new( - file_resolver, - namespace.clone(), - op_loc, - *op, - arith_op.to_string(), - r.to_string(), - ) - }) - .collect() + if let Some(op_loc) = op_loc { + replacements + .iter() + .map(|r| { + Mutant::new( + file_resolver, + namespace.clone(), + op_loc, + *op, + arith_op.to_string(), + r.to_string(), + ) + }) + .collect() + } else { + vec![] + } } _ => vec![], } @@ -617,36 +654,48 @@ fn bitwise_op_replacement( match expr { Expression::BitwiseOr { .. } => { let op_loc = get_op_loc(expr, source); - vec![Mutant::new( - file_resolver, - namespace, - op_loc, - *op, - "|".to_string(), - "&".to_string(), - )] + if let Some(op_loc) = op_loc { + vec![Mutant::new( + file_resolver, + namespace, + op_loc, + *op, + "|".to_string(), + "&".to_string(), + )] + } else { + vec![] + } } Expression::BitwiseAnd { .. } => { let op_loc = get_op_loc(expr, source); - vec![Mutant::new( - file_resolver, - namespace, - op_loc, - *op, - "&".to_string(), - "|".to_string(), - )] + if let Some(op_loc) = op_loc { + vec![Mutant::new( + file_resolver, + namespace, + op_loc, + *op, + "&".to_string(), + "|".to_string(), + )] + } else { + vec![] + } } Expression::BitwiseXor { .. } => { let op_loc = get_op_loc(expr, source); - vec![Mutant::new( - file_resolver, - namespace, - op_loc, - *op, - "^".to_string(), - "&".to_string(), - )] + if let Some(op_loc) = op_loc { + vec![Mutant::new( + file_resolver, + namespace, + op_loc, + *op, + "^".to_string(), + "&".to_string(), + )] + } else { + vec![] + } } _ => vec![], } @@ -836,6 +885,10 @@ fn rel_op_replacement( let expr_string = &source[expr_start..expr_end].to_string(); let rel_op_loc = get_op_loc(expr, source); + if rel_op_loc.is_none() { + return vec![]; + } + let rel_op_loc = rel_op_loc.unwrap(); let rel_op_start = rel_op_loc.start(); let rel_op_end = rel_op_loc.end(); let rel_op_string = source[rel_op_start..rel_op_end].to_string(); @@ -882,25 +935,33 @@ fn shift_op_replacement( match expr { Expression::ShiftLeft { .. } => { let op_loc = get_op_loc(expr, source); - vec![Mutant::new( - file_resolver, - namespace, - op_loc, - *op, - "<<".to_string(), - ">>".to_string(), - )] + if let Some(op_loc) = op_loc { + vec![Mutant::new( + file_resolver, + namespace, + op_loc, + *op, + "<<".to_string(), + ">>".to_string(), + )] + } else { + vec![] + } } Expression::ShiftRight { .. } => { let op_loc = get_op_loc(expr, source); - vec![Mutant::new( - file_resolver, - namespace, - op_loc, - *op, - ">>".to_string(), - "<<".to_string(), - )] + if let Some(op_loc) = op_loc { + vec![Mutant::new( + file_resolver, + namespace, + op_loc, + *op, + ">>".to_string(), + "<<".to_string(), + )] + } else { + vec![] + } } _ => vec![], } @@ -963,20 +1024,24 @@ fn unary_op_replacement( let unary_op = get_operator(expr); let replacements: Vec<&&str> = ["-", "~"].iter().filter(|x| **x != unary_op).collect(); let op_loc = get_op_loc(expr, source); - let muts = replacements - .iter() - .map(|r| { - Mutant::new( - file_resolver, - namespace.clone(), - op_loc, - *op, - unary_op.to_string(), - format!("{}", r), - ) - }) - .collect(); - muts + if let Some(op_loc) = op_loc { + let muts = replacements + .iter() + .map(|r| { + Mutant::new( + file_resolver, + namespace.clone(), + op_loc, + *op, + unary_op.to_string(), + r.to_string(), + ) + }) + .collect(); + muts + } else { + vec![] + } } _ => vec![], }; @@ -1151,10 +1216,7 @@ mod test { #[test] pub fn test_elim_delegate_mutation() -> Result<(), Box> { - let ops = vec![ - MutationType::ElimDelegateCall, - MutationType::ArithmeticOperatorReplacement, - ]; + let ops = vec![MutationType::ElimDelegateCall]; // TODO: how should I test this? let code = "\ // SPDX-License-Identifier: GPL-3.0-only @@ -1166,7 +1228,7 @@ contract B { uint public value; function setVars(uint _num) public payable { - usize c = 1 + 2; + uint c = 1 + 2; num = _num; sender = msg.sender; diff --git a/src/mutator.rs b/src/mutator.rs index 475979aa..8c07c1b8 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -315,12 +315,12 @@ impl Mutator { } let contract = if let Some(contract_no) = function.contract_no { let contract = ns.contracts.get(contract_no).unwrap(); - Some(format!("{}", &contract.name)) + Some(contract.name.to_string()) } else { None }; - let contract_name = contract.unwrap_or_else(|| "".to_string()); + let contract_name = contract.unwrap_or_default(); let function_name = function.name.clone(); if let Some(ref funcs_to_mutate) = self.conf.funcs_to_mutate { if !funcs_to_mutate.contains(&function_name) { @@ -370,7 +370,7 @@ impl Mutator { } self.mutants.append(&mut mutants); } - return &self.mutants[num_mutants_at_start..self.mutants.len()]; + &self.mutants[num_mutants_at_start..self.mutants.len()] } /// Apply all fallback mutation operators to an expression, and add those @@ -384,7 +384,7 @@ impl Mutator { } self.mutants.append(&mut mutants); } - return &self.mutants[num_mutants_at_start..self.mutants.len()]; + &self.mutants[num_mutants_at_start..self.mutants.len()] } /// Apply all regular mutation operators to a statement, and add those @@ -398,7 +398,7 @@ impl Mutator { } self.mutants.append(&mut mutants); } - return &self.mutants[num_mutants_at_start..self.mutants.len()]; + &self.mutants[num_mutants_at_start..self.mutants.len()] } } From 439755aa766a445ab57edb40ba4d81f2cae9e639 Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 13 Sep 2023 18:36:47 -0700 Subject: [PATCH 195/200] Fixed my email --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3c081946..a7082077 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" authors = [ "Chandrakana Nandi ", "Samwise Parkinson ", - "Ben Kushigian ", + "Ben Kushigian ", ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html From d2a30436b88c4a20abff6a7a0d30e9701c4214df Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 13 Sep 2023 18:37:15 -0700 Subject: [PATCH 196/200] Change to generating rtd docs --- scripts/generate_rtd_markdown.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/generate_rtd_markdown.py b/scripts/generate_rtd_markdown.py index a5e218f4..8dfae201 100644 --- a/scripts/generate_rtd_markdown.py +++ b/scripts/generate_rtd_markdown.py @@ -81,6 +81,13 @@ def is_note_end(line: str) -> bool: return len(l) == 1 or l[-2] != "_" +def is_tag(tag: str, line: str): + """ + Check if a line consists + """ + return line.strip() in (f"<{tag}>", f"") + + def is_warning_end(line: str) -> bool: """ A warning ends when a line is ended by an underscore. We double check to @@ -154,6 +161,9 @@ def translate_readme_to_rtd(readme_file_path: str) -> str: ) emit_start = i + elif is_tag("pre", line): + lines2.append("```") + elif line.strip() == "-->" and emit_start > -1: emit_start = -1 From c019e881a95e751926e7088e7e04ffb0f95b252a Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 13 Sep 2023 23:54:55 -0700 Subject: [PATCH 197/200] Removed debug print from diagnostics --- src/mutator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mutator.rs b/src/mutator.rs index 8c07c1b8..3dde752a 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -278,7 +278,7 @@ impl Mutator { log::info!(" {} functions", ns.functions.len()); if ns.diagnostics.any_errors() { - ns.print_diagnostics(&self.file_resolver, true); + ns.print_diagnostics(&self.file_resolver, false); return Err("error".into()); } From 5747e0da98be3f3dd7c1604d29bd6a9e6a471cfc Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Wed, 13 Sep 2023 23:55:11 -0700 Subject: [PATCH 198/200] Updated README --- README.md | 104 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 53 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index 1b042a95..7d7127e1 100644 --- a/README.md +++ b/README.md @@ -279,42 +279,62 @@ gambit mutate --json CONFIGURATION_JSON A set of mutation parameters are stored as a JSON object mapping option names to -values: +values. For instance, if we wanted to mutate the `ERC20` contract from the +[OpenZeppelin Contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) +repository we could use the following configuration file ```json { - "filename": "contracts/ERC20.sol", - "outdir": "gambit_out", - "no_overwrite": true, - "num_mutants": 5, - "import_paths": ["imports1", "imports2"], - "import_maps": ["a=x/a", "b=x/b"] + "filename": "contracts/token/ERC20/ERC20.sol", + "solc": "solc8.20", + "outdir": "gambit_out", + "import_paths": ["."] } ``` -Gambit also supports specifying multiple sets of mutation parameters in a file. -Instead of a single JSON object, your configuration file should contain an -array of objects: +Gambit also supports specifying multiple sets of mutation parameters in a file, +and this allows you to create mutant sets that are tailored to your needs. +For instance, if you wanted to mutate functions `transferFrom` and `_transfer` +with one set of mutations and functions `_update` and `_mint` with another set +of mutations, and create exactly 2 mutants for each, you could use the following +configuration file: ```json [ - { - "filename": "Foo.sol", - "contract": "C", - "functions": ["bar", "baz"], - "solc": "solc8.12", - "solc_optimize": true - }, - { - "filename": "Blip.sol", - "contract": "D", - "functions": ["bang"], - "solc": "solc8.12" - } + { + "filename": "contracts/token/ERC20/ERC20.sol", + "solc": "solc8.20", + "outdir": "gambit_out", + "num_mutants": 2, + "functions": ["transferFrom", "_transfer"], + "mutations": ["statement-deletion"], + "import_paths": ["."] + }, + { + "filename": "contracts/token/ERC20/ERC20.sol", + "solc": "solc8.20", + "outdir": "gambit_out", + "num_mutants": 2, + "functions": ["_update", "_mint"], + "mutations": ["relational-operator-replacement", "logical-operator-replacement"], + "import_paths": ["."] + } ] ``` +If we store this to `conf2.json`, then we can run it as follows: + +``` +$ gambit mutate --json conf2.json +Generated 4 mutants in 0.22 seconds +$ gambit summary + +STD: 4 (100.00%) +--------------------- +TOT: 4 (100.00%) +``` + #### Paths in Configuration Files Relative paths in a Gambit configuration file are _relative to the parent @@ -360,31 +380,21 @@ command's `--solc_allow_paths` argument. The `summary` command allows the user to see a summary of a `mutate` run: ``` -gambit mutate benchmarks/Ops/AOR/AOR.sol -``` - -
+$ gambit mutate benchmarks/Ops/AOR/AOR.sol
 Generated 27 mutants in 0.41 seconds
-
-``` -gambit summary -``` - -
+$ gambit summary
 STD:      5 ( 18.52%)
 AOR:     22 ( 81.48%)
 ---------------------
 TOT:     27 (100.00%)
-
+``` To print the diffs of specific mutants, pass the `--mids` option: ``` $ gambit summary --mids 1 2 -``` - -
+
              === Mutant ID: 1 [StatementDeletion] ===
 
 --- original
@@ -427,15 +437,13 @@ Pass the `--short` option to print a shorter summary of each mutant:
 
 ```
 $ gambit summary --mids 1 2 3 4 5 --short
-```
-
-
+
 (1) STD [mutants/1/benchmarks/Ops/AOR/AOR.sol@13:9] return a + b -> assert(true)
 (2) AOR [mutants/2/benchmarks/Ops/AOR/AOR.sol@13:18] + -> -
 (3) AOR [mutants/3/benchmarks/Ops/AOR/AOR.sol@13:18] + -> *
 (4) AOR [mutants/4/benchmarks/Ops/AOR/AOR.sol@13:18] + -> /
 (5) AOR [mutants/5/benchmarks/Ops/AOR/AOR.sol@13:18] + -> %
-
+``` _**Note:** The `summary` command is currently experimental, and its output and interface @@ -447,17 +455,12 @@ may change in future releases._ `gambit mutate` produces all results in an output directory (default: `gambit_out`). Here is an example: -```bash -gambit mutate benchmarks/Ops/AOR/AOR.sol -n 5 -tree gambit_out -L 2 ``` - -
-Generated 5 mutants in 0.15 seconds
-
+$ gambit mutate benchmarks/Ops/AOR/AOR.sol -n 5
+Generated 5 mutants in 0.14 seconds
+$ tree gambit_out -L 2
 gambit_out
 ├── gambit_results.json
-├── input_json
 ├── mutants
 │   ├── 1
 │   ├── 2
@@ -466,11 +469,10 @@ gambit_out
 │   └── 5
 └── mutants.log
 
-
+``` This has the following structure: + `gambit_results.json`: a JSON file with detailed results -+ `input_json/`: intermediate files produced by `solc` that are used during mutation + `mutants/`: exported mutants. Each mutant is in its own directory named after its mutant ID (mid) 1, 2, 3, ... + `mutants.log`: a log file with all mutant information. This is similar to From 88f41da9fe8c9d2105544e4777243d2a28f4d2be Mon Sep 17 00:00:00 2001 From: Ben Kushigian Date: Thu, 14 Sep 2023 00:00:25 -0700 Subject: [PATCH 199/200] Updated readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7d7127e1..59bc49f5 100644 --- a/README.md +++ b/README.md @@ -317,7 +317,7 @@ configuration file: "outdir": "gambit_out", "num_mutants": 2, "functions": ["_update", "_mint"], - "mutations": ["relational-operator-replacement", "logical-operator-replacement"], + "mutations": ["relational-operator-replacement"], "import_paths": ["."] } ] @@ -330,7 +330,8 @@ $ gambit mutate --json conf2.json Generated 4 mutants in 0.22 seconds $ gambit summary -STD: 4 (100.00%) +ROR: 2 ( 50.00%) +STD: 2 ( 50.00%) --------------------- TOT: 4 (100.00%) ``` From 978211946f409680dff2f87497f88eeb3fccadc9 Mon Sep 17 00:00:00 2001 From: bkushigian Date: Fri, 15 Sep 2023 08:49:16 -0700 Subject: [PATCH 200/200] Removed hack since solang removed a bug --- src/mutator.rs | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/src/mutator.rs b/src/mutator.rs index 3dde752a..53aef9d3 100644 --- a/src/mutator.rs +++ b/src/mutator.rs @@ -159,34 +159,9 @@ impl From<&MutateParams> for Mutator { panic!("Invalid remapping: {}", rm); } let map = split_rm[0]; - let path = split_rm[1]; - // XXX: This is a hack to deal with a Solang bug, where mapping - // targets are canonicalized _before_ they are resolved against - // import paths. To work around this _we_ have to resolve against - // import paths! Rather than passing in a raw import target, we - // will manually resolve our target against any import paths - - let target = if let Some(target) = params - .import_paths - .iter() - .filter_map(|p| PathBuf::from(p).join(path).canonicalize().ok()) - .next() - { - target - } else { - print_error( - format!("Could not resolve remapping target {}", path).as_str(), - format!( - "Attempted to resolve {} against one of import paths [{}]", - path, - params.import_paths.join(", ") - ) - .as_str(), - ); - std::process::exit(1); - }; + let target = split_rm[1]; - file_resolver.add_import_map(OsString::from(map), target); + file_resolver.add_import_map(OsString::from(map), target.into()); } if let Some(allow_paths) = ¶ms.solc_allow_paths {