This guide provides detailed usage instructions for the CCA Specification Converter, including command line options, processing modes, and examples.
This reproduces section 7.1.
(generate a model)
./scope --target {eac5, rel0} --input-type pdf --mode reason > {eac5, rel0}.rs
(apply a patch to avoid type errors)
patch -p0 < ./patch/{eac5, rel0}.patch
cp {eac5, rel0}.rs ~/
(install verus)
cd ~
git clone https://github.com/verus-lang/verus.git
cd verus
git reset --hard bec74a67d9281a4f51a7e1855760c5d16d8f63ff
cd ./source
./tools/get-z3.sh (on Unix/macOs)
source ../tools/activate
vargo build --release
(verify)
./target-verus/release/verus ~/{eac5, rel0}.rsThis reproduces section 7.1.
(perform heuristic checks)
./scope --target {eac5, rel0} --input-type pdf --mode rule > {eac5, rel0}_rule.txt
(apply a patch for pre-determined labelling)
patch -p0 < ./patch/{eac5, rel0}_rule.patch
(see the result)
cat {eac5, rel0}_rule.txtThis reproduces section 7.2.2 and 7.3.
./scope --target {eac5, rel0, alp11, alp12} --input-type pdf --mode reason --is-coverage --no-dependency > {eac5, rel0, alp11, alp12}_coverage.rs
(apply a patch for pre-determined labelling)
patch -p0 < ./patch/{eac5, rel0, alp11, alp12}_coverage.patch
cp {eac5, rel0, alp11, alp12}_coverage.rs ~/
(verify)
./target-verus/release/verus ~/{eac5, rel0, alp11, alp12}_coverage.rs
(see the result)
cat ~/{eac5, rel0, alp11, alp12}_coverage.rs./scope [--target TARGET] [--mode MODE] [--input-type TYPE]| Option | Values | Default | Description |
|---|---|---|---|
--target |
eac5, rel0, alp11, alp12, alp13, alp14 | eac5 | Target specification to process |
--mode |
reason, rule, raw | reason | Processing mode |
--input-type |
txt, pdf | txt | Input file type |
--no-dependency |
flag | false | Skip dependency processing and output |
# Display help message
./scope --help
# Show current version and settings
./scope --target eac5 --mode reason --input-type txtPurpose: Full conversion from specification to Verus verification code
Use Cases:
- Formal verification of targeted properties
- Generating complete Verus specifications
- Academic research and proof development
Output: Complete Verus code with type definitions, function specifications, and proof obligations
Example:
./scope --target eac5 --mode reason --input-type txtGenerated Output Structure:
use vstd::prelude::*;
verus! {
// Type definitions
pub enum RmiStatusCode { ... }
// Struct definitions
struct RmmRealmParams { ... }
// Function specifications
pub open spec fn rmi_version_spec(...) -> bool { ... }
// Proof obligations
pub proof fn rmi_version_rule(...) { ... }
}
Purpose: Analysis and validation without code generation
Use Cases:
- Finding dangling outputs and footprint issues
- Specification consistency checking
Output: Analysis reports highlighting potential issues
Example:
./scope --target alp14 --mode rule --input-type pdfTypical Output:
--------------------------------------------
RMI_VDEV_CREATE command
dangling_output_1
dangling_output_2
--------------------------------------------
RMI_VDEV_DESTROY command
missing_footprint_item
Purpose: Document parsing without processing or conversion
Use Cases:
- Understanding specification structure
- Debugging parsing issues
- Extracting raw data for analysis
Output: Parsed specification data and dependencies
Example:
./scope --target rel0 --mode raw --input-type txtDescription: Process pre-converted text files
Prerequisites: Text file must exist (e.g., eac5.txt)
Advantages:
- Faster processing (no conversion step)
- Suitable for repeated processing
- Better for development and testing
Example:
./scope --target eac5 --input-type txt --mode reasonDescription: Automatically convert PDF files to text
Prerequisites:
- PDF file must exist (e.g.,
DEN0137_1.0-eac5_rmm-arch_external.pdf) pdftotextmust be installed
Advantages:
- Direct processing of original specifications
- No manual conversion required
- Consistent conversion settings
Setup:
# Install PDF processing dependencies
sudo apt-get install poppler-utils
# Verify installation
pdftotext -vExample:
./scope --target eac5 --input-type pdf --mode reason# Uses EAC5 specification, text input, reasoning mode
./scope# Process ALP14 specification
./scope --target alp14
# Process REL0 specification with PDF input
./scope --target rel0 --input-type pdf# Full conversion to Verus code
./scope --target eac5 --mode reason
# Rule-based checks
./scope --target alp14 --mode rule
# Raw parsing for debugging
./scope --target rel0 --mode raw# Generate only RMM model without dependency analysis
./scope --target eac5 --no-dependency
# Print parsed raw data without dependency information
./scope --mode raw --no-dependencyThe --no-dependency flag provides control over dependency analysis:
What it skips:
- Dependency collection from Architecture section
- RIPAS/HIPAS state transition analysis
- Dependency proof function generation (in reasoning mode)
- Dependency table output (in raw mode)
When to use it:
- Focus on command specifications only (RMM model)
- When dependency analysis is not relevant
Examples:
# Print only command-related information
./scope --target alp14 --mode raw --no-dependency
# Generate Verus code without dependency proofs
./scope --target eac5 --mode reason --no-dependency