Comments (1)
I see that there's a bit of a problem w.r.t. publishing the leon library.
First, the build.sbt defines a source code generator for a leon/Build.scala
file that has the absolute path of the leon project directory (leon.Build.baseDirectory
) and the list of the absolute path for each source file in the leon library (leon.Build.libFiles
).
Second, according to the latest commit, 57fc12d, there are 5 different places where the organization of the leon.Build
generated source is used:
- In leon.Main, there is a watcher for continuously monitoring changes in the leon library in addition to the source files specified on the command line.
- In leon.frontends.scalac.ClassgenPhase, all the leon library sources files are added to all the source files specified on the command line as compiler options.
- In leon.frontends.scalac.CodeExtraction, there is a predicate, isLIbrary to check whether a particular source file belongs to the leon library.
- In leon.frontends.scalac.ExtractionPhase, all the leon library sources files are added to all the source files specified on the command line as compiler options
- In leon.test.LeonRegressionSuite, the helper function filesInResourceDir uses the
Build.baseDirectory
as the starting point for searching for regression test resource files.
I propose to refactor leon
to do away with hardcoded locations in leon.Build
. Without this, publishing a leon.jar
artifact looses a lot of utility because because a user who doesn't have the leon
project cloned in the same location as leon.Build.baseDirectory
would have to clone leon
anyway and include on the command line all of the leon
library source files.
There is a simple solution to this:
-
Include the
leon
library as resourcescopy
leon/library/leon/*
toleon/src/main/resources/leon/
-
For the first 4 usages of
leon.Build
above, add a new command-line option to specify where to get theleon
library:-
Specify a path to a
leon
library base directory. This is effectively equivalent to${leon.Build.baseDirectory}/library/**/*.scala
currently without this base directory being hardcoded. -
Extract the
leon
library from theleon.jar
resource to a temporary directory and use that as the path the theleon
library base directory per the above. This case could be the default behavior, which would be effectively equivalent to the current behavior except that a user wouldn't have to cloneleon
& publish it locally.
-
-
For the 5th usage, it is sufficient to resolve the regressionTestDirectory from the
LeonRegressionSuite
's class loader.
from leon.
Related Issues (20)
- Compilation issue HOT 2
- Termination checker unable to prove termination of mutually recursive functions HOT 1
- TODO exception with Map's and class Invariants
- leon with isabelle, undefined session, documentation HOT 4
- Prover error in operation functions: ERROR "Type unification failed: Clash of types \"<markup>\" and \"<markup>\"\n\nType error in application: incompatible operand type\n\n<markup>\n<markup>\n\n<markup>" HOT 4
- Adding ensuring(rec < ...) in a function prevents other functions from being verified
- Termination checker is unsound in handling streams
- Add doc for @traceInduct
- Problem with preprocessing? HOT 3
- Bug in proofs HOT 10
- Moving to GPL from BSD HOT 2
- Bug in program evaluation/verification
- Bug in ImperativeCodeElimination
- Bug in RecursionCountInstrumenter(?)
- Z3 exception HOT 3
- Support for generic copy() method
- Organization of the leon library
- Web interface appears to be failing HOT 3
- Invalid methods actually compiles
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leon.