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
9321437a
Commit
9321437a
authored
8 years ago
by
Manos Koukoutos
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug in isPurelyFunctional, comments
parent
f46962ed
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/scala/inox/ast/ExprOps.scala
+4
-7
4 additions, 7 deletions
src/main/scala/inox/ast/ExprOps.scala
src/main/scala/inox/ast/Trees.scala
+1
-2
1 addition, 2 deletions
src/main/scala/inox/ast/Trees.scala
with
5 additions
and
9 deletions
src/main/scala/inox/ast/ExprOps.scala
+
4
−
7
View file @
9321437a
...
@@ -3,10 +3,7 @@
...
@@ -3,10 +3,7 @@
package
inox
package
inox
package
ast
package
ast
import
utils._
/** Provides functions to manipulate [[Expressions.Expr]].
import
scala.reflect._
/** Provides functions to manipulate [[purescala.Expressions]].
*
*
* This object provides a few generic operations on Leon expressions,
* This object provides a few generic operations on Leon expressions,
* as well as some common operations.
* as well as some common operations.
...
@@ -114,9 +111,9 @@ trait ExprOps extends GenTreeOps {
...
@@ -114,9 +111,9 @@ trait ExprOps extends GenTreeOps {
/** Returns if this expression behaves as a purely functional construct,
/** Returns if this expression behaves as a purely functional construct,
* i.e. always returns the same value (for the same environment) and has no side-effects
* i.e. always returns the same value (for the same environment) and has no side-effects
*/
*/
def
isPurelyFunctional
(
e
:
Expr
)
:
Boolean
=
exists
{
def
isPurelyFunctional
(
e
:
Expr
)
:
Boolean
=
!
exists
{
case
_
:
Error
=>
fals
e
case
_
:
Error
=>
tru
e
case
_
=>
tru
e
case
_
=>
fals
e
}(
e
)
}(
e
)
/** Extracts the body without its specification
/** Extracts the body without its specification
...
...
This diff is collapsed.
Click to expand it.
src/main/scala/inox/ast/Trees.scala
+
1
−
2
View file @
9321437a
...
@@ -80,7 +80,6 @@ trait Trees extends Expressions with Extractors with Types with Definitions with
...
@@ -80,7 +80,6 @@ trait Trees extends Expressions with Extractors with Types with Definitions with
/** Builds a fresh identifier
/** Builds a fresh identifier
*
*
* @param name The name of the identifier
* @param name The name of the identifier
* @param tpe The type of the identifier
* @param alwaysShowUniqueID If the unique ID should always be shown
* @param alwaysShowUniqueID If the unique ID should always be shown
*/
*/
def
apply
(
name
:
String
,
alwaysShowUniqueID
:
Boolean
=
false
)
:
Identifier
=
{
def
apply
(
name
:
String
,
alwaysShowUniqueID
:
Boolean
=
false
)
:
Identifier
=
{
...
@@ -92,7 +91,7 @@ trait Trees extends Expressions with Extractors with Types with Definitions with
...
@@ -92,7 +91,7 @@ trait Trees extends Expressions with Extractors with Types with Definitions with
*
*
* @param name The name of the identifier
* @param name The name of the identifier
* @param forceId The forced ID of the identifier
* @param forceId The forced ID of the identifier
* @param
tpe The type of the identifier
* @param
alwaysShowUniqueID If the unique ID should always be shown
*/
*/
def
forceId
(
name
:
String
,
forceId
:
Int
,
alwaysShowUniqueID
:
Boolean
=
false
)
:
Identifier
=
def
forceId
(
name
:
String
,
forceId
:
Int
,
alwaysShowUniqueID
:
Boolean
=
false
)
:
Identifier
=
new
Identifier
(
decode
(
name
),
uniqueCounter
.
nextGlobal
,
forceId
,
alwaysShowUniqueID
)
new
Identifier
(
decode
(
name
),
uniqueCounter
.
nextGlobal
,
forceId
,
alwaysShowUniqueID
)
...
...
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