mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
DrNim (Nim compiler with Z3 integration) (#13743)
* code cleanups and feature additions * added basic test and koch/CI integration * make it build on Unix * DrNim: now buildable on Unix, only takes 10 minutes, enjoy * added basic documentation for DrNim which can also be seen as the RFC we're following * drnim: change the build setup so that drnim.exe ends up in bin/ * makes simple floating point ranges work * added basic float range check * drnim: teach Z3 about Nim's range types plus code refactoring * drnim: make unsigned numbers work * added and fixed index checking under setLen * first implementation of .ensures, .invariant and .assume (.requires still missing and so is proc type compatibility checking * drnim: .requires checking implemented * drnim: implemented .ensures properly * more impressive test involving min() * drnim: check for proc type compatibility and base method compatibility wrt .requires and .ensures * testament: support for 'pattern <directory> * koch: uses new <directory> feature of testament * drnim: added tiny musings about 'old' * Make testament work with old SSL versions * koch: add support for 'koch drnim -d:release' * drnim: preparations for the param.old notation
This commit is contained in:
10
lib/std/logic.nim
Normal file
10
lib/std/logic.nim
Normal file
@@ -0,0 +1,10 @@
|
||||
## This module provides further logic operators like 'forall' and 'exists'
|
||||
## They are only supported in ``.ensures`` etc pragmas.
|
||||
|
||||
proc `->`*(a, b: bool): bool {.magic: "Implies".}
|
||||
proc `<->`*(a, b: bool): bool {.magic: "Iff".}
|
||||
|
||||
proc forall*(args: varargs[untyped]): bool {.magic: "Forall".}
|
||||
proc exists*(args: varargs[untyped]): bool {.magic: "Exists".}
|
||||
|
||||
proc old*[T](x: T): T {.magic: "Old".}
|
||||
Reference in New Issue
Block a user