Skip to content
Snippets Groups Projects
Commit 9ada4398 authored by Philippe Suter's avatar Philippe Suter
Browse files

stub for set constraints

parent ec8e9bec
No related branches found
No related tags found
No related merge requests found
......@@ -5,12 +5,13 @@ class FunCheckProject(info: ProjectInfo) extends DefaultProject(info) with FileT
override def dependencyPath = "lib"
override def shouldCheckOutputDirectories = false
lazy val purescala = project(".", "PureScala Definitions", new PureScalaProject(_))
lazy val plugin = project(".", "FunCheck Plugin", new PluginProject(_), purescala)
lazy val multisets = project(".", "Multiset Solver", new MultisetsProject(_), plugin, purescala)
lazy val orderedsets = project(".", "Ordered Sets Solver", new OrderedSetsProject(_), plugin, purescala)
lazy val purescala = project(".", "PureScala Definitions", new PureScalaProject(_))
lazy val plugin = project(".", "FunCheck Plugin", new PluginProject(_), purescala)
lazy val multisets = project(".", "Multiset Solver", new MultisetsProject(_), plugin, purescala)
lazy val orderedsets = project(".", "Ordered Sets Solver", new OrderedSetsProject(_), plugin, purescala)
lazy val setconstraints = project(".", "Type inference with set constraints", new SetConstraintsProject(_), plugin, purescala)
lazy val extensionJars : List[Path] = multisets.jarPath :: orderedsets.jarPath :: Nil
lazy val extensionJars : List[Path] = multisets.jarPath :: orderedsets.jarPath :: setconstraints.jarPath :: Nil
val scriptPath: Path = "." / "scalac-funcheck"
......@@ -89,4 +90,9 @@ class FunCheckProject(info: ProjectInfo) extends DefaultProject(info) with FileT
override def mainScalaSourcePath = "src" / "orderedsets"
override def unmanagedClasspath = super.unmanagedClasspath +++ purescala.jarPath
}
class SetConstraintsProject(info: ProjectInfo) extends PersonalizedProject(info) {
override def outputPath = "bin" / "setconstraints"
override def mainScalaSourcePath = "src" / "setconstraints"
override def unmanagedClasspath = super.unmanagedClasspath +++ purescala.jarPath
}
}
......@@ -17,7 +17,7 @@ class FunCheckPlugin(val global: Global) extends Plugin {
override val optionsHelp: Option[String] = Some(
" -P:funcheck:uniqid When pretty-printing funcheck trees, show identifiers IDs" + "\n" +
" -P:funcheck:with-code Allows the compiler to keep running after the static analysis" + "\n" +
" -P:funcheck:extensions=ex1,... Specifies a list of qualified class names of extensions to be loaded"
" -P:funcheck:extensions=ex1:... Specifies a list of qualified class names of extensions to be loaded"
)
/** Processes the command-line options. */
......
......@@ -17,14 +17,14 @@ object Extensions {
abstract class Analyser(reporter: Reporter) extends Extension(reporter) {
// Does whatever the analysis should. Uses the reporter to
// signal results and/or errors.
def analyze(program: Program) : Unit
def analyse(program: Program) : Unit
}
// the following is for dynamically loading extensions
type AnyClass = Class[_]
def loadAll(reporter: Reporter) : Seq[Extension] = {
val allNames = Settings.extensionNames.split(':')
val allNames: Seq[String] = Settings.extensionNames.split(':').map(_.trim).filter(!_.isEmpty)
if(!allNames.isEmpty) {
val classLoader = Extensions.getClass.getClassLoader
......
package setconstraints
import purescala.Extensions._
import purescala.Definitions._
import purescala.Trees._
import purescala.Reporter
class Main(reporter: Reporter) extends Analyser(reporter) {
val description: String = "Analyser for advanced type inference based on set constraints"
def analyse(program: Program) : Unit = {
reporter.info("Nothing to do in this analysis.")
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment