Skip to content

Commit

Permalink
Small CLI fixes
Browse files Browse the repository at this point in the history
Add CLI command description and clarify verification is not yet implemented.

Signed-off-by: Enrico Ghiorzi <[email protected]>
  • Loading branch information
EnricoGhiorzi committed May 21, 2024
1 parent 5c4ad68 commit 8f9c4a1
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use log::info;
use scan_fmt_xml::{Parser, Sc2CsVisitor};
use std::{error::Error, path::PathBuf};

/// SCAN (StoChastic ANalyzer)
/// is a statistical model checker based on channel systems
#[derive(ClapParser)]
#[command(author, version, about, long_about = None)]
struct Cli {
Expand Down Expand Up @@ -37,21 +39,11 @@ fn main() -> Result<(), Box<dyn Error>> {

match &cli.command {
Commands::Verify { runs: _ } => {
println!("Validating model");

info!("creating reader from file {0}", cli.model.display());
// let mut reader = Reader::from_file(cli.model)?;

info!("parsing model");
let model = Parser::parse(cli.model.to_owned())?;
// let model = Parser::parse(&mut reader)?;
println!("{model:#?}");
let cs = Sc2CsVisitor::visit(model)?;
println!("{cs:#?}");

println!("Model successfully validated");
println!("Verifying model - NOT YET IMPLEMENTED");

todo!();
// info!("parsing model");
// let model = Parser::parse(cli.model.to_owned())?;
// let cs = Sc2CsVisitor::visit(model)?;

// for run in 0..*runs {
// info!("verify model, run {run}");
Expand Down

0 comments on commit 8f9c4a1

Please sign in to comment.