Interface Language
- All Known Subinterfaces:
BytecodeLanguage
- All Known Implementing Classes:
JavaLanguage
,LanguageImpl
public interface Language
Main interface for language-specific information. This interface helps build analyses which can
operate over multiple languages.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JavaLanguage
The canonicalLanguage
implementation for Java -
Method Summary
Modifier and TypeMethodDescriptionget the interfaces implemented by all arrays in the languageIf this language is "derived" from some other langauge, which one?Given a Java constant o, return the appropriate language type to associate with the constant.getFakeRootMethod
(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache) getMetadataToken
(Object value) Get the representation of the meta-data corresponding to value.getName()
What is the name of the language?getPointerType
(TypeReference pointee) getPrimitive
(TypeReference reference) get the abstraction of a primitive type to be used for type inferenceWhat is the root type in a type hierarchy for this language? e.g.What is the root type of exceptions in this language? e.g.inferInvokeExceptions
(MethodReference target, IClassHierarchy cha) determine the set of possible exception types a call to target may throwboolean
boolean
boolean
boolean
boolean
boolean
boolean
Is t a "metadata" type for the language, i.e., a type describing some other type (e.g., java.lang.Class for Java)?boolean
Is t the type of the language's null value? Should return true ift == null
(?).boolean
boolean
lookupPrimitiveType
(String name) Given a source-level primitive type name, get the corresponding "low-level" type name, e.g., the corresponding character to use in a Java method descriptormakeInducedCFG
(SSAInstruction[] instructions, IMethod method, Context context) <T extends InstanceKey>
ModRef.ModVisitor<T, ? extends ExtendedHeapModel> makeModVisitor
(CGNode n, Collection<PointerKey> result, PointerAnalysis<T> pa, ExtendedHeapModel h, boolean ignoreAllocHeapDefs) <T extends InstanceKey>
ModRef.RefVisitor<T, ? extends ExtendedHeapModel> makeRefVisitor
(CGNode n, Collection<PointerKey> result, PointerAnalysis<T> pa, ExtendedHeapModel h) boolean
do MethodReference objects have declared parameter types?boolean
void
Yuck? Languages are mutable?
-
Field Details
-
JAVA
The canonicalLanguage
implementation for Java
-
-
Method Details
-
getName
Atom getName()What is the name of the language? -
getBaseLanguage
Language getBaseLanguage()If this language is "derived" from some other langauge, which one? -
registerDerivedLanguage
Yuck? Languages are mutable? -
getDerivedLanguages
-
getRootType
TypeReference getRootType()What is the root type in a type hierarchy for this language? e.g. java.lang.Object in Java. -
getThrowableType
TypeReference getThrowableType()What is the root type of exceptions in this language? e.g. java.lang.Throwable in Java -
getConstantType
Given a Java constant o, return the appropriate language type to associate with the constant. Possible types for o can be language dependent, but typically include Boolean, String, Integer, Float, etc. -
isNullType
Is t the type of the language's null value? Should return true ift == null
(?). -
isIntType
-
isLongType
-
isVoidType
-
isFloatType
-
isDoubleType
-
isStringType
-
isMetadataType
Is t a "metadata" type for the language, i.e., a type describing some other type (e.g., java.lang.Class for Java)? -
isCharType
-
isBooleanType
-
getMetadataToken
Get the representation of the meta-data corresponding to value. For example, in Java, if value represents some type, the returned object should be the correspondingTypeReference
. The returned object should be appropriate for use as the token in anSSALoadMetadataInstruction
for the language -
getArrayInterfaces
TypeReference[] getArrayInterfaces()get the interfaces implemented by all arrays in the language -
lookupPrimitiveType
-
instructionFactory
SSAInstructionFactory instructionFactory() -
inferInvokeExceptions
Collection<TypeReference> inferInvokeExceptions(MethodReference target, IClassHierarchy cha) throws InvalidClassFileException determine the set of possible exception types a call to target may throw- Throws:
InvalidClassFileException
-
getStringType
TypeReference getStringType() -
getPointerType
-
getPrimitive
get the abstraction of a primitive type to be used for type inference- See Also:
-
methodsHaveDeclaredParameterTypes
boolean methodsHaveDeclaredParameterTypes()do MethodReference objects have declared parameter types? -
getFakeRootMethod
AbstractRootMethod getFakeRootMethod(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache) -
makeInducedCFG
-
modelConstant
-
makeRefVisitor
<T extends InstanceKey> ModRef.RefVisitor<T,? extends ExtendedHeapModel> makeRefVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<T> pa, ExtendedHeapModel h) -
makeModVisitor
<T extends InstanceKey> ModRef.ModVisitor<T,? extends ExtendedHeapModel> makeModVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<T> pa, ExtendedHeapModel h, boolean ignoreAllocHeapDefs)
-