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
46aae11d
Commit
46aae11d
authored
14 years ago
by
Philippe Suter
Browse files
Options
Downloads
Patches
Plain Diff
minor
parent
b5e7a59f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/funcheck/Utils.scala
+12
-0
12 additions, 0 deletions
src/funcheck/Utils.scala
src/purescala/PartialEvaluator.scala
+20
-0
20 additions, 0 deletions
src/purescala/PartialEvaluator.scala
testcases/Viktor.scala
+11
-0
11 additions, 0 deletions
testcases/Viktor.scala
with
43 additions
and
0 deletions
src/funcheck/Utils.scala
0 → 100644
+
12
−
0
View file @
46aae11d
package
funcheck
object
Utils
{
sealed
class
IsValid
(
val
property
:
Boolean
)
{
def
holds
:
Boolean
=
{
assert
(
property
)
property
}
}
implicit
def
any2IsValid
(
x
:
Boolean
)
:
IsValid
=
new
IsValid
(
x
)
}
This diff is collapsed.
Click to expand it.
src/purescala/PartialEvaluator.scala
0 → 100644
+
20
−
0
View file @
46aae11d
package
purescala
import
Common._
import
Definitions._
import
Trees._
import
TypeTrees._
class
PartialEvaluator
(
val
program
:
Program
)
{
val
reporter
=
Settings
.
reporter
// Simplifies by partially evaluating.
// Of course, I still have to decide what 'simplified' means.
def
apply
(
expression
:
Expr
)
:
Expr
=
{
def
rec
(
expr
:
Expr
,
letMap
:
Map
[
Identifier
,
Expr
])
:
Expr
=
{
expr
}
rec
(
expression
,
Map
.
empty
)
}
}
This diff is collapsed.
Click to expand it.
testcases/Viktor.scala
0 → 100644
+
11
−
0
View file @
46aae11d
import
funcheck.Utils._
object
Viktor
{
def
transitive
(
x
:
Boolean
,
y
:
Boolean
,
z
:
Boolean
)
:
Boolean
=
{
!(
x
==
y
&&
y
==
z
)
||
x
==
z
}
holds
def
doesNotHold1
(
x
:
Int
,
y
:
Int
)
:
Boolean
=
{
x
+
2
>
y
*
2
}
holds
}
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