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
629343e2
Commit
629343e2
authored
15 years ago
by
Philippe Suter
Browse files
Options
Downloads
Patches
Plain Diff
migrated the plugin to Scala 2.8...
parent
eed35d3a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
build.xml
+80
-71
80 additions, 71 deletions
build.xml
src/funcheck/AnalysisComponent.scala
+3
-3
3 additions, 3 deletions
src/funcheck/AnalysisComponent.scala
src/funcheck/purescala/Trees.scala
+1
-1
1 addition, 1 deletion
src/funcheck/purescala/Trees.scala
with
84 additions
and
75 deletions
build.xml
+
80
−
71
View file @
629343e2
...
@@ -15,16 +15,16 @@
...
@@ -15,16 +15,16 @@
<property
name=
"base.dir"
value=
"${basedir}"
/>
<property
name=
"base.dir"
value=
"${basedir}"
/>
<property
name=
"sources.dir"
value=
"${base.dir}/src"
/>
<property
name=
"sources.dir"
value=
"${base.dir}/src"
/>
<property
name=
"examples.dir"
value=
"${base.dir}/examples"
/>
<property
name=
"examples.dir"
value=
"${base.dir}/examples"
/>
<property
name=
"tests.dir"
value=
"${base.dir}/tests"
/>
<!--
<property name="tests.dir" value="${base.dir}/tests" />
-->
<property
name=
"dist.dir"
value=
"${base.dir}/dist"
/>
<property
name=
"dist.dir"
value=
"${base.dir}/dist"
/>
<property
name=
"lib.dir"
value=
"${basedir}/lib"
/>
<property
name=
"lib.dir"
value=
"${basedir}/lib"
/>
<property
name=
"build.dir"
value=
"${base.dir}/bin"
/>
<property
name=
"build.dir"
value=
"${base.dir}/bin"
/>
<property
name=
"build.plugin.funcheck.dir"
value=
"${build.dir}/plugin"
/>
<property
name=
"build.plugin.funcheck.dir"
value=
"${build.dir}/plugin"
/>
<property
name=
"build.funcheck.lib.dir"
value=
"${build.dir}/lib"
/>
<property
name=
"build.funcheck.lib.dir"
value=
"${build.dir}/lib"
/>
<property
name=
"build.scala.lib.extension.dir"
value=
"${build.dir}/scala"
/>
<!--
<property name="build.scala.lib.extension.dir" value="${build.dir}/scala" />
-->
<property
name=
"build.examples.dir"
value=
"${build.dir}/examples"
/>
<!--
<property name="build.examples.dir" value="${build.dir}/examples" />
-->
<property
name=
"build.tests.dir"
value=
"${build.dir}/tests"
/>
<!--
<property name="build.tests.dir" value="${build.dir}/tests" />
-->
<!-- other properties -->
<!-- other properties -->
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<property
name=
"script.file"
value=
"${base.dir}/scalac-funcheck"
/>
<property
name=
"script.file"
value=
"${base.dir}/scalac-funcheck"
/>
<property
name=
"scalac.default.params"
value=
"-deprecation -unchecked"
/>
<property
name=
"scalac.default.params"
value=
"-deprecation -unchecked"
/>
<property
name=
"scalac.funcheck.plugin"
value=
"-Xplugin:${dist.jar} ${scalac.default.params}"
/>
<property
name=
"scalac.funcheck.plugin"
value=
"-Xplugin:${dist.jar} ${scalac.default.params}"
/>
<!-- required to use the tasks scalac, fsc and scaladoc -->
<!-- required to use the tasks scalac, fsc and scaladoc -->
<taskdef
resource=
"scala/tools/ant/antlib.xml"
>
<taskdef
resource=
"scala/tools/ant/antlib.xml"
>
<classpath>
<classpath>
...
@@ -48,43 +48,48 @@
...
@@ -48,43 +48,48 @@
<pathelement
location=
"${scala-compiler.jar}"
/>
<pathelement
location=
"${scala-compiler.jar}"
/>
</path>
</path>
<path
id=
"funcheck.lib.path"
>
<path
id=
"funcheck.lib.path"
>
<pathelement
location=
"${build.funcheck.lib.dir}"
/>
<pathelement
location=
"${build.funcheck.lib.dir}"
/>
</path>
</path>
<path
id=
"scala.lib.extension.path"
>
<!--
<pathelement
location=
"${build.scala.lib.extension.dir}"
/>
<path id="scala.lib.extension.path">
</path>
<pathelement location="${build.scala.lib.extension.dir}"/>
</path>
-->
<path
id=
"build.path"
>
<path
id=
"build.path"
>
<path
refid=
"scalac.class.path"
/>
<path
refid=
"scalac.class.path"
/>
<path
refid=
"funcheck.lib.path"
/>
<path
refid=
"funcheck.lib.path"
/>
<pathelement
location=
"${build.plugin.funcheck.dir}"
/>
<pathelement
location=
"${build.plugin.funcheck.dir}"
/>
</path>
</path>
<path
id=
"scalacheck.lib.path"
>
<!--
<pathelement
location=
"${lib.dir}/ScalaCheck-1.5.jar"
/>
<path id="scalacheck.lib.path">
</path>
<pathelement location="${lib.dir}/ScalaCheck-1.5.jar"/>
</path>
<path
id=
"test.lib.path"
>
-->
<path
refid=
"scalacheck.lib.path"
/>
<!--
<path id="test.lib.path">
<path refid="scalacheck.lib.path"/>
<pathelement location="${lib.dir}/scalatest-0.9.5.jar" />
<pathelement location="${lib.dir}/scalatest-0.9.5.jar" />
<pathelement location="${lib.dir}/specs-1.5.0.jar" />
<pathelement location="${lib.dir}/specs-1.5.0.jar" />
</path>
</path>
-->
<!-- phases definitions -->
<!-- phases definitions -->
<target
name=
"compile-funcheck-lib"
description=
"compile the FunCheck library (used for specification)"
>
<target
name=
"compile-funcheck-lib"
description=
"compile the FunCheck library (used for specification)"
>
<mkdir
dir=
"${build.funcheck.lib.dir}"
/>
<mkdir
dir=
"${build.funcheck.lib.dir}"
/>
<scalac
srcdir=
"${sources.dir}"
destdir=
"${build.funcheck.lib.dir}"
force=
"changed"
addparams=
"${scalac.default.params}"
>
<scalac
srcdir=
"${sources.dir}"
destdir=
"${build.funcheck.lib.dir}"
force=
"changed"
addparams=
"${scalac.default.params}"
>
<classpath>
<classpath>
<path
refid=
"scalac.class.path"
/>
<path
refid=
"scalac.class.path"
/>
</classpath>
</classpath>
<include
name=
"funcheck/lib/**/*.scala"
/>
<include
name=
"funcheck/lib/**/*.scala"
/>
</scalac>
</scalac>
</target>
</target>
<!--
<target name="compile-scalac-lib-extension" description="compile Scala library extension for immutable Multiset">
<target name="compile-scalac-lib-extension" description="compile Scala library extension for immutable Multiset">
<mkdir dir="${build.scala.lib.extension.dir}" />
<mkdir dir="${build.scala.lib.extension.dir}" />
<scalac srcdir="${sources.dir}" destdir="${build.scala.lib.extension.dir}" force="changed" addparams="${scalac.default.params}">
<scalac srcdir="${sources.dir}" destdir="${build.scala.lib.extension.dir}" force="changed" addparams="${scalac.default.params}">
...
@@ -92,16 +97,17 @@
...
@@ -92,16 +97,17 @@
<include name="scala/collection/**/*.scala" />
<include name="scala/collection/**/*.scala" />
</scalac>
</scalac>
</target>
</target>
-->
<target
name=
"compile"
depends=
"compile-funcheck-lib
, compile-scalac-lib-extension
"
description=
"compile the FunCheck plugin"
>
<target
name=
"compile"
depends=
"compile-funcheck-lib"
description=
"compile the FunCheck plugin"
>
<mkdir
dir=
"${build.plugin.funcheck.dir}"
/>
<mkdir
dir=
"${build.plugin.funcheck.dir}"
/>
<scalac
srcdir=
"${sources.dir}"
destdir=
"${build.plugin.funcheck.dir}"
force=
"changed"
addparams=
"${scalac.default.params}"
>
<scalac
srcdir=
"${sources.dir}"
destdir=
"${build.plugin.funcheck.dir}"
force=
"changed"
addparams=
"${scalac.default.params}"
>
<classpath>
<classpath>
<path
refid=
"scalac.class.path"
/>
<path
refid=
"scalac.class.path"
/>
</classpath>
</classpath>
<exclude
name=
"scala/collection/**/*.scala"
/>
<exclude
name=
"scala/collection/**/*"
/>
<exclude
name=
"funcheck/lib/**/*.scala"
/>
<exclude
name=
"funcheck/lib/**/*"
/>
<exclude
name=
"funcheck/scalacheck/**/*"
/>
</scalac>
</scalac>
</target>
</target>
...
@@ -123,16 +129,17 @@
...
@@ -123,16 +129,17 @@
<chmod
file=
"${script.file}"
perm=
"u+x"
/>
<chmod
file=
"${script.file}"
perm=
"u+x"
/>
</target>
</target>
<!--
<target name="compile-examples" depends="dist" description="compile the examples">
<target name="compile-examples" depends="dist" description="compile the examples">
<mkdir dir="${build.examples.dir}" />
<mkdir dir="${build.examples.dir}" />
<scalac srcdir="${examples.dir}" destdir="${build.examples.dir}" force="changed"
<scalac srcdir="${examples.dir}" destdir="${build.examples.dir}" force="changed"
addparams=
"${scalac.default.params}"
>
addparams="${scalac.default.params}">
<!-
- addparams="${scalac.funcheck.plugin}" crashes for some unknown reason -
-
>
< ! -
- addparams="${scalac.funcheck.plugin}" crashes for some unknown reason -
-
>
<classpath>
<classpath>
<path
refid=
"scalac.class.path"
/>
<path refid="scalac.class.path" />
<path
refid=
"scala.lib.extension.path"
/>
<path refid="scala.lib.extension.path" />
<path
refid=
"funcheck.lib.path"
/>
<path refid="funcheck.lib.path" />
<path
refid=
"scalacheck.lib.path"
/>
<path refid="scalacheck.lib.path" />
</classpath>
</classpath>
</scalac>
</scalac>
</target>
</target>
...
@@ -143,41 +150,43 @@
...
@@ -143,41 +150,43 @@
<mkdir dir="${build.tests.dir}" />
<mkdir dir="${build.tests.dir}" />
<scalac srcdir="${tests.dir}" destdir="${build.tests.dir}" force="changed" addparams="${scalac.default.params}">
<scalac srcdir="${tests.dir}" destdir="${build.tests.dir}" force="changed" addparams="${scalac.default.params}">
<classpath>
<classpath>
<path
refid=
"scala.lib.extension.path"
/>
<path refid="scala.lib.extension.path" />
<path
refid=
"test.lib.path"
/>
<path refid="test.lib.path" />
<path refid="build.path" />
<path refid="build.path" />
<pathelement location="${build.examples.dir}"/>
<pathelement location="${build.examples.dir}"/>
</classpath>
</classpath>
</scalac>
</scalac>
</target>
</target>
<target name="run-test" depends="compile-tests"
<target name="run-test" depends="compile-tests"
description=
"run a test (test name is provided by the user)"
>
description="run a test (test name is provided by the user)">
<input
message=
"Please enter the name of the test you want to run
<input message="Please enter the name of the test you want to run
(e.g., package_name.ClassName)"
(e.g., package_name.ClassName)"
addproperty=
"test.name"
addproperty="test.name"
/>
/>
<echo
message=
"-
-
- running test ${test.name}."
/>
<echo message="-
- running test ${test.name}."/>
<java
classname=
"scala.tools.nsc.MainGenericRunner"
fork=
"true"
>
<java classname="scala.tools.nsc.MainGenericRunner" fork="true">
<classpath>
<classpath>
<path
refid=
"scala.lib.extension.path"
/>
<path refid="scala.lib.extension.path" />
<path
refid=
"test.lib.path"
/>
<path refid="test.lib.path" />
<path refid="build.path" />
<path refid="build.path" />
<pathelement location="${build.examples.dir}"/>
<pathelement location="${build.examples.dir}"/>
<pathelement location="${build.tests.dir}"/>
<pathelement location="${build.tests.dir}"/>
</classpath>
</classpath>
<arg
line=
"${test.name}"
/>
<arg line="${test.name}" />
</java>
</java>
</target>
-->
<target
name=
"clean"
description=
"clean the project space"
>
<delete
file=
"${script.file}"
quiet=
"yes"
failonerror=
"no"
/>
<delete
dir=
"${build.dir}"
includeemptydirs=
"yes"
quiet=
"yes"
failonerror=
"no"
/>
<delete
dir=
"${dist.dir}"
includeemptydirs=
"yes"
quiet=
"yes"
failonerror=
"no"
/>
<delete>
<fileset
dir=
"${basedir}"
includes=
"**/*.class"
/>
</delete>
</target>
</target>
<target
name=
"clean"
description=
"clean the project space"
>
<delete
file=
"${script.file}"
quiet=
"yes"
failonerror=
"no"
/>
<delete
dir=
"${build.dir}"
includeemptydirs=
"yes"
quiet=
"yes"
failonerror=
"no"
/>
<delete
dir=
"${dist.dir}"
includeemptydirs=
"yes"
quiet=
"yes"
failonerror=
"no"
/>
<delete>
<fileset
dir=
"${basedir}"
includes=
"**/*.class"
/>
</delete>
</target>
<target
name=
"new"
description=
"clean and rebuilds"
depends=
"clean, dist"
/>
<target
name=
"new"
description=
"clean and rebuilds"
depends=
"clean, dist"
/>
</project>
</project>
This diff is collapsed.
Click to expand it.
src/funcheck/AnalysisComponent.scala
+
3
−
3
View file @
629343e2
...
@@ -12,9 +12,9 @@ class AnalysisComponent(val global: Global, val pluginInstance: FunCheckPlugin)
...
@@ -12,9 +12,9 @@ class AnalysisComponent(val global: Global, val pluginInstance: FunCheckPlugin)
{
{
import
global._
import
global._
//
when we use 2.8.x, swap the following two lines
//
This is how it works from 2.8 on..
val
runsAfter
=
"refchecks"
override
val
runsRightAfter
:
Option
[
String
]
=
None
//
override val runs
RightAfter =
"refchecks"
override
val
runs
After
:
List
[
String
]
=
List
(
"refchecks"
)
val
phaseName
=
pluginInstance
.
name
val
phaseName
=
pluginInstance
.
name
...
...
This diff is collapsed.
Click to expand it.
src/funcheck/purescala/Trees.scala
+
1
−
1
View file @
629343e2
...
@@ -48,7 +48,7 @@ see examples in:
...
@@ -48,7 +48,7 @@ see examples in:
/* Control flow */
/* Control flow */
case
class
FunctionInvocation
(
funDef
:
FunDef
,
args
:
Seq
[
Expr
])
extends
Expr
{
case
class
FunctionInvocation
(
funDef
:
FunDef
,
args
:
Seq
[
Expr
])
extends
Expr
{
assert
(
args
.
map
(
_
.
getType
).
equalsWith
(
funDef
.
argTypes
)(
_
==
_
))
assert
(
args
.
map
(
_
.
getType
).
corresponds
(
funDef
.
argTypes
)(
_
==
_
))
lazy
val
getType
=
funDef
.
returnType
lazy
val
getType
=
funDef
.
returnType
}
}
...
...
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