Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
javawlp
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
Model registry
Operate
Environments
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
impresshs
javawlp
Commits
18f10a0d
Commit
18f10a0d
authored
8 years ago
by
koen
Browse files
Options
Downloads
Patches
Plain Diff
brainfart fixed concerning method calls
parent
7d56db6e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Settings.hs
+1
-1
1 addition, 1 deletion
Settings.hs
WLP.hs
+5
-5
5 additions, 5 deletions
WLP.hs
with
6 additions
and
6 deletions
Settings.hs
+
1
−
1
View file @
18f10a0d
module
Settings
where
testFile
,
postCond
::
String
testFile
=
"
debug
"
testFile
=
"
2d-arrays1
"
postCond
=
"(true)"
nrOfUnroll
::
Int
...
...
This diff is collapsed.
Click to expand it.
WLP.hs
+
5
−
5
View file @
18f10a0d
...
...
@@ -162,12 +162,12 @@ wlpExpAlgebra = (fLit, fClassLit, fThis, fThisClass, fInstanceCreation, fQualIns
fArrayCreateInit
t
dim
init
inh
=
(
ArrayCreateInit
t
dim
init
,
acc
inh
)
fFieldAccess
fieldAccess
inh
=
(
ExpName
(
foldFieldAccess
inh
fieldAccess
),
(
acc
inh
))
fMethodInv
invocation
inh
=
case
invocation
of
MethodCall
(
Name
[
Ident
"*assume"
])
[
e
]
->
(
false
,
(
if
e
==
false
then
const
true
else
imp
e
))
_
->
if
getCallCount
(
calls
inh
)
(
invocationToId
invocation
)
>=
nrOfUnroll
then
(
false
,
const
true
)
else
let
varId
=
getReturnVar
invocation
MethodCall
(
Name
[
Ident
"*assume"
])
[
e
]
->
(
false
,
(
if
e
==
false
then
const
true
else
imp
e
))
-- *assume is the regular assume function
_
->
if
getCallCount
(
calls
inh
)
(
invocationToId
invocation
)
>=
nrOfUnroll
-- Check the recursion depth
then
(
undefined
,
const
true
)
-- Recursion limit reached: we just assume the post codition will hold
else
let
varId
=
getReturnVar
invocation
callWlp
=
wlp'
(
inh
{
acc
=
id
,
calls
=
incrCallCount
(
calls
inh
)
(
invocationToId
invocation
),
ret
=
Just
varId
,
object
=
getObject
inh
invocation
})
(
inlineMethod
inh
invocation
)
in
(
callWlp
(
ExpName
(
Name
[
varId
])
)
,
(
callWlp
.
acc
inh
))
in
(
ExpName
(
Name
[
varId
]),
(
callWlp
.
acc
inh
))
fArrayAccess
(
ArrayIndex
a
i
)
inh
=
(
arrayAccess
a
i
,
snd
((
foldExp
wlpExpAlgebra
a
)
inh
{
acc
=
id
})
.
arrayAccessWlp
a
i
inh
)
fExpName
name
inh
=
(
ExpName
name
,
(
acc
inh
))
...
...
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