Open khatchad opened 1 year ago
My guess is that TypeInference.make()
should be returning a different type. I see that there is com.ibm.wala.cast.java.analysis.typeInference.AstJavaTypeInference
in WALA but no com.ibm.wala.cast.python.analysis.typeInference.AstPythonTypeInference
in wala/ML.
Though, I am unsure what AST has to do with it since it is SSA at this point ...
There is already a language field in TypeInference
. Perhaps then if any subclassing is to be done it would be TypeInference
that would be the parent.
Looks like the new class would inherit from com.ibm.wala.cast.analysis.typeInference.AstTypeInference.
I am getting a class cast exception when trying to use
TypeInference
on Python code. The instruction causing the exception is as follows:The problem occurs in
com.ibm.wala.cast.python.ssa.PythonInvokeInstruction.visit(IVisitor)
. It tries to cast aTypeInference$TypeOperatorFactory
(the type ofv
below) to acom.ibm.wala.cast.python.ssa.PythonInstructionVisitor
:https://github.com/wala/ML/blob/a8e1d8e54536d382b54c80cdd52f302b0ea06123/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ssa/PythonInvokeInstruction.java#L121