-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed ESBMC trace throwing errors when CE trace is incomplete
- Loading branch information
1 parent
cd241b5
commit 47374e2
Showing
2 changed files
with
48 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
# Author: Yiannis Charalambous | ||
|
||
from dataclasses import dataclass | ||
from pathlib import Path | ||
from typing import Literal | ||
|
||
from esbmc_ai.solution import SourceFile | ||
|
||
|
||
@dataclass | ||
class ProgramTrace: | ||
"""Contains information about traces in source code.""" | ||
|
||
trace_type: Literal["function", "statement", "file"] | ||
"""The scope of this trace.""" | ||
file_name: str | ||
source_file: SourceFile | ||
"""The filename of this trace. The SourceFile can then be extracted from the | ||
solution.""" | ||
name: str | ||
"""The name of the symbol, if applicable.""" | ||
line_idx: int | ||
"""The location of the trace.""" | ||
|
||
@property | ||
def filepath(self) -> Path: | ||
"""The file path of the trace location.""" | ||
return self.source_file.file_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters