proofpeer / proofpeer-proofscript

The language of ProofPeer: ProofScript
MIT License
8 stars 0 forks source link

Add assert and failure statements #14

Closed phlegmaticprogrammer closed 10 years ago

phlegmaticprogrammer commented 10 years ago

The syntax of the statements would be

assert <expr>

and

failure <expr>

The semantics of assert <expr> is pretty much that of if not <expr> then fail. The semantics of failure <expr> is that if the evaluation of fails, then the statement has no effect, otherwise it fails.

The two statements will make it convenient to write tests.