SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Analysis Predicates API for Cultivate 0.3 Milestone 2

constant/1

/**
 * constant(+FieldID)
 *
 * checks if a field is a constant, e.g. final static
 */

constructor/1

/**
 * constructor(+MethodID)
 *
 * checks if a method is a class initializer, object initializer or a 
 * constructor.
 */

count/3

/**
 * count(+ArgumentName,+PredicateCall,-Count)
 *
 * binds the length of a list resulting from a findall with ArgumentName
 * and PredicateCall to Count.
 */

divide/3

/**
 * divide(+Divident,+Divisor,?Quotient)
 */     

divide/4

/**
 * divide(+Divident,+Divisor,?Quotient,+Default)
 */   

equalParameters/2

/**
 * equalParameters(+Params1,+Params2)
 *
 * checks that the number and type of the parameters is the same. used for 
 * checking that method signatures are equal.
 */

extendsRecursive/2

/**
 * extendsRecursive(?SubClass,?SuperClass)
 *
 * Tests whether SubClass extends a SuperClass are another class
 * which recursively extends SuperClass.
 */

extendsRecursive/3

/**
 * extendsRecursive(?+SubClass, ?SuperClass, ?Count)
 *    
 * Count is the number of inheritance steps from SubClass to SuperClass.
 */

extern_package/1

/**
 * extern_package(?PackageId)
 *
 * Suceeds if all the classes in the package with ID "PackageId" are external.
 * Thus, empty packages are external. 
 */

find_source_location/4

/**
 * find_source_location(+PEF,-File,-Offset,-Length)
 *
 * @JIRA CV-257
 */

firstGetField/2

/**
 *  firstGetField(+MethodId,+FieldId)
 *
 *  Tests if a method accesses a field.
 */

getter_method/1

/**
 * getter_method(+MethodID)
 *	
 * This predicate will be true, if the Method 
 * with the ID "MethodID" is a getter-Method
 */

is_implementing/1

/**
 * is_implementing(+MethodId)
 *
 * checks if the method implements some abstract definition
 */

internal_package/1

/**
 * internal_package(?PackageID)
 *
 * succeds for all non-external packages
 */

methodCallsMethod/2

/**
 * methodCallsMethod(+CallingMethodId, ?CalledMethodId)
 *
 * Tests whether the CalledMethod is called by CallingMethod.
 *
 * ASSUMES: CallingMethodId and CalledMethodId are Ids of some methods.  
 */

method_in_class/2

/**
 * method_in_class(+ClassID,?MethodID)
 *
 * lists all the methods in a class / checks if a method is a method in a class
 *
 * Important: Difference to MethodDefT_In : Constructors are excluded
 */

methodIsCalledByTest/1

/**
 * methodIsCalledByTest(+MethodId) 
 * 
 * Checks if a method is called by a test case.
 */ 

methodReferencingField/2

/**
 *  methodReferencingField(+FieldId,-MethodId)
 *
 *  binds all methods that access the field with id FieldId to MethodId
 */

noF/2

/**
 * noF(+ClassId,-NOF)  
 *
 * number of fields
 * 
 * It will bind NOF to the number of fields of the class with ClassId.
 */

number_of_methods/2

/**
 * number_of_methods(+ClassId,-NOM)  
 * 
 * number of methods (excluding constructors)
 *
 * It will bind NOM to the number of methods of the class with ClassId.
 */

isOverriding/1

/**
 * isOverriding(+MethodId)
 *
 * checks if the method overrides some other method. 
 */

percentage/3

/** 
 * percentage(Actual,Absolute,Result)
 */

subtype/2

/**
 * subtype(SubClass, SuperClass)
 */

sumall/2

/** 
 * sumall(+List, -Sum)
 * 
 * Calculates the sum of all elements in the list.
 */

test_class/2

/**
 * test_class(?ClassID)
 *
 * succeds for all test classes
 */

is_test_method/2

/** 
 * is_test_method(+MethodID)
 *
 * True, if MethodID 
 *   - begins with "test"
 *   - isSubtype the TestCase-Class
 *   - has no return values (void)
 */

trivial_getter_method/1

/**
 * trivial_getter_method(+MethodID)
 *	
 * This predicate will be true, if the method with the ID "MethodID" is a 
 *  trivial getter-Method.
 *
 *  example (for field "int x;"): 
 *
 *  public int getX() {
 *    return x;
 *  }
 */
research/cultivate/analysispredicatesapi_v0_3m2.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019