certora-cli 7.22.3__tar.gz → 7.25.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {certora_cli-7.22.3/certora_cli.egg-info → certora-cli-7.25.3}/PKG-INFO +2 -14
- certora-cli-7.25.3/README.md +1 -0
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/Compiler/CompilerCollector.py +17 -2
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/Compiler/CompilerCollectorFactory.py +20 -5
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/Compiler/CompilerCollectorSol.py +18 -3
- certora-cli-7.25.3/certora_cli/CertoraProver/Compiler/CompilerCollectorSolBased.py +36 -0
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/Compiler/CompilerCollectorVy.py +17 -2
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/Compiler/CompilerCollectorYul.py +20 -5
- certora-cli-7.25.3/certora_cli/CertoraProver/Compiler/__init__.py +18 -0
- certora-cli-7.25.3/certora_cli/CertoraProver/__init__.py +20 -0
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraBuild.py +64 -162
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraBuildCacheManager.py +17 -2
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraBuildDataClasses.py +21 -6
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraBuildRust.py +31 -10
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraCloudIO.py +25 -13
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraCollectRunMetadata.py +30 -6
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraCompilerParameters.py +15 -0
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraConfigIO.py +20 -4
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraContext.py +111 -27
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraContextAttributes.py +250 -135
- certora-cli-7.25.3/certora_cli/CertoraProver/certoraContextClass.py +24 -0
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraContextValidator.py +126 -23
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraContractFuncs.py +16 -1
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraExtensionInfo.py +15 -0
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraJobList.py +18 -3
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraMiniSpecParser.py +15 -0
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraNodeFilters.py +15 -0
- certora-cli-7.25.3/certora_cli/CertoraProver/certoraParseBuildScript.py +102 -0
- certora-cli-7.25.3/certora_cli/CertoraProver/certoraProjectScanner.py +198 -0
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraSourceFinders.py +18 -3
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraType.py +16 -1
- {certora_cli-7.22.3/certora_cli/EVMVerifier → certora-cli-7.25.3/certora_cli/CertoraProver}/certoraVerifyGenerator.py +17 -2
- certora-cli-7.25.3/certora_cli/CertoraProver/splitRules.py +170 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/EquivalenceCheck/equivCheck.py +18 -3
- certora-cli-7.25.3/certora_cli/Mutate/__init__.py +20 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/Mutate/mutateApp.py +27 -5
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/Mutate/mutateAttributes.py +15 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/Mutate/mutateConstants.py +15 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/Mutate/mutateUtil.py +15 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/Mutate/mutateValidate.py +16 -1
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/Shared/ExpectedComparator.py +15 -0
- certora-cli-7.25.3/certora_cli/Shared/__init__.py +22 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/Shared/certoraAttrUtil.py +25 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/Shared/certoraLogging.py +15 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/Shared/certoraUtils.py +26 -10
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/Shared/certoraValidateFuncs.py +110 -29
- certora-cli-7.25.3/certora_cli/certoraEVMProver.py +36 -0
- certora-cli-7.25.3/certora_cli/certoraEqCheck.py +32 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/certoraMutate.py +15 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/certoraRun.py +54 -12
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/certoraSolanaProver.py +57 -30
- certora-cli-7.25.3/certora_cli/certoraSorobanProver.py +36 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/rustMutator.py +15 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3/certora_cli.egg-info}/PKG-INFO +2 -14
- certora-cli-7.25.3/certora_cli.egg-info/SOURCES.txt +73 -0
- certora-cli-7.25.3/certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_jars/Typechecker.jar +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/setup.py +2 -2
- certora_cli-7.22.3/README.md +0 -1
- certora_cli-7.22.3/certora_cli/EVMVerifier/Compiler/CompilerCollectorSolBased.py +0 -21
- certora_cli-7.22.3/certora_cli/EVMVerifier/Compiler/__init__.py +0 -3
- certora_cli-7.22.3/certora_cli/EVMVerifier/__init__.py +0 -5
- certora_cli-7.22.3/certora_cli/EVMVerifier/certoraContextClass.py +0 -9
- certora_cli-7.22.3/certora_cli/EVMVerifier/certoraParseBuildScript.py +0 -58
- certora_cli-7.22.3/certora_cli/Mutate/__init__.py +0 -5
- certora_cli-7.22.3/certora_cli/Shared/__init__.py +0 -7
- certora_cli-7.22.3/certora_cli/certoraEVMProver.py +0 -21
- certora_cli-7.22.3/certora_cli/certoraEqCheck.py +0 -17
- certora_cli-7.22.3/certora_cli/certoraSorobanProver.py +0 -21
- certora_cli-7.22.3/certora_cli.egg-info/SOURCES.txt +0 -71
- certora_cli-7.22.3/certora_jars/CERTORA-CLI-VERSION-METADATA.json +0 -1
- {certora_cli-7.22.3 → certora-cli-7.25.3}/LICENSE +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/MANIFEST.in +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_bins/__init__.py +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/EquivalenceCheck/Eq_default.conf +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/EquivalenceCheck/Eq_mc_no_out_template.spec +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/EquivalenceCheck/Eq_mc_template.spec +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/EquivalenceCheck/Eq_sanity.conf +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/EquivalenceCheck/Eq_template.spec +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/EquivalenceCheck/__init__.py +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/EquivalenceCheck/sanity.spec +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli/__init__.py +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli.egg-info/dependency_links.txt +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli.egg-info/entry_points.txt +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli.egg-info/requires.txt +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_cli.egg-info/top_level.txt +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/certora_jars/__init__.py +0 -0
- {certora_cli-7.22.3 → certora-cli-7.25.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: certora-cli
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.25.3
|
|
4
4
|
Summary: Runner for the Certora Prover
|
|
5
5
|
Home-page: https://pypi.org/project/certora-cli
|
|
6
6
|
Author: Certora
|
|
@@ -11,17 +11,5 @@ Classifier: Operating System :: OS Independent
|
|
|
11
11
|
Requires-Python: >=3.8
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
Requires-Dist: click
|
|
15
|
-
Requires-Dist: json5
|
|
16
|
-
Requires-Dist: pycryptodome
|
|
17
|
-
Requires-Dist: requests
|
|
18
|
-
Requires-Dist: rich
|
|
19
|
-
Requires-Dist: sly
|
|
20
|
-
Requires-Dist: tabulate
|
|
21
|
-
Requires-Dist: tqdm
|
|
22
|
-
Requires-Dist: StrEnum
|
|
23
|
-
Requires-Dist: tomli
|
|
24
|
-
Requires-Dist: universalmutator
|
|
25
|
-
Requires-Dist: jinja2
|
|
26
14
|
|
|
27
|
-
Commit
|
|
15
|
+
Commit 97ac73d. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Commit 97ac73d. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
+
# The Certora Prover
|
|
2
|
+
# Copyright (C) 2025 Certora Ltd.
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, version 3 of the License.
|
|
7
|
+
#
|
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
# GNU General Public License for more details.
|
|
12
|
+
#
|
|
13
|
+
# You should have received a copy of the GNU General Public License
|
|
14
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
+
|
|
1
16
|
from abc import abstractmethod, ABC
|
|
2
17
|
from dataclasses import dataclass
|
|
3
18
|
from pathlib import Path
|
|
4
19
|
from typing import Any, Dict, List, Optional, Tuple, Set
|
|
5
20
|
from Shared.certoraUtils import AbstractAndSingleton, CompilerVersion
|
|
6
|
-
from
|
|
7
|
-
import
|
|
21
|
+
from CertoraProver.certoraContractFuncs import SourceBytes
|
|
22
|
+
import CertoraProver.certoraType as CT
|
|
8
23
|
|
|
9
24
|
|
|
10
25
|
# TODO: merge this with Func in certoraBuild
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# The Certora Prover
|
|
2
|
+
# Copyright (C) 2025 Certora Ltd.
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, version 3 of the License.
|
|
7
|
+
#
|
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
# GNU General Public License for more details.
|
|
12
|
+
#
|
|
13
|
+
# You should have received a copy of the GNU General Public License
|
|
14
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
+
|
|
1
16
|
import os
|
|
2
17
|
|
|
3
18
|
from Shared import certoraUtils as Util
|
|
@@ -6,12 +21,12 @@ from functools import lru_cache
|
|
|
6
21
|
from typing import Set, Callable
|
|
7
22
|
import re
|
|
8
23
|
import logging
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
24
|
+
from CertoraProver.Compiler.CompilerCollector import CompilerLang, CompilerCollector
|
|
25
|
+
from CertoraProver.Compiler.CompilerCollectorSol import CompilerCollectorSol, CompilerLangSol
|
|
26
|
+
from CertoraProver.Compiler.CompilerCollectorYul import CompilerLangYul, CompilerCollectorYul
|
|
27
|
+
from CertoraProver.Compiler.CompilerCollectorVy import CompilerCollectorVy, CompilerLangVy
|
|
13
28
|
from Shared.certoraUtils import match_path_to_mapping_key, remove_file, get_certora_config_dir
|
|
14
|
-
from
|
|
29
|
+
from CertoraProver.certoraContextClass import CertoraContext
|
|
15
30
|
|
|
16
31
|
# logger for running the Solidity compiler and reporting any errors it emits
|
|
17
32
|
compiler_logger = logging.getLogger("compiler")
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
+
# The Certora Prover
|
|
2
|
+
# Copyright (C) 2025 Certora Ltd.
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, version 3 of the License.
|
|
7
|
+
#
|
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
# GNU General Public License for more details.
|
|
12
|
+
#
|
|
13
|
+
# You should have received a copy of the GNU General Public License
|
|
14
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
+
|
|
1
16
|
from pathlib import Path
|
|
2
17
|
from typing import Any, List, Tuple, Dict, Set
|
|
3
18
|
|
|
4
|
-
from
|
|
5
|
-
from
|
|
19
|
+
from CertoraProver.Compiler.CompilerCollector import CompilerLang, CompilerLangFunc
|
|
20
|
+
from CertoraProver.Compiler.CompilerCollectorSolBased import CompilerCollectorSolBased
|
|
6
21
|
from Shared.certoraUtils import Singleton, CompilerVersion, get_certora_config_dir
|
|
7
|
-
import
|
|
22
|
+
import CertoraProver.certoraType as CT
|
|
8
23
|
|
|
9
24
|
|
|
10
25
|
class CompilerLangSol(CompilerLang, metaclass=Singleton):
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# The Certora Prover
|
|
2
|
+
# Copyright (C) 2025 Certora Ltd.
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, version 3 of the License.
|
|
7
|
+
#
|
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
# GNU General Public License for more details.
|
|
12
|
+
#
|
|
13
|
+
# You should have received a copy of the GNU General Public License
|
|
14
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
+
|
|
16
|
+
from CertoraProver.Compiler.CompilerCollector import CompilerCollector, CompilerLang
|
|
17
|
+
from Shared.certoraUtils import CompilerVersion
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class CompilerCollectorSolBased(CompilerCollector):
|
|
21
|
+
|
|
22
|
+
def __init__(self, version: CompilerVersion, lang: CompilerLang):
|
|
23
|
+
self.__compiler_version = version
|
|
24
|
+
self.__smart_contract_lang = lang
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def compiler_name(self) -> str:
|
|
28
|
+
return self.smart_contract_lang.compiler_name
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def smart_contract_lang(self) -> CompilerLang:
|
|
32
|
+
return self.__smart_contract_lang
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def compiler_version(self) -> CompilerVersion:
|
|
36
|
+
return self.__compiler_version
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# The Certora Prover
|
|
2
|
+
# Copyright (C) 2025 Certora Ltd.
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, version 3 of the License.
|
|
7
|
+
#
|
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
# GNU General Public License for more details.
|
|
12
|
+
#
|
|
13
|
+
# You should have received a copy of the GNU General Public License
|
|
14
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
+
|
|
1
16
|
import itertools
|
|
2
17
|
import json
|
|
3
18
|
import logging
|
|
@@ -8,9 +23,9 @@ from abc import ABC, abstractmethod
|
|
|
8
23
|
from pathlib import Path
|
|
9
24
|
from typing import Any, Dict, List, Set, Tuple, Optional
|
|
10
25
|
|
|
11
|
-
import
|
|
26
|
+
import CertoraProver.certoraType as CT
|
|
12
27
|
from Crypto.Hash import keccak
|
|
13
|
-
from
|
|
28
|
+
from CertoraProver.Compiler.CompilerCollector import CompilerCollector, CompilerLang, CompilerLangFunc
|
|
14
29
|
from Shared.certoraUtils import Singleton, DEFAULT_VYPER_COMPILER, CompilerVersion
|
|
15
30
|
from Shared.certoraUtils import print_failed_to_run, get_certora_config_dir
|
|
16
31
|
|
|
@@ -1,14 +1,29 @@
|
|
|
1
|
+
# The Certora Prover
|
|
2
|
+
# Copyright (C) 2025 Certora Ltd.
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, version 3 of the License.
|
|
7
|
+
#
|
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
# GNU General Public License for more details.
|
|
12
|
+
#
|
|
13
|
+
# You should have received a copy of the GNU General Public License
|
|
14
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
+
|
|
1
16
|
import json
|
|
2
17
|
from typing import List
|
|
3
18
|
|
|
4
19
|
from Crypto.Hash import keccak
|
|
5
20
|
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from
|
|
9
|
-
from
|
|
21
|
+
from CertoraProver.Compiler.CompilerCollector import CompilerLang
|
|
22
|
+
from CertoraProver.Compiler.CompilerCollectorSol import CompilerLangSol
|
|
23
|
+
from CertoraProver.Compiler.CompilerCollectorSolBased import CompilerCollectorSolBased
|
|
24
|
+
from CertoraProver.certoraContractFuncs import Func
|
|
10
25
|
from Shared.certoraUtils import Singleton, CompilerVersion
|
|
11
|
-
import
|
|
26
|
+
import CertoraProver.certoraType as CT
|
|
12
27
|
|
|
13
28
|
|
|
14
29
|
class CompilerLangYul(CompilerLangSol, metaclass=Singleton):
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# The Certora Prover
|
|
2
|
+
# Copyright (C) 2025 Certora Ltd.
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, version 3 of the License.
|
|
7
|
+
#
|
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
# GNU General Public License for more details.
|
|
12
|
+
#
|
|
13
|
+
# You should have received a copy of the GNU General Public License
|
|
14
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
+
|
|
16
|
+
"""
|
|
17
|
+
This package contains scripts that are used for interacting with the source code compiler.
|
|
18
|
+
"""
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# The Certora Prover
|
|
2
|
+
# Copyright (C) 2025 Certora Ltd.
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, version 3 of the License.
|
|
7
|
+
#
|
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
# GNU General Public License for more details.
|
|
12
|
+
#
|
|
13
|
+
# You should have received a copy of the GNU General Public License
|
|
14
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
+
|
|
16
|
+
"""
|
|
17
|
+
This package contains scripts that are used for running the Certora Prover.
|
|
18
|
+
|
|
19
|
+
This package is a part of the certora_cli customer-facing Python package.
|
|
20
|
+
"""
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# The Certora Prover
|
|
2
|
+
# Copyright (C) 2025 Certora Ltd.
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, version 3 of the License.
|
|
7
|
+
#
|
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
# GNU General Public License for more details.
|
|
12
|
+
#
|
|
13
|
+
# You should have received a copy of the GNU General Public License
|
|
14
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
+
|
|
1
16
|
import enum
|
|
2
17
|
import json
|
|
3
18
|
import logging
|
|
@@ -13,32 +28,32 @@ from pathlib import Path
|
|
|
13
28
|
from typing import Any, Dict, List, Tuple, Optional, Set, Iterator, NoReturn
|
|
14
29
|
from Crypto.Hash import keccak
|
|
15
30
|
|
|
16
|
-
from
|
|
17
|
-
from
|
|
31
|
+
from CertoraProver.certoraBuildCacheManager import CertoraBuildCacheManager, CachedFiles
|
|
32
|
+
from CertoraProver.certoraBuildDataClasses import CONTRACTS, ImmutableReference, ContractExtension, ContractInSDC, SDC, \
|
|
18
33
|
Instrumentation, InsertBefore, InsertAfter, UnspecializedSourceFinder, instrumentation_logger
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
34
|
+
from CertoraProver.certoraCompilerParameters import SolcParameters
|
|
35
|
+
from CertoraProver.certoraSourceFinders import add_source_finders
|
|
36
|
+
from CertoraProver.certoraVerifyGenerator import CertoraVerifyGenerator
|
|
37
|
+
from CertoraProver.certoraContractFuncs import Func, InternalFunc, STATEMUT, SourceBytes
|
|
23
38
|
from Shared.certoraUtils import is_relative_to
|
|
24
39
|
|
|
25
40
|
scripts_dir_path = Path(__file__).parent.parent.resolve() # containing directory
|
|
26
41
|
sys.path.insert(0, str(scripts_dir_path))
|
|
27
|
-
from
|
|
28
|
-
from
|
|
29
|
-
from
|
|
30
|
-
from
|
|
31
|
-
from
|
|
42
|
+
from CertoraProver.Compiler.CompilerCollector import CompilerLang, CompilerCollector
|
|
43
|
+
from CertoraProver.Compiler.CompilerCollectorSol import CompilerCollectorSol, CompilerLangSol
|
|
44
|
+
from CertoraProver.Compiler.CompilerCollectorYul import CompilerLangYul, CompilerCollectorYul
|
|
45
|
+
from CertoraProver.Compiler.CompilerCollectorVy import CompilerLangVy
|
|
46
|
+
from CertoraProver.Compiler.CompilerCollectorFactory import CompilerCollectorFactory, \
|
|
32
47
|
get_relevant_compiler, get_compiler_lang
|
|
33
|
-
from
|
|
34
|
-
import
|
|
48
|
+
from CertoraProver.certoraNodeFilters import NodeFilters as Nf
|
|
49
|
+
import CertoraProver.certoraType as CT
|
|
35
50
|
|
|
36
|
-
from
|
|
37
|
-
import
|
|
51
|
+
from CertoraProver.certoraContextClass import CertoraContext
|
|
52
|
+
import CertoraProver.certoraContextAttributes as Attrs
|
|
38
53
|
from Shared import certoraValidateFuncs as Vf
|
|
39
|
-
from
|
|
54
|
+
from CertoraProver import certoraContextValidator as Cv
|
|
40
55
|
from Shared import certoraUtils as Util
|
|
41
|
-
import
|
|
56
|
+
import CertoraProver.certoraContext as Ctx
|
|
42
57
|
|
|
43
58
|
|
|
44
59
|
BUILD_IS_LIBRARY = False
|
|
@@ -211,7 +226,7 @@ def generate_compressed_finder(f: Func, internal_id: int, sym: int,
|
|
|
211
226
|
type_layout = 0
|
|
212
227
|
for ty in f.fullArgs:
|
|
213
228
|
# generate the layout according to this spec:
|
|
214
|
-
# https://
|
|
229
|
+
# https://www.notion.so/certora/Certora-Autofinder-Binary-Format-45327dff9de64b2fb1fdac4b1ec4d7f9
|
|
215
230
|
if finder_gen.is_decomposed(ty):
|
|
216
231
|
type_layout = (type_layout << 6 | 0b11010)
|
|
217
232
|
elif finder_gen.is_calldata_pointer(ty):
|
|
@@ -1332,6 +1347,24 @@ class CertoraBuildGenerator:
|
|
|
1332
1347
|
|
|
1333
1348
|
return bytecode
|
|
1334
1349
|
|
|
1350
|
+
def _handle_via_ir(self, contract_file_path: str, settings_dict: Dict[str, Any]) -> None:
|
|
1351
|
+
if not self.context.solc_via_ir_map and not self.context.solc_via_ir:
|
|
1352
|
+
return
|
|
1353
|
+
if self.context.solc_via_ir_map:
|
|
1354
|
+
match = Util.match_path_to_mapping_key(Path(contract_file_path), self.context.solc_via_ir_map)
|
|
1355
|
+
if match:
|
|
1356
|
+
settings_dict["viaIR"] = match
|
|
1357
|
+
elif self.context.solc_via_ir:
|
|
1358
|
+
settings_dict["viaIR"] = True
|
|
1359
|
+
|
|
1360
|
+
def _handle_evm_version(self, contract_file_path: str, settings_dict: Dict[str, Any]) -> None:
|
|
1361
|
+
if self.context.solc_evm_version_map:
|
|
1362
|
+
match = Util.match_path_to_mapping_key(Path(contract_file_path), self.context.solc_evm_version_map)
|
|
1363
|
+
if match:
|
|
1364
|
+
settings_dict["evmVersion"] = match
|
|
1365
|
+
elif self.context.solc_evm_version:
|
|
1366
|
+
settings_dict["evmVersion"] = self.context.solc_evm_version
|
|
1367
|
+
|
|
1335
1368
|
def _handle_optimize(self, contract_file_path: str, settings_dict: Dict[str, Any],
|
|
1336
1369
|
compiler_collector: CompilerCollector) -> None:
|
|
1337
1370
|
"""
|
|
@@ -1353,8 +1386,7 @@ class CertoraBuildGenerator:
|
|
|
1353
1386
|
optimizer = settings_dict.get("optimizer")
|
|
1354
1387
|
if optimizer and isinstance(optimizer, dict) and optimizer.get('enabled'):
|
|
1355
1388
|
# if we are not disabling finder friendly optimizer specifically, enable it whenever viaIR is also enabled
|
|
1356
|
-
if not self.context.strict_solc_optimizer and
|
|
1357
|
-
self.context.solc_via_ir or self.context.solc_experimental_via_ir):
|
|
1389
|
+
if not self.context.strict_solc_optimizer and self.context.solc_via_ir:
|
|
1358
1390
|
# The default optimizer steps (taken from libsolidity/interface/OptimiserSettings.h) but with the
|
|
1359
1391
|
# full inliner step removed
|
|
1360
1392
|
solc0_8_26_to_0_8_28 = ("dhfoDgvulfnTUtnIfxa[r]EscLMVcul[j]Trpeulxa[r]cLCTUca[r]LSsTFOtfDnca[r]" +
|
|
@@ -1431,10 +1463,9 @@ class CertoraBuildGenerator:
|
|
|
1431
1463
|
@param contract_file_path: the contract that we are working on
|
|
1432
1464
|
@param settings_dict: data structure for sending to the solc compiler
|
|
1433
1465
|
"""
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
settings_dict["evmVersion"] = self.context.solc_evm_version
|
|
1466
|
+
|
|
1467
|
+
self._handle_via_ir(contract_file_path, settings_dict)
|
|
1468
|
+
self._handle_evm_version(contract_file_path, settings_dict)
|
|
1438
1469
|
self._handle_optimize(contract_file_path, settings_dict, compiler_collector)
|
|
1439
1470
|
|
|
1440
1471
|
@staticmethod
|
|
@@ -1780,7 +1811,7 @@ class CertoraBuildGenerator:
|
|
|
1780
1811
|
compiler_logger.debug(f"about to run in {compile_wd} the command: {collect_cmd}")
|
|
1781
1812
|
compiler_logger.debug(f"solc input = {json.dumps(input_for_solc, indent=4)}")
|
|
1782
1813
|
|
|
1783
|
-
if self.context.test == str(Util.TestValue.CHECK_SOLC_OPTIONS):
|
|
1814
|
+
if self.context.test == str(Util.TestValue.CHECK_SOLC_OPTIONS) and eval(self.context.test_condition):
|
|
1784
1815
|
raise Util.TestResultsReady({'standard_json_input': standard_json_input, 'main_path': main_path})
|
|
1785
1816
|
Util.run_compiler_cmd(collect_cmd, f"{sdc_name}.standard.json", wd=compile_wd,
|
|
1786
1817
|
compiler_input=standard_json_input)
|
|
@@ -2358,7 +2389,7 @@ class CertoraBuildGenerator:
|
|
|
2358
2389
|
# if no function finder mode set, determine based on viaIR enabled or not:
|
|
2359
2390
|
if self.context.function_finder_mode is None:
|
|
2360
2391
|
# in via-ir, should not compress
|
|
2361
|
-
if self.context.solc_via_ir
|
|
2392
|
+
if self.context.solc_via_ir:
|
|
2362
2393
|
should_compress = False
|
|
2363
2394
|
else:
|
|
2364
2395
|
should_compress = True
|
|
@@ -2458,112 +2489,6 @@ class CertoraBuildGenerator:
|
|
|
2458
2489
|
# some referenced function calls could be builtins like require, whose declarations we do not see
|
|
2459
2490
|
return [node[self.CERTORA_CONTRACT_NAME()] for node in referenced_nodes if self.CERTORA_CONTRACT_NAME() in node]
|
|
2460
2491
|
|
|
2461
|
-
@staticmethod
|
|
2462
|
-
def __find_closest_methods(method_name: str, methods: List[Func]) -> List[str]:
|
|
2463
|
-
"""
|
|
2464
|
-
Gets a name of a method and a list of existing methods. Returns a list of closest matching method signatures.
|
|
2465
|
-
The match is performed on the name only, ignoring the parameters in the function.
|
|
2466
|
-
:param method_name: Name of a method
|
|
2467
|
-
:param methods: A list of possible methods.
|
|
2468
|
-
:return: An list of best suggested method signatures as replacement. Ordered by descending relevance.
|
|
2469
|
-
"""
|
|
2470
|
-
# Step 1: find the closest method names
|
|
2471
|
-
all_method_names = [method.name for method in methods]
|
|
2472
|
-
all_method_names = list(set(all_method_names)) # remove duplicate names
|
|
2473
|
-
possible_method_names = Util.get_closest_strings(method_name, all_method_names)
|
|
2474
|
-
|
|
2475
|
-
# Step 2: fetch the parameters of the closest matching method names
|
|
2476
|
-
possible_methods = list()
|
|
2477
|
-
for name in possible_method_names:
|
|
2478
|
-
for method in methods:
|
|
2479
|
-
if method.name == name:
|
|
2480
|
-
possible_methods.append(method.signature())
|
|
2481
|
-
return possible_methods
|
|
2482
|
-
|
|
2483
|
-
@staticmethod
|
|
2484
|
-
def __suggest_methods(wrong_sig: str, suggested_replacements: List[str]) -> None:
|
|
2485
|
-
"""
|
|
2486
|
-
Raises an error suggesting replacement methods for an erroneous signature.
|
|
2487
|
-
:param wrong_sig: A method signature as inserted by the user. Had no exact matches in the code.
|
|
2488
|
-
:param suggested_replacements: A list of suggested method signatures, ordered by descending relevance
|
|
2489
|
-
:raises: AttributeError always
|
|
2490
|
-
"""
|
|
2491
|
-
if len(suggested_replacements) == 0:
|
|
2492
|
-
raise Util.CertoraUserInputError(f"Method {wrong_sig} was not found.")
|
|
2493
|
-
|
|
2494
|
-
if len(suggested_replacements) == 1:
|
|
2495
|
-
options_str = suggested_replacements[0]
|
|
2496
|
-
elif len(suggested_replacements) == 2:
|
|
2497
|
-
options_str = " or ".join(suggested_replacements)
|
|
2498
|
-
elif len(suggested_replacements) > 2:
|
|
2499
|
-
# Code below adds or after the last comma if there are multiple options
|
|
2500
|
-
options_str = ", ".join(suggested_replacements)
|
|
2501
|
-
last_commas_location_regex = r"(?<=,)(?=[^,]*$)"
|
|
2502
|
-
options_str = re.sub(last_commas_location_regex, r" or", options_str)
|
|
2503
|
-
|
|
2504
|
-
raise Util.CertoraUserInputError(f"Method {wrong_sig} was not found. Maybe you meant {options_str}?")
|
|
2505
|
-
|
|
2506
|
-
def __verify_method(self, method_input: str, sdc_pre_finder: SDC) -> None:
|
|
2507
|
-
input_method_name = method_input.split('(')[0]
|
|
2508
|
-
input_method_sig = method_input.replace(' ', '')
|
|
2509
|
-
|
|
2510
|
-
"""
|
|
2511
|
-
A list of suggested methods, in case the user inserted a wrong method signature. Only public/external methods
|
|
2512
|
-
are suggested to the user. The suggestions are ordered by closest match - index zero is the best match, and
|
|
2513
|
-
descending.
|
|
2514
|
-
"""
|
|
2515
|
-
possible_methods = list()
|
|
2516
|
-
|
|
2517
|
-
# Step #1 - check if an exact match exists. If not, check if only the parameters were wrong in the signature
|
|
2518
|
-
|
|
2519
|
-
contract_names = [contract.name for contract in sdc_pre_finder.contracts]
|
|
2520
|
-
public_method_sets = [contract.methods for contract in sdc_pre_finder.contracts]
|
|
2521
|
-
public_methods = Util.flatten_set_list(public_method_sets)
|
|
2522
|
-
|
|
2523
|
-
for method in public_methods:
|
|
2524
|
-
if method.name == input_method_name: # Correct name, now we check parameter types
|
|
2525
|
-
if method.signature() == input_method_sig: # An exact match was found
|
|
2526
|
-
return
|
|
2527
|
-
|
|
2528
|
-
# A method with the same name but different parameters exists
|
|
2529
|
-
possible_methods.append(method.signature())
|
|
2530
|
-
|
|
2531
|
-
for contract_name in contract_names:
|
|
2532
|
-
contract_method_name = method.name_for_contract(contract_name)
|
|
2533
|
-
if contract_method_name == input_method_name:
|
|
2534
|
-
if method.signature_for_contract(contract_name) == input_method_sig:
|
|
2535
|
-
return
|
|
2536
|
-
|
|
2537
|
-
possible_methods.append(contract_method_name)
|
|
2538
|
-
|
|
2539
|
-
# Now we check if the method exists, but is private or external
|
|
2540
|
-
private_method_sets = [contract.internal_funcs for contract in sdc_pre_finder.contracts]
|
|
2541
|
-
private_methods = Util.flatten_set_list(private_method_sets)
|
|
2542
|
-
|
|
2543
|
-
for method in private_methods:
|
|
2544
|
-
if method.name == input_method_name: # Correct name, now we check parameter types
|
|
2545
|
-
if method.signature() == input_method_sig: # An exact match was found
|
|
2546
|
-
raise Util.CertoraUserInputError(
|
|
2547
|
-
f"Method {input_method_sig} is {method.visibility}. Please change it to external or public")
|
|
2548
|
-
|
|
2549
|
-
for contract_name in contract_names:
|
|
2550
|
-
contract_method_name = method.name_for_contract(contract_name)
|
|
2551
|
-
if contract_method_name == input_method_name:
|
|
2552
|
-
if method.signature_for_contract(contract_name) == input_method_sig:
|
|
2553
|
-
raise Util.CertoraUserInputError(
|
|
2554
|
-
f"Method {contract_method_name} is {method.visibility}. "
|
|
2555
|
-
"Please change it to external or public")
|
|
2556
|
-
|
|
2557
|
-
# We suggest a different method name, if we have a good enough suggestion
|
|
2558
|
-
# A method with correct name but wrong argument types takes precedence over a method with a different name
|
|
2559
|
-
if len(possible_methods) == 0:
|
|
2560
|
-
possible_methods = self.__find_closest_methods(input_method_name, public_methods)
|
|
2561
|
-
|
|
2562
|
-
if len(possible_methods) > 0: # We have suggestions
|
|
2563
|
-
self.__suggest_methods(method_input, possible_methods)
|
|
2564
|
-
|
|
2565
|
-
raise Util.CertoraUserInputError(f"Method {method_input} was not found")
|
|
2566
|
-
|
|
2567
2492
|
@staticmethod
|
|
2568
2493
|
def get_fresh_backupdir(backupdir: Path) -> Path:
|
|
2569
2494
|
"""
|
|
@@ -2595,34 +2520,6 @@ class CertoraBuildGenerator:
|
|
|
2595
2520
|
sdc_pre_finders = self.collect_for_file(build_arg_contract_file, i, compiler_lang, Path(os.getcwd()),
|
|
2596
2521
|
path_for_compiler_collector_file, original_sdc=None)
|
|
2597
2522
|
|
|
2598
|
-
if context.method and (build_arg_contract_file in context.verified_contract_files):
|
|
2599
|
-
# we check the --method flag's argument on compile time only for those modes
|
|
2600
|
-
# notice: when the backend will support multiple contracts to be verified/asserted,
|
|
2601
|
-
# we will have to be more careful here, since we assume there is only one contract
|
|
2602
|
-
# which is verified/asserted. For now, only the CLI support such multiple contracts.
|
|
2603
|
-
if context.verify:
|
|
2604
|
-
verified_contract_name = context.verify.split(":")[0]
|
|
2605
|
-
elif context.assert_contracts:
|
|
2606
|
-
verified_contract_name = context.assert_contracts[0]
|
|
2607
|
-
else:
|
|
2608
|
-
verified_contract_name = None
|
|
2609
|
-
|
|
2610
|
-
if verified_contract_name:
|
|
2611
|
-
sdc_with_verified_contract_name = next(
|
|
2612
|
-
curr_sdc for index, curr_sdc in enumerate(sdc_pre_finders) if
|
|
2613
|
-
curr_sdc.primary_contract == verified_contract_name)
|
|
2614
|
-
errs = []
|
|
2615
|
-
for method in context.method:
|
|
2616
|
-
try:
|
|
2617
|
-
self.__verify_method(method, sdc_with_verified_contract_name)
|
|
2618
|
-
except Util.CertoraUserInputError as e:
|
|
2619
|
-
errs.append(e)
|
|
2620
|
-
if len(errs) > 0:
|
|
2621
|
-
raise Util.CertoraUserInputError(
|
|
2622
|
-
"Some methods as specified via the `method` flag could not be found!"
|
|
2623
|
-
f"{Util.NEW_LINE}{Util.NEW_LINE.join(str(e) for e in errs)}"
|
|
2624
|
-
)
|
|
2625
|
-
|
|
2626
2523
|
# Build sources tree
|
|
2627
2524
|
build_logger.debug("Building source tree")
|
|
2628
2525
|
sources_from_pre_finder_SDCs = set()
|
|
@@ -2932,8 +2829,13 @@ class CertoraBuildGenerator:
|
|
|
2932
2829
|
new_file = self.to_autofinder_file(build_arg_contract_file)
|
|
2933
2830
|
self.context.file_to_contract[new_file] = self.context.file_to_contract[
|
|
2934
2831
|
build_arg_contract_file]
|
|
2935
|
-
|
|
2936
|
-
|
|
2832
|
+
|
|
2833
|
+
# add generated file to map attributes
|
|
2834
|
+
for map_attr in Attrs.get_attribute_class().all_map_attrs():
|
|
2835
|
+
map_attr_value = getattr(self.context, map_attr)
|
|
2836
|
+
if map_attr_value and build_arg_contract_file in map_attr_value:
|
|
2837
|
+
map_attr_value[new_file] = map_attr_value[build_arg_contract_file]
|
|
2838
|
+
|
|
2937
2839
|
autofinder_remappings[new_file] = build_arg_contract_file
|
|
2938
2840
|
# TODO: I think this file name gets passed on to kotlin?? Not sure if it'll ever want to open the
|
|
2939
2841
|
# file, or if it'll only get the .certora_config one??
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# The Certora Prover
|
|
2
|
+
# Copyright (C) 2025 Certora Ltd.
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, version 3 of the License.
|
|
7
|
+
#
|
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
# GNU General Public License for more details.
|
|
12
|
+
#
|
|
13
|
+
# You should have received a copy of the GNU General Public License
|
|
14
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
+
|
|
1
16
|
import json
|
|
2
17
|
import logging
|
|
3
18
|
import shutil
|
|
@@ -7,9 +22,9 @@ from typing import Set, Optional
|
|
|
7
22
|
|
|
8
23
|
from Crypto.Hash import keccak
|
|
9
24
|
|
|
10
|
-
from
|
|
25
|
+
from CertoraProver.certoraContext import collect_args_build_cache_affecting, get_attr_value, \
|
|
11
26
|
collect_args_build_cache_disabling, get_client_version
|
|
12
|
-
from
|
|
27
|
+
from CertoraProver.certoraContextClass import CertoraContext
|
|
13
28
|
from Shared import certoraUtils as Util
|
|
14
29
|
from Shared.certoraUtils import safe_create_dir
|
|
15
30
|
|
|
@@ -1,14 +1,29 @@
|
|
|
1
|
+
# The Certora Prover
|
|
2
|
+
# Copyright (C) 2025 Certora Ltd.
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, version 3 of the License.
|
|
7
|
+
#
|
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
# GNU General Public License for more details.
|
|
12
|
+
#
|
|
13
|
+
# You should have received a copy of the GNU General Public License
|
|
14
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
+
|
|
1
16
|
import logging
|
|
2
17
|
from dataclasses import dataclass
|
|
3
18
|
from pathlib import Path
|
|
4
19
|
from typing import Dict, Any, List, Set, Optional, BinaryIO
|
|
5
20
|
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
21
|
+
from CertoraProver import certoraType as CT
|
|
22
|
+
from CertoraProver.Compiler.CompilerCollector import CompilerCollector
|
|
23
|
+
from CertoraProver.Compiler.CompilerCollectorSol import CompilerLangSol
|
|
24
|
+
from CertoraProver.Compiler.CompilerCollectorVy import CompilerLangVy
|
|
25
|
+
from CertoraProver.certoraCompilerParameters import CompilerParameters
|
|
26
|
+
from CertoraProver.certoraContractFuncs import Func, InternalFunc, SourceBytes
|
|
12
27
|
from Shared import certoraUtils as Util
|
|
13
28
|
|
|
14
29
|
|