-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
assertions.jl
from Hecke (#1789)
- Loading branch information
1 parent
ed58b14
commit ee8f572
Showing
5 changed files
with
674 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Assertion and Verbosity Macros | ||
```@meta | ||
CurrentModule = AbstractAlgebra | ||
DocTestSetup = quote | ||
using AbstractAlgebra | ||
end | ||
``` | ||
|
||
We describe here various macros provided by AbstractAlgebra. | ||
|
||
## Verbosity macros | ||
There is a list of symbols called *verbosity scopes* which represent keywords used to | ||
trigger some particular macros within the codes. Each of these verbosity scopes is | ||
associated with a *verbosity level*, being set to $0$ by default. A verbosity macro | ||
is joined to a verbosity scope `S` and a value `k` (set to $1$ by default) such that, | ||
if the current verbosity level `l` of `S` is bigger than or equal to `k`, then the | ||
macro triggers a given action. | ||
|
||
```@docs | ||
add_verbosity_scope(s::Symbol) | ||
set_verbosity_level(s::Symbol, l::Int) | ||
get_verbosity_level(s::Symbol) | ||
``` | ||
|
||
### Printings | ||
|
||
```@docs | ||
@vprintln | ||
@vprint | ||
``` | ||
|
||
### Actions | ||
|
||
```@docs | ||
@v_do | ||
``` | ||
|
||
## Assertion macros | ||
There is a list of symbols called *assertion scopes* which represent keywords used to | ||
trigger some particular macros within the codes. Each of these assertion scopes is | ||
associated with an *assertion level*, being set to $0$ by default. An assertion macro | ||
is joined to an assertion scope `S` and a value `k` (set to $1$ by default) such that, | ||
if the current assertion level `l` of `S` is bigger than or equal to `k`, then the | ||
macro triggers an action on the given assertion | ||
|
||
```@docs | ||
add_assertion_scope(s::Symbol) | ||
set_assertion_level(s::Symbol, l::Int) | ||
get_assertion_level(s::Symbol) | ||
``` | ||
|
||
### Check | ||
|
||
```@docs | ||
@hassert | ||
``` | ||
|
||
## Miscellaneous | ||
|
||
```@docs | ||
@req | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.