PCART  v1.4
Automated Repair of Python API Parameter Compatibility Issues
Classes | Functions
callsite Namespace Reference

Provide structured callsite identity helpers. More...

Classes

class  CallsiteIdentity
 Callsite identity class 调用点身份类 More...
 
class  CallsiteRecord
 Callsite record class 调用点记录类 More...
 

Functions

def makeCallsiteRecord (file_path, call_text, format_api, parameters, lineno, col_offset, end_lineno=None, end_col_offset=None, proj_path=None)
 Make callsite record 构造调用点记录 More...
 
def normalizeCallText (call_text)
 Normalize call text for identity generation 归一化调用文本,用于生成调用点身份 More...
 
def normalizeRelPath (file_path, proj_path=None)
 Normalize source file path to project relative path 将源码路径归一化为项目相对路径 More...
 

Detailed Description

Provide structured callsite identity helpers.

Defines CallsiteIdentity (structured source-location metadata) and CallsiteRecord (artifact_id + format_api + parameters). The artifactId() method produces a stable, readable SHA256-based key used for pkl naming, manifest tracking, and shared dictionary lookups throughout the pipeline. 定义CallsiteIdentity(结构化源码位置元数据)和CallsiteRecord (artifact_id + format_api + parameters)。artifactId()方法生成稳定可读的 SHA256-based键,用于pkl命名、manifest跟踪和共享字典查找。

Function Documentation

◆ makeCallsiteRecord()

def callsite.makeCallsiteRecord (   file_path,
  call_text,
  format_api,
  parameters,
  lineno,
  col_offset,
  end_lineno = None,
  end_col_offset = None,
  proj_path = None 
)

Make callsite record 构造调用点记录

Parameters
file_pathThe source file path
call_textThe original call text
format_apiThe restored API for static matching
parametersThe parameter string
linenoThe line number of callsite
col_offsetThe column offset of callsite
end_linenoThe end line number of callsite
end_col_offsetThe end column offset of callsite
proj_pathThe project root path
Returns
callsite record dictionary

Definition at line 180 of file callsite.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalizeCallText()

def callsite.normalizeCallText (   call_text)

Normalize call text for identity generation 归一化调用文本,用于生成调用点身份

Parameters
call_textThe original call text
Returns
normalized call text

Definition at line 144 of file callsite.py.

Here is the caller graph for this function:

◆ normalizeRelPath()

def callsite.normalizeRelPath (   file_path,
  proj_path = None 
)

Normalize source file path to project relative path 将源码路径归一化为项目相对路径

Parameters
file_pathThe source file path
proj_pathThe project root path
Returns
normalized relative path

Definition at line 154 of file callsite.py.

Here is the caller graph for this function: