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
a9f3fe62
Commit
a9f3fe62
authored
11 years ago
by
Emmanouil (Manos) Koukoutos
Browse files
Options
Downloads
Patches
Plain Diff
Improve FunDef.duplicate. FunDef.copyContentFrom
parent
be5569a8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/scala/leon/purescala/Definitions.scala
+9
-4
9 additions, 4 deletions
src/main/scala/leon/purescala/Definitions.scala
src/main/scala/leon/purescala/MethodLifting.scala
+1
-5
1 addition, 5 deletions
src/main/scala/leon/purescala/MethodLifting.scala
with
10 additions
and
9 deletions
src/main/scala/leon/purescala/Definitions.scala
+
9
−
4
View file @
a9f3fe62
...
...
@@ -212,10 +212,15 @@ object Definitions {
def
duplicate
:
FunDef
=
{
val
fd
=
new
FunDef
(
id
,
tparams
,
returnType
,
params
)
fd
.
fullBody
=
fullBody
fd
.
parent
=
parent
fd
.
orig
=
orig
fd
fd
.
copyContentFrom
(
this
)
fd
.
copiedFrom
(
this
)
}
def
copyContentFrom
(
from
:
FunDef
)
{
this
.
fullBody
=
from
.
fullBody
this
.
parent
=
from
.
parent
this
.
orig
=
from
.
orig
this
.
addAnnotation
(
from
.
annotations
.
toSeq
:
_
*
)
}
def
hasBody
=
body
.
isDefined
...
...
This diff is collapsed.
Click to expand it.
src/main/scala/leon/purescala/MethodLifting.scala
+
1
−
5
View file @
a9f3fe62
...
...
@@ -30,12 +30,8 @@ object MethodLifting extends TransformationPhase {
val
receiver
=
FreshIdentifier
(
"$this"
).
setType
(
recType
).
setPos
(
cd
.
id
)
val
nfd
=
new
FunDef
(
id
,
ctParams
++
fd
.
tparams
,
fd
.
returnType
,
ValDef
(
receiver
,
recType
)
+:
fd
.
params
)
nfd
.
postcondition
=
fd
.
postcondition
nfd
.
precondition
=
fd
.
precondition
nfd
.
body
=
fd
.
body
nfd
.
copyContentFrom
(
fd
)
nfd
.
setPos
(
fd
)
nfd
.
addAnnotation
(
fd
.
annotations
.
toSeq
:
_
*
)
mdToFds
+=
fd
->
nfd
}
...
...
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