Skip to content

eschnett/Contracts.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contracts

Build Status Build status codecov.io

Contracts provides macros for pre- and post-conditions in functions.

Example

@contract function f(x, y)
    requires(x < y)
    ensures(result > x)
    x^2 + y^2
end

There is a current discussion on the Julia mailing list regarding the names of these features. So far, the names precondition, pre, require, and requires have been proposed.

Future plans

  • Loops: Loop invariants and loop variants
  • Data structures: Data structure invariants
  • Allow disabling checks for performance

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages