SDA SE Wiki

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

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
research:cultivate:analysispredicatesapi_v0_3m2 [2009/09/17 20:35]
127.0.0.1 external edit
research:cultivate:analysispredicatesapi_v0_3m2 [2018/05/09 01:59] (current)
Line 1: Line 1:
  
 +====== Analysis Predicates API for Cultivate 0.3 Milestone 2 ======
 + 
 +
 +=== constant/1 ===
 +<​Code>​
 +/**
 + * constant(+FieldID)
 + *
 + * checks if a field is a constant, e.g. final static
 + ​*/</​Code>​
 +=== constructor/​1 ===
 +<​Code>​
 +/**
 + * constructor(+MethodID)
 + *
 + * checks if a method is a class initializer,​ object initializer or a 
 + * constructor.
 + ​*/</​Code>​
 +=== count/3 ===
 +<​Code>​
 +/**
 + * count(+ArgumentName,​+PredicateCall,​-Count)
 + *
 + * binds the length of a list resulting from a findall with ArgumentName
 + * and PredicateCall to Count.
 + ​*/</​Code>​
 +=== divide/3 ===
 +<​Code>​
 +/**
 + * divide(+Divident,​+Divisor,?​Quotient)
 + ​*/ ​    </​Code>​
 +=== divide/4 ===
 +<​Code>​
 +/**
 + * divide(+Divident,​+Divisor,?​Quotient,​+Default)
 + ​*/ ​  </​Code>​
 +
 +
 +
 +
 +=== equalParameters/​2 ===
 +<​Code>​
 +/**
 + * equalParameters(+Params1,​+Params2)
 + *
 + * checks that the number and type of the parameters is the same. used for 
 + * checking that method signatures are equal.
 + ​*/</​Code>​
 +=== extendsRecursive/​2 ===
 +<​Code>​
 +/**
 + * extendsRecursive(?​SubClass,?​SuperClass)
 + *
 + * Tests whether SubClass extends a SuperClass are another class
 + * which recursively extends SuperClass.
 + ​*/</​Code>​
 +=== extendsRecursive/​3 ===
 +<​Code>​
 +/**
 + * extendsRecursive(?​+SubClass,​ ?​SuperClass,​ ?Count)
 + ​* ​   ​
 + * Count is the number of inheritance steps from SubClass to SuperClass.
 + ​*/</​Code>​
 +=== extern_package/​1 ===
 +<​Code>​
 +/**
 + * extern_package(?​PackageId)
 + *
 + * Suceeds if all the classes in the package with ID "​PackageId"​ are external.
 + * Thus, empty packages are external. ​
 + ​*/</​Code>​
 +=== find_source_location/​4 ===
 +<​Code>​
 +/**
 + * find_source_location(+PEF,​-File,​-Offset,​-Length)
 + *
 + * @JIRA CV-257
 + ​*/</​Code>​
 +=== firstGetField/​2 ===
 +<​Code>​
 +/**
 + ​* ​ firstGetField(+MethodId,​+FieldId)
 + *
 + ​* ​ Tests if a method accesses a field.
 + ​*/</​Code>​
 +=== getter_method/​1 ===
 +<​Code>​
 +/**
 + * getter_method(+MethodID)
 + *
 + * This predicate will be true, if the Method ​
 + * with the ID "​MethodID"​ is a getter-Method
 + ​*/</​Code>​
 +=== is_implementing/​1 ===
 +<​Code>​
 +/**
 + * is_implementing(+MethodId)
 + *
 + * checks if the method implements some abstract definition
 + ​*/</​Code>​
 +=== internal_package/​1 ===
 +<​Code>​
 +/**
 + * internal_package(?​PackageID)
 + *
 + * succeds for all non-external packages
 + ​*/</​Code>​
 +=== methodCallsMethod/​2 ===
 +<​Code>​
 +/**
 + * methodCallsMethod(+CallingMethodId,​ ?​CalledMethodId)
 + *
 + * Tests whether the CalledMethod is called by CallingMethod.
 + *
 + * ASSUMES: CallingMethodId and CalledMethodId are Ids of some methods.  ​
 + ​*/</​Code>​
 +=== method_in_class/​2 ===
 +<​Code>​
 +/**
 + * 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
 + ​*/</​Code>​
 +=== methodIsCalledByTest/​1 ===
 +<​Code>​
 +/**
 + * methodIsCalledByTest(+MethodId) ​
 + ​* ​
 + * Checks if a method is called by a test case.
 + */ </​Code>​
 +=== methodReferencingField/​2 ===
 +<​Code>​
 +/**
 + ​* ​ methodReferencingField(+FieldId,​-MethodId)
 + *
 + ​* ​ binds all methods that access the field with id FieldId to MethodId
 + ​*/</​Code>​
 +=== noF/2 ===
 +<​Code>​
 +/**
 + * noF(+ClassId,​-NOF)  ​
 + *
 + * number of fields
 + ​* ​
 + * It will bind NOF to the number of fields of the class with ClassId.
 + ​*/</​Code>​
 +=== number_of_methods/​2 ===
 +<​Code>​
 +/**
 + * number_of_methods(+ClassId,​-NOM)  ​
 + ​* ​
 + * number of methods (excluding constructors)
 + *
 + * It will bind NOM to the number of methods of the class with ClassId.
 + ​*/</​Code>​
 +=== isOverriding/​1 ===
 +<​Code>​
 +/**
 + * isOverriding(+MethodId)
 + *
 + * checks if the method overrides some other method. ​
 + ​*/</​Code>​
 +=== percentage/​3 ===
 +<​Code>​
 +/** 
 + * percentage(Actual,​Absolute,​Result)
 + ​*/</​Code>​
 +=== subtype/2 ===
 +<​Code>​
 +/**
 + * subtype(SubClass,​ SuperClass)
 + ​*/</​Code>​
 +=== sumall/2 ===
 +<​Code>​
 +/** 
 + * sumall(+List,​ -Sum)
 + ​* ​
 + * Calculates the sum of all elements in the list.
 + ​*/</​Code>​
 +=== test_class/​2 ===
 +<​Code>​
 +/**
 + * test_class(?​ClassID)
 + *
 + * succeds for all test classes
 + ​*/</​Code>​
 +=== is_test_method/​2 ===
 +<​Code>​
 +/** 
 + * is_test_method(+MethodID)
 + *
 + * True, if MethodID ​
 + ​* ​  - begins with "​test"​
 + ​* ​  - isSubtype the TestCase-Class
 + ​* ​  - has no return values (void)
 + ​*/</​Code>​
 +=== trivial_getter_method/​1 ===
 +<​Code>​
 +/**
 + * 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;
 + ​* ​ }
 + ​*/</​Code>​
research/cultivate/analysispredicatesapi_v0_3m2.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019