MCPcopy Index your code
hub / github.com/crytic/roundme

github.com/crytic/roundme @0.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.1.0 ↗ · + Follow
52 symbols 91 edges 9 files 18 documented · 35%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

roundme

roundme is a human-assisted rounding analyzer. It helps its operator determine whether an arithmetic operation should round up or down.

Features

  • Recommends whether an arithmetic operation needs to round up or down
  • Generates LaTeX-based reports in PDF

How to use

  • Run roundme init to generate a default configuration file.
  • Run roundme config to generate user configuration file.
  • Run roundme analyze to analyze the configuration file
  • Run roundme pdf to generate a PDF (require latexmk)

Running roundme pdf on the default configuration will generate the following: Example

Configuration

roundme relies on a configuration file:

formula: a * b / c 
round_up: true
less_than_one: ["a * b"] # optional
greater_than_one: ["c"] # optional
  • formula contains the formula to be analyze
  • round_up determines if the result of the formula should round up or down
  • less_than_one is used for the ** rules (raw string comparison and sensible to space)
  • greater_than_one is used for the ** rules (raw string comparison and sensible to space)

See the balancer V2 example.

Rules

rounding() is the expected rounding direction for the result (up or down)

  • A + B => rounding(A), rounding(B) (addition does not change the rounding direction)
  • A - B => rounding(A), ! rounding(B) (the rounding direction of the substracted element is inverse of the expected rounding)
  • A * B => rounding(A), rounding(B), rounding(*) (multiplication does not change the rounding direction)
  • A / B => rounding(A), ! rounding(B), rounding(/) (the rounding direction of the denominator is the inverse of the expected rounding)
  • A ** B
  • If A>=1 => rounding(A), rounding(B)
  • If A<1 => rounding(A), ! rounding(B) (if A is below 1, the rounding direction of the exponent is the inverse of the expected rounding)

Install

Install with

cargo install roundme

To install the latest GitHub version

git clone git@github.com:crytic/roundme.git
cd roundme
cargo install --path .

Core symbols most depended-on inside this repo

to_yaml_str
called by 3
src/config.rs
ask_yes_no
called by 3
src/utils.rs
write
called by 2
src/latex_generator.rs
add_less_than_one
called by 2
src/config.rs
add_greater_than_one
called by 2
src/config.rs
load_yaml
called by 2
src/config.rs
analyze
called by 2
src/main.rs
bool_to_rounding
called by 2
src/ast.rs

Shape

Function 44
Method 4
Enum 3
Class 1

Languages

Rust100%

Modules by API surface

src/ast.rs19 symbols
src/config.rs14 symbols
src/main.rs5 symbols
src/analyze_rounding.rs5 symbols
src/latex_generator.rs4 symbols
src/expression_utils.rs3 symbols
src/utils.rs1 symbols
build.rs1 symbols

For agents

$ claude mcp add roundme \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact