Overview
The SAW User Manual has a couple of significant issues:
- The flow and intent of the manual is inconsistent--sometimes it reads like a tutorial, other times like a reference
- Terminology is frequently used before it is defined
- Style and level of detail is inconsistent between supported input types (Java vs MIR vs LLVM)
- Comprehension aids like running examples and graphical representations of concepts are missing
In this issue I outline a suggestion for a new SAW manual organization and provide recommendations for new content and fixes for specific issues
Current Structure
The SAW manual today flows as follows:
- Overview
- Invoking SAW
- Structure of SAWScript
- Syntax
- Basic Types and Values
- Basic Expression Forms
- Other Basic Functions
- The Term Type
- Cryptol and its Role in SAW
- Transforming Term Values
- Rewriting
- Folding and Unfolding
- Other Built-in Transformation and Inspection Functions
- Loading and Storing Terms
- Proofs about Terms
- Automated Tactics
- Proof Script Diagnostics
- Rewriting in Proof Scripts
- Other Transformations
- Caching Solver Results
- Other External Provers
- Offline Provers
- Finishing Proofs without External Solvers. Move all deprecated content into the appendix.depricated section.
- Multiple Goals
- Proof Failure and Satisfying Assignments
- AIG Values and Proofs
- Symbolic Execution
- Symbolic Termination
- Loading Code
- Loading LLVM
- Loading Java
- Loading MIR
- Notes on Compiling Code for SAW
- Notes on C++ Analysis
- Direct Extraction
- Creating Symbolic Variables
- Specification-Based Verification
- Running a Verification
- Structure of a Specification
- Creating Fresh Variables
- The SetupValue and JVMValue Types
- Executing
- Return Values
- A First Simple Example
- Compositional Verification
- Specifying Heap Layout
- Specifying Heap Values
- Working with Compound Types
- Global variables
- Preconditions and Postconditions
- Assuming specifications
- A Heap-Based Example
- Verifying Cryptol FFI functions
- Extraction to the Coq theorem prover
- Support Library
- Cryptol module extraction
- Proofs involving uninterpreted functions
- Translation limitations and caveats
- Analyzing Hardware Circuits using Yosys
- Processing VHDL With Yosys
- Example: Ripple-Carry Adder
- API Reference
- Bisimulation Prover
- Bisimulation Example
- Understanding the proof goals
- Limitiations (note spelling error)
Recommended Structure and Per-Section Changes
-
Overview
- (new) SAW Use Cases. Discuss who is the intended audience for this manual. Introduce the types of equivalence checking or property exploration with which SAW can help.
- (new) SAW Terminology. Introduce 8-12 most important SAW concepts (e.g., cryptol, sawscript, symbolic execution, term, goal, tactic, etc). Pick terminology that applies across llvm, jvm, mir. Include a link to the (new!) glossary section.
- (new) Running example. Introduce a running example to reference throughout the manual. I suggest using a C and LLVM example.
-
Structure of SAWScript
- (new) parts of a SAW Script. Describe the common components of a SAW Script (e.g., load modules, set up symbolic execution, verify)
- A first simple example (bring forward from its old location)
- Syntax
- Basic Types and Values
- Basic Expression Forms
- Other Basic Functions
-
Invoking SAW. Move all of the old content for this section to appendix.repl reference. Replace it with a description (and running example) of how most users execute saw (e.g. saw script.saw). Note that windows users will need --no-color. Discuss basics of the SAW REPL and when you might use it (again, with running example). Refer users to appendix.command reference for more details.
-
Cryptol and its Role in SAW
-
Loading Code.
- Loading LLVM
- Loading Java
- Loading MIR
- Notes on Compiling Code for SAW
- Direct Extraction (demoted from top-level)
- Notes on C++ Analysis
-
Creating Symbolic Variables
-
Symbolic Execution
-
Symbolic Termination
-
The Term Type
-
Specification-Based Verification
- Running a Verification
- Structure of a Specification
- Creating Fresh Variables
- The SetupValue and JVMValue Types
- Executing
- Return Values
- A First Simple Example (revisited)
- Compositional Verification
- Specifying Heap Layout
- Specifying Heap Values
- Working with Compound Types
- Global variables
- Preconditions and Postconditions
- Assuming specifications
- A Heap-Based Example
- Verifying Cryptol FFI functions
-
Proofs about Terms
- Automated Tactics
- Proof Script Diagnostics
- Rewriting in Proof Scripts
- Other Transformations
- Caching Solver Results
- Other External Provers
- Offline Provers
- Finishing Proofs without External Solvers
- Multiple Goals
- Proof Failure and Satisfying Assignments
- AIG Values and Proofs
-
Transforming Term Values
- Rewriting
- Folding and Unfolding
- Other Built-in Transformation and Inspection Functions
- Loading and Storing Terms
-
Extraction to the Coq theorem prover
- Support Library
- Cryptol module extraction
- Proofs involving uninterpreted functions
- Translation limitations and caveats
-
Analyzing Hardware Circuits using Yosys
- Processing VHDL With Yosys
- Example: Ripple-Carry Adder
- API Reference
-
Bisimulation Prover
- Bisimulation Example
- Understanding the proof goals
- Limitiations (note spelling error)
-
(new) Appendices
- (new) Glossary
- Command
- Controlled binding
- Fold (and unfold)
- Function
- Goal
- JVMTerm
- JVMValue
- Hypothesis
- LLVMTerm
- MIRTerm
- MIRValue
- Post Conditions
- Pre Conditions
- ProofResult
- ReWrite Rule
- SatResult
- Simpset
- SetupValue. (why isn't this LLVMValue?)
- Symbolic Execution
- Tactic
- Term
- Theorem
- TopLevel
- (new) Command Reference
- admit
- jvm_fresh_var
- llvm_alloc
- llvm_fresh_var
- llvm_global
- llvm_points_to_
- llvm_verify
- mir_fresh_var
- ...
- (new) Shell/REPL Reference
- (deprecated item reference)
Overview
The SAW User Manual has a couple of significant issues:
In this issue I outline a suggestion for a new SAW manual organization and provide recommendations for new content and fixes for specific issues
Current Structure
The SAW manual today flows as follows:
Recommended Structure and Per-Section Changes
Overview
Structure of SAWScript
Invoking SAW. Move all of the old content for this section to appendix.repl reference. Replace it with a description (and running example) of how most users execute saw (e.g.
saw script.saw). Note that windows users will need--no-color. Discuss basics of the SAW REPL and when you might use it (again, with running example). Refer users to appendix.command reference for more details.Cryptol and its Role in SAW
Loading Code.
Creating Symbolic Variables
Symbolic Execution
Symbolic Termination
The Term Type
Specification-Based Verification
Proofs about Terms
Transforming Term Values
Extraction to the Coq theorem prover
Analyzing Hardware Circuits using Yosys
Bisimulation Prover
(new) Appendices
crucible*