Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify using Dafny as a library #2084

Closed
mschlaipfer opened this issue May 2, 2022 · 2 comments · Fixed by #2363
Closed

Simplify using Dafny as a library #2084

mschlaipfer opened this issue May 2, 2022 · 2 comments · Fixed by #2363
Assignees
Labels
kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny priority: now Will work on this now

Comments

@mschlaipfer
Copy link
Member

Currently, to use Dafny as a software library, one needs to use DafnyPipeline.csproj and then replicate most of the code in https://github.com/dafny-lang/dafny/blob/master/Source/DafnyDriver/DafnyDriver.cs in order verify a program.

Dafny's CLI project, DafnyDriver.csproj is not published as a library (i.e., <OutoutType>Library</OutputType>). Furthermore, only the Main methods in DafnyDriver.cs are exposed with public, so one would need to pass an arguments string if it were available as a library in its current state.

@fabiomadge fabiomadge added the kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny label May 2, 2022
@keyboardDrummer
Copy link
Member

keyboardDrummer commented May 3, 2022

I think we will publish DafnyDriver.csproj as a .NET tool at some point, which means we can't also publish it as a library.

I suggest we publish DafnyPipeline.csproj as a NuGet library. Code that is in https://github.com/dafny-lang/dafny/blob/master/Source/DafnyDriver/DafnyDriver.cs and should be available to library consumers should be moved to DafnyPipeline.csproj.

@cpitclaudel
Copy link
Member

I suggest we publish DafnyPipeline.csproj as a NuGet library.

👍. Also, we should refactor DafnyDriver, DafnyServer, and DafnyLanguageServer so that they all use a shared interface from DafnyPipeline.

@cpitclaudel cpitclaudel added the priority: next Will consider working on this after in progress work is done label Jun 7, 2022
@cpitclaudel cpitclaudel added priority: now Will work on this now and removed priority: next Will consider working on this after in progress work is done labels Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny priority: now Will work on this now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants