@@ -147,9 +147,7 @@ class Value extends TObject {
147147 * Class representing modules in the Python program
148148 * Each `ModuleValue` represents a module object in the Python program.
149149 */
150- class ModuleValue extends Value {
151- ModuleValue ( ) { this instanceof ModuleObjectInternal }
152-
150+ class ModuleValue extends Value instanceof ModuleObjectInternal {
153151 /**
154152 * Holds if this module "exports" name.
155153 * That is, does it define `name` in `__all__` or is
@@ -159,7 +157,7 @@ class ModuleValue extends Value {
159157 predicate exports ( string name ) { PointsTo:: moduleExports ( this , name ) }
160158
161159 /** Gets the scope for this module, provided that it is a Python module. */
162- ModuleScope getScope ( ) { result = this . ( ModuleObjectInternal ) .getSourceModule ( ) }
160+ ModuleScope getScope ( ) { result = super .getSourceModule ( ) }
163161
164162 /**
165163 * Gets the container path for this module. Will be the file for a Python module,
@@ -181,7 +179,7 @@ class ModuleValue extends Value {
181179 predicate isPackage ( ) { this instanceof PackageObjectInternal }
182180
183181 /** Whether the complete set of names "exported" by this module can be accurately determined */
184- predicate hasCompleteExportInfo ( ) { this . ( ModuleObjectInternal ) .hasCompleteExportInfo ( ) }
182+ predicate hasCompleteExportInfo ( ) { super .hasCompleteExportInfo ( ) }
185183
186184 /** Get a module that this module imports */
187185 ModuleValue getAnImportedModule ( ) { result .importedAs ( this .getScope ( ) .getAnImportedModuleName ( ) ) }
@@ -345,25 +343,21 @@ module Value {
345343 * Callables include Python functions, built-in functions and bound-methods,
346344 * but not classes.
347345 */
348- class CallableValue extends Value {
349- CallableValue ( ) { this instanceof CallableObjectInternal }
350-
346+ class CallableValue extends Value instanceof CallableObjectInternal {
351347 /**
352348 * Holds if this callable never returns once called.
353349 * For example, `sys.exit`
354350 */
355- predicate neverReturns ( ) { this . ( CallableObjectInternal ) .neverReturns ( ) }
351+ predicate neverReturns ( ) { super .neverReturns ( ) }
356352
357353 /** Gets the scope for this function, provided that it is a Python function. */
358354 FunctionScope getScope ( ) { result = this .( PythonFunctionObjectInternal ) .getScope ( ) }
359355
360356 /** Gets the `n`th parameter node of this callable. */
361- NameNode getParameter ( int n ) { result = this . ( CallableObjectInternal ) .getParameter ( n ) }
357+ NameNode getParameter ( int n ) { result = super .getParameter ( n ) }
362358
363359 /** Gets the `name`d parameter node of this callable. */
364- NameNode getParameterByName ( string name ) {
365- result = this .( CallableObjectInternal ) .getParameterByName ( name )
366- }
360+ NameNode getParameterByName ( string name ) { result = super .getParameterByName ( name ) }
367361
368362 /**
369363 * Gets the argument in `call` corresponding to the `n`'th positional parameter of this callable.
@@ -452,23 +446,21 @@ class CallableValue extends Value {
452446 * Class representing bound-methods, such as `o.func`, where `o` is an instance
453447 * of a class that has a callable attribute `func`.
454448 */
455- class BoundMethodValue extends CallableValue {
456- BoundMethodValue ( ) { this instanceof BoundMethodObjectInternal }
457-
449+ class BoundMethodValue extends CallableValue instanceof BoundMethodObjectInternal {
458450 /**
459451 * Gets the callable that will be used when `this` is called.
460452 * The actual callable for `func` in `o.func`.
461453 */
462- CallableValue getFunction ( ) { result = this . ( BoundMethodObjectInternal ) .getFunction ( ) }
454+ CallableValue getFunction ( ) { result = super .getFunction ( ) }
463455
464456 /**
465457 * Gets the value that will be used for the `self` parameter when `this` is called.
466458 * The value for `o` in `o.func`.
467459 */
468- Value getSelf ( ) { result = this . ( BoundMethodObjectInternal ) .getSelf ( ) }
460+ Value getSelf ( ) { result = super .getSelf ( ) }
469461
470462 /** Gets the parameter node that will be used for `self`. */
471- NameNode getSelfParameter ( ) { result = this . ( BoundMethodObjectInternal ) .getSelfParameter ( ) }
463+ NameNode getSelfParameter ( ) { result = super .getSelfParameter ( ) }
472464}
473465
474466/**
@@ -831,12 +823,10 @@ class BuiltinMethodValue extends FunctionValue {
831823/**
832824 * A class representing sequence objects with a length and tracked items.
833825 */
834- class SequenceValue extends Value {
835- SequenceValue ( ) { this instanceof SequenceObjectInternal }
836-
837- Value getItem ( int n ) { result = this .( SequenceObjectInternal ) .getItem ( n ) }
826+ class SequenceValue extends Value instanceof SequenceObjectInternal {
827+ Value getItem ( int n ) { result = super .getItem ( n ) }
838828
839- int length ( ) { result = this . ( SequenceObjectInternal ) .length ( ) }
829+ int length ( ) { result = super .length ( ) }
840830}
841831
842832/** A class representing tuple objects */
@@ -887,14 +877,12 @@ class NumericValue extends Value {
887877 * https://docs.python.org/3/howto/descriptor.html#properties
888878 * https://docs.python.org/3/library/functions.html#property
889879 */
890- class PropertyValue extends Value {
891- PropertyValue ( ) { this instanceof PropertyInternal }
892-
893- CallableValue getGetter ( ) { result = this .( PropertyInternal ) .getGetter ( ) }
880+ class PropertyValue extends Value instanceof PropertyInternal {
881+ CallableValue getGetter ( ) { result = super .getGetter ( ) }
894882
895- CallableValue getSetter ( ) { result = this . ( PropertyInternal ) .getSetter ( ) }
883+ CallableValue getSetter ( ) { result = super .getSetter ( ) }
896884
897- CallableValue getDeleter ( ) { result = this . ( PropertyInternal ) .getDeleter ( ) }
885+ CallableValue getDeleter ( ) { result = super .getDeleter ( ) }
898886}
899887
900888/** A method-resolution-order sequence of classes */
0 commit comments