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
876217e4
Commit
876217e4
authored
14 years ago
by
Giuliano Losa
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
639e8fe2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vmcai2011-testcases/Giuliano.scala
+19
-3
19 additions, 3 deletions
vmcai2011-testcases/Giuliano.scala
with
19 additions
and
3 deletions
vmcai2011-testcases/Giuliano.scala
+
19
−
3
View file @
876217e4
...
...
@@ -5,10 +5,26 @@ object Giuliano {
case
class
Cons
(
head
:
Int
,
tail
:
List
)
extends
List
case
class
Nil
()
extends
List
def
form1
(
x
:
Cons
,
y
:
Set
[
Int
])
:
Boolean
=
{
y
.
contains
(
x
.
head
)
&&
y
.
size
==
x
.
head
}
ensuring
(
_
==
true
)
def
f
(
x
:
Int
)
:
Int
=
{
throw
new
Exception
(
"..."
)
}
def
form1
(
x
:
Int
,
y
:
Set
[
Int
])
:
Boolean
=
{
// y.contains(x.head) && y.size == x.head
x
!=
f
(
x
)
||
f
(
x
)
==
f
(
f
(
x
))
}
// ensuring(_ == true)
def
form2
(
f
:
Int
,
n
:
Int
,
servers
:
Set
[
Int
],
bizServers
:
Set
[
Int
],
corrServers
:
Set
[
Int
],
s
:
Set
[
Int
])
:
Boolean
=
{
require
(
s
.
subsetOf
(
servers
)
&&
s
.
size
>
f
&&
servers
==
corrServers
++
bizServers
&&
bizServers
.
size
==
f
&&
servers
.
size
==
n
&&
n
>
3
&&
f
>
0
&&
3
*
f
<
n
)
(
corrServers
**
s
).
size
>=
1
}
ensuring
(
_
==
true
)
}
// vim: set ts=4 sw=4 et:
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