Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
fr.inria.prophet4j.feature.S4RO.S4ROFeature Maven / Gradle / Ivy
package fr.inria.prophet4j.feature.S4RO;
import fr.inria.prophet4j.feature.Feature;
public interface S4ROFeature extends Feature {
int CF_SIZE = CodeFeature.values().length; // how many features?
int AF_SIZE = AtomicFeature.values().length; // 33
int RF_SIZE = RepairFeature.values().length; // 5
int VF_SIZE = ValueFeature.values().length; // 10
int FEATURE_SIZE_S4R = CF_SIZE;
int FEATURE_BASE_0 = FEATURE_SIZE_S4R;
int FEATURE_BASE_1 = FEATURE_BASE_0 + RF_SIZE;
int FEATURE_BASE_2 = FEATURE_BASE_1 + POS_SIZE * AF_SIZE * RF_SIZE;
int FEATURE_BASE_3 = FEATURE_BASE_2 + POS_SIZE * AF_SIZE * AF_SIZE;
int FEATURE_SIZE = FEATURE_BASE_3 + AF_SIZE * VF_SIZE;
enum CrossType implements S4ROFeature {
CF_CT, RF_CT, // RepairFeatureNum = RepairFeatureNum
POS_AF_RF_CT, // GlobalFeatureNum = 3 * AtomFeatureNum * RepairFeatureNum
POS_AF_AF_CT, // VarCrossFeatureNum = 3 * AtomFeatureNum * AtomFeatureNum
AF_VF_CT, // ValueCrossFeatureNum = AtomFeatureNum * ValueFeatureNum
}
// base on fr.inria.prophet4j.feature.Feature
enum CodeFeature implements S4ROFeature {
}
enum AtomicFeature implements S4ROFeature {
OP_ADD_AF, // +a a+b +=
OP_SUB_AF, // -a a-b -=
OP_MUL_AF, // a*b *=
OP_DIV_AF, // a/b /=
OP_MOD_AF, // a%b %=
OP_LE_AF, // <=
OP_LT_AF, // <
OP_GE_AF, // >=
OP_GT_AF, // >
OP_EQ_AF, // ==
OP_NE_AF, // !=
UOP_INC_AF, // ++a a++
UOP_DEC_AF, // --a a--
// VARIABLE_AF, // variable
ASSIGN_LHS_AF, // a=
// ASSIGN_RHS_AF, // =a
ASSIGN_ZERO_AF, // zero
ASSIGN_CONST_AF, // constant
// EXCLUDE_ATOM_AF, // not include
// OPERATE_LHS_AF, // a+ a- a* a/ a% a&& a|| ...
// OPERATE_RHS_AF, // +a -a *a /a %a &&a ||a ...
CHANGED_AF, // ++a --a a++ a-- += -= *= /= =
DEREF_AF, // []
INDEX_AF, // []
MEMBER_ACCESS_AF, // [] * & . -> (only .)
CALLEE_AF, CALL_ARGUMENT_AF, ABST_V_AF, STMT_LABEL_AF, // label
STMT_LOOP_AF, // for foreach do while
STMT_ASSIGN_AF, // =
STMT_CALL_AF, // print()
STMT_COND_AF, // if ...
STMT_CONTROL_AF, // break continue return throw
R_STMT_ASSIGN_AF, // replace version
R_STMT_CALL_AF, // replace version
R_STMT_COND_AF, // replace version
R_STMT_CONTROL_AF, // replace version
// ADDRESS_OF_AF, // Inapplicable to Java
}
enum RepairFeature implements S4ROFeature {
/**
* inserting a potentially guarded control statement before a program point
* (AddControlRepair in Prophet4C) IfExitKind
*/
INSERT_CONTROL_RF,
/**
* adding a guard condition to an existing statement (GuardRepair in Prophet4C)
* GuardKind SpecialGuardKind
*/
INSERT_GUARD_RF,
/**
* inserting a non-control statement before a program point (AddStmtRepair in
* Prophet4C) AddInitKind AddAndReplaceKind
*/
INSERT_STMT_RF,
/**
* replacing a branch condition (CondRepair in Prophet4C) TightenConditionKind
* LoosenConditionKind
*/
REPLACE_COND_RF,
/**
* replacing an existing statement (ReplaceStmtRepair in Prophet4C) ReplaceKind
* ReplaceStringKind
*/
REPLACE_STMT_RF,
// DELETE_STMT_RF, // case of delete one statement
// UNKNOWN_STMT_RF, // other unknown operations like moving one statement
}
enum ValueFeature implements S4ROFeature {
MODIFIED_VF, MODIFIED_SIMILAR_VF, FUNC_ARGUMENT_VF, MEMBER_VF, LOCAL_VARIABLE_VF, GLOBAL_VARIABLE_VF,
ZERO_CONST_VF, NONZERO_CONST_VF, STRING_LITERAL_VF, SIZE_LITERAL_VF,
// POINTER_VF, // Inapplicable to Java
// STRUCT_POINTER_VF, // Inapplicable to Java
}
}