Skip to content
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
fba3aae
added Ranger repo
May 12, 2025
9bb35c8
added an md besides the index page
May 12, 2025
9879092
added Ranger to top level toc tree
May 12, 2025
2247e56
adding all files under ranger docs
May 12, 2025
2e139a0
forgot to add content
May 12, 2025
bcfcbd2
base text for Ranger
May 13, 2025
821c409
first round of upgrades
May 13, 2025
41a7e8b
trying ref and term tags
May 13, 2025
6cd89a5
improving links
May 13, 2025
f21b182
text improvements on intro
May 13, 2025
4056511
fixing link to CVL
May 13, 2025
669da9b
first version of Ranger user guide
May 13, 2025
4af3d41
fixing titles
May 13, 2025
fb12791
minor improvements to Ranger getting started
May 13, 2025
dafa026
shorter title for Ranger index page
May 13, 2025
28ff991
Merge remote-tracking branch 'origin/master' into uri/add_ranger_docs
May 15, 2025
1b686eb
ranger now also checks rules
May 18, 2025
c7a4b6e
Merge remote-tracking branch 'origin/master' into uri/add_ranger_docs
May 18, 2025
03f3c08
added note about using either --rule or --split_rules
May 18, 2025
22e5da9
{warn} -> {warning}
May 18, 2025
6f1bcfd
Yoav/cert 8890 ranger cli docs (#397)
yoav-el-certora May 18, 2025
bdef21d
Merge remote-tracking branch 'origin/master' into uri/add_ranger_docs
May 18, 2025
834dcd9
trying a new markdown comment style
May 18, 2025
4be35a0
trying a different style of comment
May 18, 2025
d7d4c2a
trying one big multi-line comment
May 18, 2025
eaed893
spelling
May 18, 2025
c937873
fixing title sizes under ranger_linet.md
May 18, 2025
48de033
removing code tags from title
May 18, 2025
860d84e
certora-cli instead of certora Python package
May 18, 2025
22967ae
Johannes' CR part 1
May 19, 2025
ab2f870
isn't -> is not
May 19, 2025
0f5f5b4
removing mentions of requuiring invariants
May 19, 2025
8f4a1ca
removing ranger failure limit
May 19, 2025
1a388e9
added note for no Ranger support for multi_example to test how it looks
May 27, 2025
5c0cf4b
added notes on all flags Ranger doesn't support
May 27, 2025
8f41e0e
Merge remote-tracking branch 'origin/master' into uri/add_ranger_docs
Jun 8, 2025
b7ff08e
merge from master after v8 changes
Aug 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/ranger/how_ranger_works.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# How Ranger Works

Bounded search and depth (--bmc)

Initial state selection (constructor vs custom)

Built-in underapproximations (and how to override them)
15 changes: 15 additions & 0 deletions docs/ranger/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(ranger-intro)=
Ranger
======

Text

```{toctree}
:maxdepth: 2

ranger_intro.md
starting_with_ranger.md
how_ranger_works.md
ranger_client.md
```

9 changes: 9 additions & 0 deletions docs/ranger/ranger_client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# The Ranger Client

# Usage: certoraRanger

# Ranger-specific flags

# Unsupported Prover flags

# Config file compatibility
24 changes: 24 additions & 0 deletions docs/ranger/ranger_intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Introduction

**Ranger** is Certora’s bounded model checker for smart contracts. It complements formal verification by offering a lightweight, developer-friendly approach for quickly identifying violations of contract invariants.

Unlike the [Certora Prover](/docs/user-guide/index), which explores all program states, Ranger starts from a specific initial state and explores all function call sequences up to a bounded depth. This ensures that every violation corresponds to a realistic execution path, removing the need to filter out spurious counterexamples.

---

## Why Ranger?

Formal Verification provides strong correctness guarantees and checks more program states, but it can be slow, complex, and prone to false positives from unreachable states. {term}`fuzzing`, on the other hand, is faster, but has a lower coverage as it only checks for specific inputs per run.

Ranger offers a practical middle ground:

- ✅ **Realistic counterexamples**: All violations are reachable from the initial state.
- ✅ **Faster time to value**: Minimal setup required to get useful results.
- ✅ **Fewer false positives**: No need to precondition rules to filter out invalid states.
- ✅ **High coverage**: Symbolically tests all function call sequences from the initial state up to a certain range.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rephrase this slightly.

Suggested change
-**High coverage**: Symbolically tests all function call sequences from the initial state up to a certain range.
-**High coverage**: Tests all function call sequences on symbolic inputs from the initial state up to a certain range.


---

## Scope and Limitations

Ranger is in active development and currently supports only Solidity contracts.
55 changes: 55 additions & 0 deletions docs/ranger/starting_with_ranger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Getting Started

This guide will help you run your first Ranger job using a Solidity contract and a [CVL](/docs/cvl/index) [invariant](/docs/cvl/invariants).

Ranger uses the same installation process, configuration files, and spec files as the [Certora Prover](/docs/user-guide/index). If you're already familiar with the Prover, getting started with Ranger will feel familiar.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That Ranger uses CVL could be stated also ranger_intro?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


---

## 1. Install Certora Tools

Ranger is part of the `certora` Python package. You can install or upgrade it using `pip`:

```bash
pip install certora-cli
```
For full installation instructions and troubleshooting, see the Certora Prover [installation guide](/docs/user-guide/install).

## 2. Prepare Your Files
You'll need three files:

- A compiled Solidity contract (e.g. `MyContract.sol`)
- A CVL spec file with at least one invariant (e.g. `MyContract.spec`)
- A configuration file (e.g. `ranger.conf`)

Example `ranger.conf`:

```json
{
"files": ["MyContract.sol"],
"verify": "MyContract:MyContract.spec"
}
```

## 3. Run Ranger
Use the certoraRanger command to launch the job:

```bash
certoraRanger ranger.conf
```

This will start the Ranger process. A link to the Ranger Job Report in the dashboard will be pasted into your command line when the job is submitted.
Comment on lines +34 to +41

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to mention somewhere that ranger runs lots of processes/is compute intensive and suggest that users use it with --rule in order to test only one rule/invariant, or use --split_rules "*" so each rule will run in a separate job?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a new warning with this info. IDK if it fits a warning or an info message


```{warning}
Ranger is compute-intensive: It performs symbolic exploration of many function call sequences. For faster feedback, avoiding timeouts, and better resource usage, consider one of the following:

1. Use {ref}`--rule` to focus on a single invariant or rule.

2. Use {ref}`--split_rules` to automatically run each rule/invariant in a separate job.
```


## 4. View the Results
A link to the Ranger Job Report in the dashboard will be pasted in your command line
when the job is submitted.
You can explore the results in the web-based Ranger Report by following the link.
6 changes: 6 additions & 0 deletions docs/user-guide/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ EVM storage
the Ethereum blockchain.
[Official documentation](https://ethereum.org/en/developers/docs/smart-contracts/anatomy)

fuzzing
An automated testing technique that sends large volumes of randomized or semi-randomized
inputs to smart contract functions to uncover unexpected behaviors, reverts, or security
vulnerabilities. In DeFi, fuzzing is especially useful for discovering edge cases in financial
logic, such as precision loss, invalid state transitions, or violations of protocol invariants.

havoc
Havoc means that variables are assigned values chosen non-deterministically.
A havoc happens in two cases: the first, at the beginning of the rule all variables
Expand Down
2 changes: 2 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Contents
* :doc:`docs/sunbeam/index` -- instructions for installing and using *Certora Sunbeam*
for formal verification of `Soroban`_ contracts.
* :doc:`docs/solana/index` -- instructions for installing and using *Certora Solana Prover*
* :doc:`docs/ranger/index` -- TODO

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* :doc:`docs/ranger/index` -- TODO
* :doc:`docs/ranger/index` -- explains how to use Ranger, Certora's Bounded Model Checker.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

* :doc:`docs/gambit/index` -- use mutation testing to improve you specifications.

.. toctree::
Expand All @@ -23,6 +24,7 @@ Contents
docs/prover/index.md
docs/sunbeam/index.rst
docs/solana/index.rst
docs/ranger/index.md
docs/gambit/index.md


Expand Down