VaRA research tool¶
Module for the research tool VaRA that describes the VaRA code base layout and how to configure and setup VaRA.
- varats.tools.research_tools.vara.set_vara_cmake_variables(install_prefix, post_out=<function <lambda>>)[source]¶
Set all wanted/needed cmake flags.
- Return type:
None
- class varats.tools.research_tools.vara.VaRACodeBase(base_dir)[source]¶
Bases:
CodeBaseLayout of the VaRA code base: setting up vara-llvm-project fork, VaRA, and optionally phasar for static analysis.
- setup_vara_remotes()[source]¶
Sets up VaRA specific upstream remotes for projects that were forked.
- Return type:
None
- setup_build_link()[source]¶
Setup build-config folder link for VaRA’s default build setup scripts.
- Return type:
None
- checkout_vara_version(version, use_dev_branches)[source]¶
Checkout out a specific version of VaRA.
- Parameters:
version (
int) – major version number, e.g., 100 or 110use_dev_branches (
bool) – true, if one wants the current development version
- Return type:
None
- class varats.tools.research_tools.vara.VaRA(base_dir)[source]¶
Bases:
ResearchTool[VaRACodeBase]Research tool implementation for VaRA.
Find the main repo online on github: https://github.com/se-sic/VaRA
- classmethod get_dependencies()[source]¶
Returns the dependencies for this research tool.
- Return type:
- static source_location()[source]¶
Returns the source location of the research tool.
- Return type:
Path
- static has_source_location()[source]¶
Checks if a source location of the research tool is configured.
- Return type:
bool
- static install_location()[source]¶
Returns the install location of the research tool.
- Return type:
Path
- static has_install_location()[source]¶
Checks if a install location of the research tool is configured.
- Return type:
bool
- setup(source_folder, install_prefix, version)[source]¶
Setup the research tool VaRA with it’s code base. This method sets up all relevant config variables, downloads repositories via the
CodeBase, checkouts the correct branches and prepares the research tool to be built.- Parameters:
source_folder (
Optional[Path]) – location to store the code base ininstall_prefix (
Path) – Installation prefix pathversion (
Optional[int]) – Version to setup
- Return type:
None
- find_highest_sub_prj_version(sub_prj_name)[source]¶
Returns the highest release version number for the specified
SubProjectname.- Return type:
int
- is_up_to_date()[source]¶
Returns true if VaRA’s major release version is up to date.
- Return type:
bool
- build(build_type, install_location, build_folder_suffix)[source]¶
Build/Compile VaRA in the specified
build_type. This method leaves VaRA in a finished state, i.e., being ready to be installed.- Parameters:
build_type (
BuildType) – which type of build should be used, e.g., debug, development or release- Return type:
None
- get_install_binaries()[source]¶
Returns a list of binaries to check when validating the installation.
- Return type:
List[str]
- verify_install(install_location)[source]¶
Verify if VaRA was correctly installed.
- Return type:
bool- Returns:
True, if the tool was correctly installed
- verify_build(build_type, build_folder_suffix)[source]¶
Verifies whether vara was built correctly for the given target.
- Parameters:
build_type (
BuildType) – which type of build should be used, e.g., debug, development or release- Return type:
bool- Returns:
True iff all tests from check_vara pass
- container_install_dependencies(stage_builder)[source]¶
Add layers for installing this research tool’s dependencies to the given container.
- Parameters:
stage_builder (
StageBuilder) – the builder object for the current container stage- Return type:
None
- container_install_tool(stage_builder)[source]¶
Add layers for installing this research tool to the given container.
- Parameters:
stage_builder (
StageBuilder) – the builder object for the current container stage- Return type:
None
- container_tool_env(stage_builder)[source]¶
Tool-specific container configuration in the form of environment variables.
- Parameters:
stage_builder (
StageBuilder) – the builder object for the current container stage- Return type:
Dict[str,List[str]]- Returns:
a dictionary of environment variables and their values