How phannhatminh/vproof works
VProof is a command-line runner for V, a language for writing and checking formal proofs. The main workflow reads a source file, parses statements incrementally, and has the interpreter dispatch them to proof operations and the shared world of objects and propositions; the CLI prints a trace and check totals. The runtime also supports exact arithmetic, symbolic simplification, and a minimal embedded prelude. The tree and excerpts establish the module boundaries; relationships for unsampled implementation details are omitted rather than inferred.
Main entry points: interp.cpp Statement interpreter · world.cpp World state · parser.cpp Incremental parser · core.hpp Object model
Components 12
Program entry
- CLI runner
src/main.cpp
Language runtime
- Statement interpreter
src/interp.cpp - Incremental parser
src/parser.cpp - Statement forms
include/v/syntax.hpp - Embedded prelude
include/v/prelude.hpp
Proof engine
- Proof operations
src/prover.cpp
Proof model
- World state
src/world.cpp - Object model
include/v/core.hpp - Proposition model
src/prop.cpp
Mathematics
- Exact rationals
src/rational.cpp - Symbolic algebra
src/symbolic.cpp
Other components
- V program author
Connections 15
- V program author → CLI runner: runs file
src/main.cpp - CLI runner → Statement interpreter: runs source
src/main.cpp - Statement interpreter → Incremental parser: parses statements
- Incremental parser → Statement forms: builds statements
- Statement interpreter → Proof operations: dispatches proofs
- Statement interpreter → World state: maintains state
- Statement interpreter → Embedded prelude: loads prelude
src/interp.cpp - Proof operations → World state: records proofs
- Incremental parser → World state: builds propositions
- World state → Object model: stores objects
- World state → Proposition model: stores propositions
- Proposition model → Object model: uses object IDs
- Statement interpreter → Symbolic algebra: simplifies expressions
src/interp.cpp - Symbolic algebra → World state: resolves terms
- Object model → Exact rationals: stores values
include/v/core.hpp