Next-generation codebase analysis toolkit.
Project description
ScubaTrace
Usage
import scubatrace
a_proj = scubatrace.CProject("../tests")
print(a_proj.files["src/test.c"].structs[0].name)
print(a_proj.files["src/test.c"].functions[0].name)
print(a_proj.files["src/test.c"].functions[0].calls)
print(a_proj.files["src/test.c"].functions[0].callee)
print(a_proj.files["src/test.c"].functions[0].caller)
print(a_proj.files["src/test.c"].functions[0].statements[0].variables[0].ref_statements)
print(a_proj.files["src/test.c"].functions[0].statements[0].variables[0].defination)
print(a_proj.dependencies)
print(a_proj.licences)
Development
Project
def files(self) -> dict[str, File]:
def functions(self) -> list[Function]:
def classes(self) -> list[Function]:
def methods(self) -> list[Function]:
File
def abspath(self) -> str:
def relpath(self) -> str:
def text(self) -> str:
def imports(self) -> list[File]: ...
def accessible_files(self) -> list[File]: ...
def functions(self) -> list[Function]: ...
def functions(self) -> list[Function]: ...
Function
def text(self) -> str:
def start_line(self) -> int:
def end_line(self) -> int:
def length(self):
def lines(self) -> dict[int, str]:
def body_node(self) -> Node | None:
def body_start_line(self) -> int:
def body_end_line(self) -> int:
def name(self) -> str: ...
def accessible_functions(self) -> list[Function]: ...
def callees(self) -> list[Function]: ...
def callers(self) -> list[Function]: ...
def calls(self) -> dictlist[Statement]: ...
def statements(self) -> list[Statement]: ...
Class
def text(self) -> str:
def start_line(self) -> int:
def end_line(self) -> int:
def length(self):
def name(self) -> str: ...
def methods(self) -> list[Method]: ...
def fields(self) -> list[str]: ...
def parents(self) -> list[Class]
def children(self) -> list[Class]
Method
def name(self) -> str: ...
def text(self) -> str:
def start_line(self) -> int:
def end_line(self) -> int:
def length(self):
def lines(self) -> dict[int, str]:
def body_node(self) -> Node | None:
def body_start_line(self) -> int:
def body_end_line(self) -> int:
def name(self) -> str: ...
def accessible_functions(self) -> list[Function]: ...
def callees(self) -> list[Function]: ...
def callers(self) -> list[Function]: ...
def calls(self) -> list[Statement]: ...
def statements(self) -> list[Statement]: ...
Statement
def text(self) -> str:
def start_line(self) -> int:
def end_line(self) -> int:
def length(self) -> int:
def forward_controls(self) -> list[Statement]:
def backward_controls(self) -> list[Statement]:
def forward_datas(self, identifier: str) -> list[Statement]:
def backward_datas(self, identifier: str) -> list[Statement]:
Patch(Commit)
def message(self) -> str:
def author(self) -> str:
def commit_date(self) -> datetime:
def author_date(self) -> datetime:
def next_commit(self) -> Commit:
def pre_commmit(self) -> Commit:
def added_files(self) -> list[File]:
def deleted_files(self) -> list[File]:
def added_imports(self) -> list[Import]:
def deleted_imports(self) -> list[Import]:
def added_classes(self) -> list[Class]:
def deleted_classes(self) -> list[Class]:
def added_methods(self) -> list[Method]:
def changed_methods(self) -> list[Method]:
def deleted_methods(self) -> list[Method]:
def added_fields(self) -> list[Field]:
def deleted_fields(self) -> list[Field]:
def changed_files(self) -> list[File]:
def merge():
Slicer
def slice(
self,
criteria_lines: set[int],
criteria_identifier: dict[int, set[str]],
backward_slice_level: int,
forward_slice_level: int,
ignore_control: bool
ingore_data: bool
) -> list[int]:
def backward_slice(
criteria_lines: set[int],
criteria_nodes: list[PDGNode],
criteria_identifier: dict[int, set[str]],
all_nodes: dict[int, list[PDGNode]],
level: int,
ignore_control: bool
ingore_data: bool
) -> list[int]:
def forward_slice(
criteria_lines: set[int],
criteria_nodes: list[PDGNode],
criteria_identifier: dict[int, set[str]],
all_nodes: dict[int, list[PDGNode]],
level: int,
ignore_control: bool
ingore_data: bool
) -> list[int]:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
scubatrace-0.4.0.tar.gz
(29.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scubatrace-0.4.0.tar.gz.
File metadata
- Download URL: scubatrace-0.4.0.tar.gz
- Upload date:
- Size: 29.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
499ca2120d4affa58f3236f7e7a99cd332dc52a291155796dce56c6415889b6e
|
|
| MD5 |
60dba6eed266599908537b4f1b68e22b
|
|
| BLAKE2b-256 |
54998536363947b92626ce2558f8314efcd33e6a47d748dda915b70c1974d157
|
File details
Details for the file scubatrace-0.4.0-py3-none-any.whl.
File metadata
- Download URL: scubatrace-0.4.0-py3-none-any.whl
- Upload date:
- Size: 31.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93382875864ca9dec0f140c6757ddf4eb9556e2765bc6d6db17816573faaf576
|
|
| MD5 |
b9f30f79cff18c7bf80188f9da68dd05
|
|
| BLAKE2b-256 |
ff3e54bd383bd949f688a5b9790b4a49c1112ba08609fe3432b6927281cc8963
|