Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
6
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
Merge requests
!64
Replace sort-level flag for invariants by a function-level flag
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Replace sort-level flag for invariants by a function-level flag
github/fork/romac/is-invariant-of
into
master
Overview
0
Commits
1
Pipelines
0
Changes
7
Closed
Viktor Kuncak
requested to merge
github/fork/romac/is-invariant-of
into
master
6 years ago
Overview
0
Commits
1
Pipelines
0
Changes
7
Expand
Created by: romac
👍
0
👎
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
c4ce6134
1 commit,
1 year ago
7 files
+
25
−
27
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
Search (e.g. *.vue) (Ctrl+P)
src/main/scala/inox/ast/Definitions.scala
+
3
−
3
Options
@@ -271,8 +271,8 @@ trait Definitions { self: Trees =>
})
}
/** Denotes that this
adt is refined by invariant
''id'' */
sealed
case
class
HasADT
Invariant
(
id
:
Identifier
)
extends
Flag
(
"invariant"
,
Seq
(
id
))
/** Denotes that this
function is an invariant which refine the sort or constructor with id
''id'' */
sealed
case
class
Is
Invariant
Of
(
id
:
Identifier
)
extends
Flag
(
"invariant"
,
Seq
(
id
))
/** Denotes that this adt has an overriden equality relation given by ''id'' */
sealed
case
class
HasADTEquality
(
id
:
Identifier
)
extends
Flag
(
"equality"
,
Seq
(
id
))
@@ -326,7 +326,7 @@ trait Definitions { self: Trees =>
/** An invariant that refines this [[ADTSort]] */
def
invariant
(
implicit
s
:
Symbols
)
:
Option
[
FunDef
]
=
flags
.
collectFirst
{
case
HasADT
Invariant
(
id
)
=>
s
.
getFunction
(
id
)
}
s
.
functions
.
values
.
find
{
fd
=>
fd
.
flags
.
exists
{
_
==
Is
Invariant
Of
(
id
)
}
}
def
hasInvariant
(
implicit
s
:
Symbols
)
:
Boolean
=
invariant
.
isDefined
Loading