From 42c314f5c07804008a89fb9ed922fa31179f4841 Mon Sep 17 00:00:00 2001 From: Philippe Suter <philippe.suter@gmail.com> Date: Tue, 11 Dec 2012 15:12:27 +0100 Subject: [PATCH] Introducing : LeonComponent --- src/main/scala/leon/LeonComponent.scala | 11 +++++++++++ src/main/scala/leon/synthesis/SynthesisPhase.scala | 2 +- src/main/scala/leon/verification/AnalysisPhase.scala | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 src/main/scala/leon/LeonComponent.scala diff --git a/src/main/scala/leon/LeonComponent.scala b/src/main/scala/leon/LeonComponent.scala new file mode 100644 index 000000000..95f947b94 --- /dev/null +++ b/src/main/scala/leon/LeonComponent.scala @@ -0,0 +1,11 @@ +package leon + +/** A common trait for everything that is important enough to be named, + * and that processes command line options. And important category are + * `LeonPhase`s. */ +trait LeonComponent { + val name : String + val description : String + + val definedOptions : Set[LeonOptionDef] = Set() +} diff --git a/src/main/scala/leon/synthesis/SynthesisPhase.scala b/src/main/scala/leon/synthesis/SynthesisPhase.scala index c9c7b25eb..466abaf1d 100644 --- a/src/main/scala/leon/synthesis/SynthesisPhase.scala +++ b/src/main/scala/leon/synthesis/SynthesisPhase.scala @@ -13,7 +13,7 @@ object SynthesisPhase extends LeonPhase[Program, Program] { val name = "Synthesis" val description = "Synthesis" - override def definedOptions = Set( + override val definedOptions : Set[LeonOptionDef] = Set( LeonFlagOptionDef( "inplace", "--inplace", "Debug level"), LeonFlagOptionDef( "parallel", "--parallel", "Parallel synthesis search"), LeonFlagOptionDef( "derivtrees", "--derivtrees", "Generate derivation trees"), diff --git a/src/main/scala/leon/verification/AnalysisPhase.scala b/src/main/scala/leon/verification/AnalysisPhase.scala index ce3dc0198..e8bb9791c 100644 --- a/src/main/scala/leon/verification/AnalysisPhase.scala +++ b/src/main/scala/leon/verification/AnalysisPhase.scala @@ -16,7 +16,7 @@ object AnalysisPhase extends LeonPhase[Program,VerificationReport] { val name = "Analysis" val description = "Leon Verification" - override def definedOptions = Set( + override val definedOptions : Set[LeonOptionDef] = Set( LeonValueOptionDef("functions", "--functions=f1:f2", "Limit verification to f1,f2,...") ) -- GitLab