Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LARA
inox
Commits
3d182d3d
Commit
3d182d3d
authored
9 years ago
by
Viktor Kuncak
Browse files
Options
Downloads
Patches
Plain Diff
updated doc to remove the modulo limitation
parent
06ad7d4a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/limitations.rst
+0
-29
0 additions, 29 deletions
doc/limitations.rst
with
0 additions
and
29 deletions
doc/limitations.rst
+
0
−
29
View file @
3d182d3d
...
@@ -15,35 +15,6 @@ the SMT solvers invoked.
...
@@ -15,35 +15,6 @@ the SMT solvers invoked.
Below we document several cases where we are aware that the
Below we document several cases where we are aware that the
discrepancy exists and provide suggested workarounds.
discrepancy exists and provide suggested workarounds.
Integer Division and Modulo
^^^^^^^^^^^^^^^^^^^^^^^^^^^
On `BigInt` data types, the division operator `/` and
the modulo operator `%` should only be invoked with positive
arguments. There are several specific issues.
First, Leon currently does not check for division by zero.
You can work around this by defining your own division operator
with the corresponding precondition.
Second, division has rounding-to-zero runtime semantics,
following Java Virtual Machine and the `BigInt` library
of Java and Scala, so `(-14)/3 == -4` and, more generally,
`(-x)/y = -(x/y)`. In general, modulo operator `%` is defined
so it can be used together with `/`, so that
`(x/y)*y + (x % y) == x`. Thus, `(-14) % 3 == -2`.
In contrast, SMT solvers following the SMT-LIB standard use
rounding to negative infinity, so `(-14)/3 == -5` is a
theorem, and `(-14) % 3 == 1`. With SMT-LIB semantics, the
result of modulo `x % y` is non-negative and less than the
absolute value of `y`.
For the moment we therefore recommend defining your own
operators with appropriate preconditions. Note that the
capabilities for automated proofs are limited when the
second argument of `/` or `%` is not a constant literal.
Out of Memory Errors
Out of Memory Errors
^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment