Add basic WLP calculation
The WLP of a subset of statements in the language can now be calculated. This needs to be extended, but it gives a basic idea of what we can do. I made new types for the logical expressions (and the mathematical expression in them) rather than reusing the datatype within the language. I feel that there's a benefit to separating these, showing when we're talking about the programs and when we're talking about the wlp and its calculation and the like. However, this does increase the amount of types we use. I think the benefit outweighs the cost of having extra types, but I also feel like we should discuss this :)
Showing
- examples/id 6 additions, 0 deletionsexamples/id
- program-semantics.cabal 3 additions, 0 deletionsprogram-semantics.cabal
- src/Main.hs 10 additions, 0 deletionssrc/Main.hs
- src/WLP/LogicalExpression.hs 39 additions, 0 deletionssrc/WLP/LogicalExpression.hs
- src/WLP/MathExpression.hs 47 additions, 0 deletionssrc/WLP/MathExpression.hs
- src/WLP/WLPCalculator.hs 114 additions, 0 deletionssrc/WLP/WLPCalculator.hs
Loading
Please register or sign in to comment