You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
715 B

  1. #!/bin/bash
  2. r='^\s*$\|^\s*\#\|^\s*\}\s*$\|^\s*{\s*$' # removes comments and blank lines and lines that contain only { or }
  3. N1=`cat tendermint.ivy domain_model.ivy network_shim.ivy | grep -v $r'\|.*invariant.*' | wc -l`
  4. N2=`cat abstract_tendermint.ivy | grep "observed_" | wc -l` # the observed_* variables specify the observations of the nodes
  5. SPEC_LINES=`expr $N1 + $N2`
  6. echo "spec lines: $SPEC_LINES"
  7. N3=`cat abstract_tendermint.ivy | grep -v $r'\|.*observed_.*' | wc -l`
  8. N4=`cat accountable_safety_1.ivy | grep -v $r | wc -l`
  9. PROOF_LINES=`expr $N3 + $N4`
  10. echo "proof lines: $PROOF_LINES"
  11. RATIO=`bc <<< "scale=2;$PROOF_LINES / $SPEC_LINES"`
  12. echo "proof-to-code ratio for the accountable-safety property: $RATIO"