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

Learn and contribute back to Boogie by setting up CI for Windows #101

Closed
hc825b opened this issue Sep 3, 2018 · 24 comments
Closed

Learn and contribute back to Boogie by setting up CI for Windows #101

hc825b opened this issue Sep 3, 2018 · 24 comments

Comments

@hc825b
Copy link

hc825b commented Sep 3, 2018

Hi Boogie team,

I'm a PhD student in CS UIUC, and I'm self-learning and using Dafny and Boogie for my research now. I noticed that the CI for Windows is missing, so I am thinking to set up Microsoft VSTS CI as I have some experience with VSTS.

I've set up a showcase using my own fork at https://github.com/hc825b/boogie
You can check the build logs publicly available on https://boogie-org.visualstudio.com/boogie/_build?definitionId=1
Right now it only compiles Source/Boogie.sln and run unit tests with VS2017. I'll continue on driver tests.

I'd like some opinions from you guys to see if this is something helpful, and also discuss how I can make a "pull request" since how I configured VSTS is not reflected on the code I added.

Thanks!

Chiao Hsieh

@zvonimir
Copy link
Contributor

Hi there,
Thanks for helping out with this, I just noticed this issue.
One thing that I would like to add is that Travis CI recently added support for Windows:
https://blog.travis-ci.com/2018-10-11-windows-early-release
Given that we are already running Travis for our Linux build, my question is whether that would maybe be the way to go for Windows as well, instead of adding Microsoft VSTS CI into the mix. What are your thoughts on that? If you could look into setting up Travis CI for Windows that would be awesome!

@bkragl
Copy link
Member

bkragl commented Oct 22, 2018

Having a Windows build in Travis CI would be good, I guess. However, I want to note that the Linux build is not running anymore for quite some time now. When I go to https://travis-ci.org/boogie-org/boogie, I get:

This is not an active repository
You don't have sufficient rights to enable this repo on Travis.
Please contact the admin to enable it or to receive admin rights yourself.

@hc825b
Copy link
Author

hc825b commented Oct 22, 2018

I was not aware of the newly added Windows support on Travis CI. If possible, I also prefer TravisCI to VSTS as the workflow to make a pull request is much clearer. I can definitely look into that.

To enable Linux build on Travis-CI again requires ownership of this repository or administrator permission in the organization AFAIK, so I might not be able to help.

@hc825b hc825b changed the title Learn and contribute back to Boogie by setting up CI on VSTS Learn and contribute back to Boogie by setting up CI for Windows Nov 18, 2018
@alexanderjsummers
Copy link

Hi Chiao Hsieh,

I'd be curious to know how you got on with this. Incidentally, we have a Windows build of Boogie running on a different CI platform (Jenkins). Until recently, this has worked quite well, but the current test results from Boogie are inconsistent between our build and the Travis Linux one. Debugging them is also hard because compilation on Windows and testing are both somewhat difficult to get working on a given machine. It would be great to find a more-cross-platform-friendly solution, IMO; I wonder if you ran into similar issues?

Cheers, Alex

@zvonimir
Copy link
Contributor

FYI, I think it would be worthwhile to take a look into the recently released GitHub Actions functionality. It seems that it supports CI for Linux, Windows, and MacOS. I still haven't tried it, but my students did set it up for some of our other projects (Linux builds only) and it was pretty straightforward.

@hc825b
Copy link
Author

hc825b commented Dec 17, 2019

Hi Alex (@alexanderjsummers),

Sorry for the very late response!

I've tried using the Windows support in Travis CI as suggested by others. IMHO, Windows support in Travis CI is still not mature enough as of now, and my result is not quite desirable. The Windows support in Travis CI is based on Chocolatey package management system to install required dependencies, and I stumbled on problems to find the path to tools installed by Chocolatey such as MS Build and Python 3 and to config the environment variable correctly. My last attempt about three months ago seems to compile Boogie successfully according to the log on Travis CI, but I could not run the unit tests or lit tests for unknown reasons.

If interested in more details, you can found latest commits in travis-ci-windows branch in my fork,
e.g., hc825b/boogie@bdcd286.
Travis YAML file:
https://github.com/hc825b/boogie/blob/travis-ci-windows/.travis.yml
Travis CI Builds:
https://travis-ci.org/hc825b/boogie
Hope these information help!

Chiao

@zvonimir
Copy link
Contributor

@hc825b This is a great effort. Are you interested in trying to wrap this up?
If so, then I could probably try to provide support this week.

I looked at your Travis log. It seems that it cannot find lit, which is an LLVM utility: https://llvm.org/docs/CommandGuide/lit.html

I would guess you next step should be to try to figure out how to install lit on Windows.

@zvonimir
Copy link
Contributor

Actually, lit is a Python tool, and hence it should be super easy to install it on Windows as well using pip install: https://pypi.org/project/lit/

@hc825b
Copy link
Author

hc825b commented May 24, 2020

@zvonimir That is precisely where I stumbled and decided to stop working on it.

If you take a closer look at line 27 in my .travis.yml, I did use pip to install lit, but there are errors as you can see in the log.
https://github.com/hc825b/boogie/blob/travis-ci-windows/.travis.yml#L27

Another possible root cause is that Z3 is not properly installed.

@zvonimir
Copy link
Contributor

I see. Try to print some additional info to aid with debugging. For example, maybe lit is not in path.
Maybe add:

echo %PATH%

Also:

which lit

On my machine this folder has to be in the path variable for lit to work: C:\Users\zraka\AppData\Local\Programs\Python\Python37\Scripts\

@hc825b
Copy link
Author

hc825b commented May 24, 2020

I am able to run lit now. It is indeed related to path variables and where pip install packages for system and a particular user. I also fixed creating the symbolic link to z3.exe for Windows.
It seems there are a lot of unexpected test results, and it will take quite some time to go through them.

@zvonimir: To answer your question on wrapping this up, I'd say I couldn't/shouldn't spend more time on this. Although I'd really like to see this finished and integrated, it is simply that my work is no longer related to Boogie. If your students can take over, I'll be happy to answer their questions or provide some little help.

@alexanderjsummers
Copy link

Hi Chiao and Zvonimir,

Thanks for the updates and interesting discussion! We also observe many inconsistent test outputs on our Jenkins server (we are at least running the tests the right way these days, but still haven't seen the expected outputs for all tests). I spoke with @RustanLeino a few weeks ago about how to fix these up to be less brittle, but I'm afraid I haven't had the time to try it yet. I think it's likely that you're seeing the same issues. Could you perhaps send me the list of test failures that you get, please? That'd be helpful for when I finally get to this (unfortunately likely to be in about a month because of teaching commitments...).

Best wishes,
Alex

@zvonimir
Copy link
Contributor

We might be able to use OutputCheck to achieve this, and the README in the test folder recommends: https://github.com/stp/OutputCheck/blob/master/README.md
If you grep for OutputCheck, some tests are already using it.

@hc825b
Copy link
Author

hc825b commented May 25, 2020

Hi Chiao and Zvonimir,

Thanks for the updates and interesting discussion! We also observe many inconsistent test outputs on our Jenkins server (we are at least running the tests the right way these days, but still haven't seen the expected outputs for all tests). I spoke with @RustanLeino a few weeks ago about how to fix these up to be less brittle, but I'm afraid I haven't had the time to try it yet. I think it's likely that you're seeing the same issues. Could you perhaps send me the list of test failures that you get, please? That'd be helpful for when I finally get to this (unfortunately likely to be in about a month because of teaching commitments...).

Best wishes,
Alex

Hi Alex,

Details can be found in my Travis build logs at https://travis-ci.org/github/hc825b/boogie

Below should be the names of the tests with unexpected results.

Testing Time: 250.39s
********************
Failing Tests (316):
    Boogie :: aitest0/Intervals.bpl
    Boogie :: aitest0/Issue25.bpl
    Boogie :: aitest1/Bound.bpl
    Boogie :: aitest9/TestIntervals.bpl
    Boogie :: aitest9/VarMapFixpoint.bpl
    Boogie :: bitvectors/arrays.bpl
    Boogie :: bitvectors/bv1.bpl
    Boogie :: bitvectors/bv10.bpl
    Boogie :: bitvectors/bv4.bpl
    Boogie :: bitvectors/bv5.bpl
    Boogie :: bitvectors/bv6.bpl
    Boogie :: bitvectors/bv8.bpl
    Boogie :: bitvectors/bv9.bpl
    Boogie :: civl/DeviceCache.bpl
    Boogie :: civl/FlanaganQadeer.bpl
    Boogie :: civl/Program1.bpl
    Boogie :: civl/Program2.bpl
    Boogie :: civl/Program3.bpl
    Boogie :: civl/Program4.bpl
    Boogie :: civl/StoreBuffer.bpl
    Boogie :: civl/akash.bpl
    Boogie :: civl/alloc-mem.bpl
    Boogie :: civl/alloc-tid.bpl
    Boogie :: civl/async/2agree_1.bpl
    Boogie :: civl/async/2agree_2.bpl
    Boogie :: civl/async/2agree_3.bpl
    Boogie :: civl/async/2pc-triggers.bpl
    Boogie :: civl/async/2pc.bpl
    Boogie :: civl/async/inc-dec-2.bpl
    Boogie :: civl/async/inc-dec.bpl
    Boogie :: civl/async/inc-server.bpl
    Boogie :: civl/async/inc-server_mover.bpl
    Boogie :: civl/async/lock-service-impl.bpl
    Boogie :: civl/async/lock-service.bpl
    Boogie :: civl/async/pending-async-test.bpl
    Boogie :: civl/async/rec-inc.bpl
    Boogie :: civl/async/simple-tds.bpl
    Boogie :: civl/async/tds.bpl
    Boogie :: civl/async/tds2.bpl
    Boogie :: civl/async1.bpl
    Boogie :: civl/async2.bpl
    Boogie :: civl/bar.bpl
    Boogie :: civl/bernhard1.bpl
    Boogie :: civl/chris.bpl
    Boogie :: civl/chris2.bpl
    Boogie :: civl/chris4.bpl
    Boogie :: civl/chris5.bpl
    Boogie :: civl/chris6.bpl
    Boogie :: civl/chris7.bpl
    Boogie :: civl/chris8.bpl
    Boogie :: civl/civl-paper.bpl
    Boogie :: civl/foo.bpl
    Boogie :: civl/funky.bpl
    Boogie :: civl/ghost.bpl
    Boogie :: civl/inc-dec.bpl
    Boogie :: civl/intro.bpl
    Boogie :: civl/lease.bpl
    Boogie :: civl/left-mover.bpl
    Boogie :: civl/linear-set.bpl
    Boogie :: civl/linear-set2.bpl
    Boogie :: civl/linear_out_bug.bpl
    Boogie :: civl/linearity-bug-1.bpl
    Boogie :: civl/lipton.bpl
    Boogie :: civl/lock-introduced.bpl
    Boogie :: civl/lock.bpl
    Boogie :: civl/lock2.bpl
    Boogie :: civl/multiset.bpl
    Boogie :: civl/new1.bpl
    Boogie :: civl/nocollector.bpl
    Boogie :: civl/ogcounter.bpl
    Boogie :: civl/ogcounter2.bpl
    Boogie :: civl/one.bpl
    Boogie :: civl/par-incr.bpl
    Boogie :: civl/parallel1.bpl
    Boogie :: civl/parallel2.bpl
    Boogie :: civl/parallel4.bpl
    Boogie :: civl/parallel5.bpl
    Boogie :: civl/perm.bpl
    Boogie :: civl/podelski/t-s.bpl
    Boogie :: civl/podelski/x.bpl
    Boogie :: civl/podelski/x_perm.bpl
    Boogie :: civl/purity-issta.bpl
    Boogie :: civl/seqlock.bpl
    Boogie :: civl/t1.bpl
    Boogie :: civl/termination2.bpl
    Boogie :: civl/ticket.bpl
    Boogie :: civl/treiber-stack.bpl
    Boogie :: civl/unprotected-read.bpl
    Boogie :: civl/verified-ft.bpl
    Boogie :: civl/wilcox.bpl
    Boogie :: civl/write-barrier.bpl
    Boogie :: civl/wsq.bpl
    Boogie :: civl/zeldovich.bpl
    Boogie :: codeexpr/CodeExpr0.bpl
    Boogie :: codeexpr/CodeExpr1.bpl
    Boogie :: codeexpr/CodeExpr2.bpl
    Boogie :: codeexpr/codeExprBug.bpl
    Boogie :: commandline/multiple_procs_unusual_identifiers.bpl
    Boogie :: commandline/multiple_procs_verify_four_asterisk_wildcard.bpl
    Boogie :: commandline/multiple_procs_verify_one.bpl
    Boogie :: commandline/multiple_procs_verify_one_request_twice.bpl
    Boogie :: commandline/multiple_procs_verify_two.bpl
    Boogie :: commandline/multiple_procs_verify_two_asterisk_wildcard_begin.bpl
    Boogie :: commandline/multiple_procs_verify_two_asterisk_wildcard_end.bpl
    Boogie :: commandline/multiple_procs_verify_two_asterisk_wildcard_inbetween.bpl
    Boogie :: datatypes/ex.bpl
    Boogie :: datatypes/t1.bpl
    Boogie :: datatypes/t2.bpl
    Boogie :: extractloops/detLoopExtract.bpl
    Boogie :: extractloops/detLoopExtract1.bpl
    Boogie :: extractloops/detLoopExtract2.bpl
    Boogie :: extractloops/detLoopExtractNested.bpl
    Boogie :: extractloops/t1.bpl
    Boogie :: extractloops/t2.bpl
    Boogie :: extractloops/t3.bpl
    Boogie :: floats/BasicOperators1.bpl
    Boogie :: floats/BasicOperators2.bpl
    Boogie :: floats/BasicOperators3.bpl
    Boogie :: floats/BasicOperators4.bpl
    Boogie :: floats/BasicOperatorsWithTypeConv.bpl
    Boogie :: floats/CastToLowerPrec.bpl
    Boogie :: floats/ConstSyntax2.bpl
    Boogie :: floats/CorrectTypeConv.bpl
    Boogie :: floats/Equal1.bpl
    Boogie :: floats/Equal2.bpl
    Boogie :: floats/EvaluateSignBit.bpl
    Boogie :: floats/Havoc.bpl
    Boogie :: floats/RoundingMode1.bpl
    Boogie :: floats/RoundingMode2.bpl
    Boogie :: floats/RoundoffError.bpl
    Boogie :: floats/SpecialValues.bpl
    Boogie :: floats/TypeConvConst.bpl
    Boogie :: floats/git-issue80.bpl
    Boogie :: generalizedarray/Maps.bpl
    Boogie :: havoc0/KbdCreateClassObject.bpl
    Boogie :: havoc0/KeyboardClassFindMorePorts.bpl
    Boogie :: havoc0/KeyboardClassUnload.bpl
    Boogie :: havoc0/MouCreateClassObject.bpl
    Boogie :: havoc0/MouseClassFindMorePorts.bpl
    Boogie :: havoc0/MouseClassUnload.bpl
    Boogie :: houdini/deterministic.bpl
    Boogie :: houdini/houd1.bpl
    Boogie :: houdini/houd10.bpl
    Boogie :: houdini/houd11.bpl
    Boogie :: houdini/houd12.bpl
    Boogie :: houdini/houd2.bpl
    Boogie :: houdini/houd3.bpl
    Boogie :: houdini/houd4.bpl
    Boogie :: houdini/houd5.bpl
    Boogie :: houdini/houd6.bpl
    Boogie :: houdini/houd7.bpl
    Boogie :: houdini/houd8.bpl
    Boogie :: houdini/houd9.bpl
    Boogie :: houdini/mergedProgSingle_dac.bpl
    Boogie :: houdini/mergedProgSingle_res_ex1.bpl
    Boogie :: houdini/mergedProgSingle_res_ex2.bpl
    Boogie :: houdini/test1.bpl
    Boogie :: houdini/test10.bpl
    Boogie :: houdini/test2.bpl
    Boogie :: houdini/test7.bpl
    Boogie :: houdini/test8.bpl
    Boogie :: houdini/test9.bpl
    Boogie :: houdini/testUnsatCore.bpl
    Boogie :: inline/Elevator.bpl
    Boogie :: inline/InliningAndLoops.bpl
    Boogie :: inline/codeexpr.bpl
    Boogie :: inline/expansion2.bpl
    Boogie :: inline/expansion3.bpl
    Boogie :: inline/expansion4.bpl
    Boogie :: inline/fundef2.bpl
    Boogie :: inline/polyInline.bpl
    Boogie :: inline/test0.bpl
    Boogie :: inline/test1.bpl
    Boogie :: inline/test2.bpl
    Boogie :: inline/test3.bpl
    Boogie :: inline/test4.bpl
    Boogie :: inline/test5.bpl
    Boogie :: inline/test6.bpl
    Boogie :: linear/allocator.bpl
    Boogie :: linear/bug.bpl
    Boogie :: linear/f1.bpl
    Boogie :: linear/f2.bpl
    Boogie :: linear/f3.bpl
    Boogie :: linear/list.bpl
    Boogie :: livevars/NestedOneDimensionalMap.bpl
    Boogie :: livevars/TwoDimensionalMap.bpl
    Boogie :: livevars/bla1.bpl
    Boogie :: livevars/daytona_bug2_ioctl_example_1.bpl
    Boogie :: livevars/daytona_bug2_ioctl_example_2.bpl
    Boogie :: livevars/stack_overflow.bpl
    Boogie :: lock/Lock.bpl
    Boogie :: lock/LockIncorrect.bpl
    Boogie :: prover/EQ_v2.Eval__v4.Eval_out.bpl
    Boogie :: prover/z3mutl.bpl
    Boogie :: roundingmodes/CorrectTypeConv.bpl
    Boogie :: roundingmodes/DiffModesNotEqual.bpl
    Boogie :: roundingmodes/FloatOperators1.bpl
    Boogie :: roundingmodes/FloatOperators2.bpl
    Boogie :: roundingmodes/FloatOpsFixedMode.bpl
    Boogie :: roundingmodes/FloatOpsWithoutRoundingMode.bpl
    Boogie :: roundingmodes/FullNameAcronymEquivalence.bpl
    Boogie :: roundingmodes/SameModesEqual.bpl
    Boogie :: roundingmodes/UnaffectedOperators.bpl
    Boogie :: roundingmodes/VariableAssign.bpl
    Boogie :: smoke/smoke0.bpl
    Boogie :: snapshots/runtest.AI.snapshot
    Boogie :: snapshots/runtest.snapshot
    Boogie :: stratifiedinline/bar1.bpl
    Boogie :: stratifiedinline/bar10.bpl
    Boogie :: stratifiedinline/bar11.bpl
    Boogie :: stratifiedinline/bar12.bpl
    Boogie :: stratifiedinline/bar13.bpl
    Boogie :: stratifiedinline/bar2.bpl
    Boogie :: stratifiedinline/bar3.bpl
    Boogie :: stratifiedinline/bar4.bpl
    Boogie :: stratifiedinline/bar6.bpl
    Boogie :: stratifiedinline/bar7.bpl
    Boogie :: stratifiedinline/bar8.bpl
    Boogie :: stratifiedinline/bar9.bpl
    Boogie :: stratifiedinline/large.bpl
    Boogie :: symdiff/foo.bpl
    Boogie :: test13/ErrorTraceTestLoopInvViolationBPL.bpl
    Boogie :: test15/CaptureState.bpl
    Boogie :: test15/IntInModel.bpl
    Boogie :: test15/InterpretedFunctionTests.bpl
    Boogie :: test15/ModelTest.bpl
    Boogie :: test15/NullInModel.bpl
    Boogie :: test16/LoopUnroll.bpl
    Boogie :: test2/Arrays.bpl
    Boogie :: test2/AssertVerifiedUnder0.bpl
    Boogie :: test2/AssumeEnsures.bpl
    Boogie :: test2/AssumptionVariables0.bpl
    Boogie :: test2/Axioms.bpl
    Boogie :: test2/B.bpl
    Boogie :: test2/BadLineNumber.bpl
    Boogie :: test2/BoundedTypeParameterQuantifier.bpl
    Boogie :: test2/Call.bpl
    Boogie :: test2/CallVerifiedUnder0.bpl
    Boogie :: test2/ContractEvaluationOrder.bpl
    Boogie :: test2/CutBackEdge.bpl
    Boogie :: test2/Ensures.bpl
    Boogie :: test2/False.bpl
    Boogie :: test2/FormulaTerm.bpl
    Boogie :: test2/FormulaTerm2.bpl
    Boogie :: test2/FreeCall.bpl
    Boogie :: test2/IfThenElse1.bpl
    Boogie :: test2/Implies.bpl
    Boogie :: test2/InvariantVerifiedUnder0.bpl
    Boogie :: test2/Lambda.bpl
    Boogie :: test2/LambdaExt.bpl
    Boogie :: test2/LambdaOldExpressions.bpl
    Boogie :: test2/LambdaPoly.bpl
    Boogie :: test2/LoopInvAssume.bpl
    Boogie :: test2/NeverPattern.bpl
    Boogie :: test2/NullaryMaps.bpl
    Boogie :: test2/Old.bpl
    Boogie :: test2/Passification.bpl
    Boogie :: test2/Quantifiers.bpl
    Boogie :: test2/Rlimitouts0.bpl
    Boogie :: test2/SelectiveChecking.bpl
    Boogie :: test2/Structured.bpl
    Boogie :: test2/Timeouts0.bpl
    Boogie :: test2/TypeEncodingM.bpl
    Boogie :: test2/UpdateExpr.bpl
    Boogie :: test2/Where.bpl
    Boogie :: test2/sk_hack.bpl
    Boogie :: test20/TypeSynonyms2.bpl
    Boogie :: test21/BooleanQuantification.bpl
    Boogie :: test21/BooleanQuantification2.bpl
    Boogie :: test21/Boxing.bpl
    Boogie :: test21/Casts.bpl
    Boogie :: test21/Coercions2.bpl
    Boogie :: test21/Colors.bpl
    Boogie :: test21/DisjointDomains.bpl
    Boogie :: test21/DisjointDomains2.bpl
    Boogie :: test21/EmptyList.bpl
    Boogie :: test21/EmptySetBug.bpl
    Boogie :: test21/Flattening.bpl
    Boogie :: test21/FunAxioms.bpl
    Boogie :: test21/FunAxioms2.bpl
    Boogie :: test21/HeapAbstraction.bpl
    Boogie :: test21/HeapAxiom.bpl
    Boogie :: test21/InterestingExamples0.bpl
    Boogie :: test21/InterestingExamples1.bpl
    Boogie :: test21/InterestingExamples2.bpl
    Boogie :: test21/InterestingExamples3.bpl
    Boogie :: test21/InterestingExamples4.bpl
    Boogie :: test21/InterestingExamples5.bpl
    Boogie :: test21/Keywords.bpl
    Boogie :: test21/LargeLiterals0.bpl
    Boogie :: test21/LetSorting.bpl
    Boogie :: test21/MapAxiomsConsistency.bpl
    Boogie :: test21/MapOutputTypeParams.bpl
    Boogie :: test21/Maps0.bpl
    Boogie :: test21/Maps1.bpl
    Boogie :: test21/NameClash.bpl
    Boogie :: test21/Orderings.bpl
    Boogie :: test21/Orderings2.bpl
    Boogie :: test21/Orderings3.bpl
    Boogie :: test21/Orderings4.bpl
    Boogie :: test21/ParallelAssignment.bpl
    Boogie :: test21/PolyList.bpl
    Boogie :: test21/Real.bpl
    Boogie :: test21/Triggers0.bpl
    Boogie :: test21/Triggers1.bpl
    Boogie :: test7/MultipleErrors.bpl
    Boogie :: test7/NestedVC.bpl
    Boogie :: test7/UnreachableBlocks.bpl
    Boogie :: textbook/BQueue.bpl
    Boogie :: textbook/Bubble.bpl
    Boogie :: textbook/DivMod.bpl
    Boogie :: textbook/DutchFlag.bpl
    Boogie :: textbook/Find.bpl
    Boogie :: textbook/McCarthy-91.bpl
    Boogie :: textbook/TuringFactorial.bpl
    Boogie :: unnecessaryassumes/unnecessaryassumes1.bpl

  Expected Passes    : 102
  Expected Failures  : 5
  Unsupported Tests  : 83
  Unexpected Failures: 316

@gauravpartha
Copy link
Collaborator

gauravpartha commented Jun 5, 2020

Hi,

I am also interested in getting the Boogie tests to work on Windows. I am part of the Viper team and we test many of our tools on Windows and since we rely on Boogie it would be great if we could get this working. I am happy to help.

@hc825b , thanks for your test output. You seem to be using Z3 4.5.5, which is quite an old version (except I misinterpreted the build output). That may be one reason why you have so many unexpected failures, but not sure. In particular, Boogie is not compatible with older Z3 versions, since command line inputs for Z3 have changed etc...

On our Windows Jenkins build (using Boogie commit 327fcfd and Z3 4.8.8), we only have 9 unexpected failures, namely for these files:

functiondefine/fundef.bpl
functiondefine/fundef1.bpl
functiondefine/fundef5.bpl
livevars/bla1.bpl
prover/EQ_v2.Eval__v4.Eval_out.bpl
test15/IntInModel.bpl
test15/ModelTest.bpl
test15/NullInModel.bpl
livevars/stack_overflow.bpl

I looked into the reasons. There are three issues (as already hinted at by @alexanderjsummers).

  1. Linux-only commands are used using the OUTPUTCHECK tool. This is the case for
    functiondefine/fundef.bpl
    functiondefine/fundef1.bpl
    functiondefine/fundef5.bpl

where grep is used (i.e., // RUN: grep define "%t1" > "%t2")

  1. The execution traces leading to a failure state are different. This is most likely due the Z3 on Windows not behaving exactly like Z3 on Linux when different outputs are possible. This is the case for

livevars/bla1.bpl
prover/EQ_v2.Eval__v4.Eval_out.bpl

  1. The models produced by Z3 are different. The reason is most likely again the same as for the execution traces. This is the case for

test15/IntInModel.bpl
test15/ModelTest.bpl
test15/NullInModel.bpl
livevars/stack_overflow.bpl

I would really like to get all tests running on Windows. One potential solution that I see right now is to somehow mark all the tests that are "brittle", i.e., which check for an execution trace or a model. Then at least on Windows we could ignore those tests. Would the Boogie developers accept a change along these lines, if I were to identify the brittle tests?

For the tests that use grep, it would be nice if we could find alternatives.

In the long run, the ideal solution would be to make these checks less brittle, which will take more work though.

@bkragl
Copy link
Member

bkragl commented Jun 5, 2020

I just ran all tests on a Windows setup (Windows 10, Boogie 2.6.15, Z3 4.8.8) and all tests except the three in functiondefine succeeded.

@gauravpartha @alexanderjsummers: I think the problem on your end is that you are still using the obsolete Boogie build. The "official" build now uses .NET Core, and all expected outputs were updated to match this build. I agree that there are some annoying tests that need to be updated a lot because Z3 updates or even small updates in Boogie change the produced model / error trace. It would be great to find a better solution for that. However, at least in my experience, the same Boogie/Z3 combination usually behaves the same across different operating systems.

@zvonimir: Could you check if the functiondefine tests can be written without using grep (or in some OS independent way)?

@zvonimir
Copy link
Contributor

zvonimir commented Jun 5, 2020

@bkragl This is really weird since I did this work on Windows using .NET Core and Z3 4.8.8. Which seems to be the same setup you are using. How are they failing? Could you provide more details? Is it just because of grep?

Everyone, I already suggested above the solution for how to handle these "annoying" tests: #101 (comment)
Instead of matching whole error trace, we can match only the key parts using the above tool.

@bkragl
Copy link
Member

bkragl commented Jun 5, 2020

@bkragl This is really weird since I did this work on Windows using .NET Core and Z3 4.8.8. Which seems to be the same setup you are using. How are they failing? Could you provide more details? Is it just because of grep?

Yes, it's because of grep. Running lit with -vvv at some point says:

'grep': command not found

Are you using Cygwin or some other POSIX environment? If I run inside Cygwin (where grep is available) the tests work.

@gauravpartha
Copy link
Collaborator

I just ran all tests on a Windows setup (Windows 10, Boogie 2.6.15, Z3 4.8.8) and all tests except the three in functiondefine succeeded.

@gauravpartha @alexanderjsummers: I think the problem on your end is that you are still using the obsolete Boogie build. The "official" build now uses .NET Core, and all expected outputs were updated to match this build. I agree that there are some annoying tests that need to be updated a lot because Z3 updates or even small updates in Boogie change the produced model / error trace. It would be great to find a better solution for that. However, at least in my experience, the same Boogie/Z3 combination usually behaves the same across different operating systems.

@bkragl Thanks a lot for the pointer. We are using msbuild and not .NET Core. I'll try to update that and hopefully then only the three "grep" tests will fail.

@zvonimir Thanks a lot for the pointer to OutputCheck. It's not clear to me yet how well one can check the key parts if, for example, the counterexamples produced are completely different. I agree that if it's possible that would be a good solution and that's what one should try first. Hopefully once I update the way we build Boogie to .NET core, there won't be any Z3 discrepancies.

@gauravpartha
Copy link
Collaborator

I was able to successfully run the tests on our Windows Jenkins server using .NET Core and all the tests pass. Thanks a lot for the support!!

GitVersionTask was giving me trouble at first and I couldn't solve it by setting the environment variable MSBUILDSINGLELOADCONTEXT to 1. I think the issue is related to GitTools/GitVersion#1031. However, I noticed that Boogie has an option to disable GitVersionTask (#223). After switching it off, everything worked as expected.

Currently, the documentation for running the driver tests (https://github.com/boogie-org/boogie/blob/master/Test/README.md) provides the lit commands in the case where one does not use .NET Core (for example, lit --param boogie_params='-someParameter' .). I think it would be good to update all of these to the .NET Core equivalent versions, i.e., lit -D dotnet --param boogie_params='-someParameter' ., since it seems that the tests are tailored towards this anyway. One could then still add a sentence saying that if one did not build Boogie using .NET Core one just needs to drop -D dotnet, but some tests may fail.

If you think this is a good idea, I could add a pull request.

Thanks again.

@bkragl
Copy link
Member

bkragl commented Jun 10, 2020

I was able to successfully run the tests on our Windows Jenkins server using .NET Core and all the tests pass. Thanks a lot for the support!!

Great to hear that the test run successfully now!

Currently, the documentation for running the driver tests (https://github.com/boogie-org/boogie/blob/master/Test/README.md) provides the lit commands in the case where one does not use .NET Core (for example, lit --param boogie_params='-someParameter' .). I think it would be good to update all of these to the .NET Core equivalent versions, i.e., lit -D dotnet --param boogie_params='-someParameter' ., since it seems that the tests are tailored towards this anyway. One could then still add a sentence saying that if one did not build Boogie using .NET Core one just needs to drop -D dotnet, but some tests may fail.

In my opinion, by now we can drop -D dotnet and make it the default.

@gauravpartha
Copy link
Collaborator

In my opinion, by now we can drop -D dotnet and make it the default.

I agree. Making -D dotnet the default would be better.

@shazqadeer
Copy link
Contributor

Can we close this issue now?

@hc825b
Copy link
Author

hc825b commented Jul 15, 2020

Can we close this issue now?

Sure, I will close the issue. Feel free to reopen/rename the issue if needed.

@hc825b hc825b closed this as completed Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants