Comments (4)
Comment by nick_battle, 2010-12-19 12:16:02:
This is reproducible in VDMJ directly. I will look at it...
from overture.
Comment by nick_battle, 2010-12-19 13:19:41:
OK, this is an interesting problem. It happens because POP3Test (which contains the trace) is constructed by the CT test at the start. POP3Test creates an instance variable to contain the POP3Server. One of the constructor arguments makes a local function call to POP3Test`MakeMailDrop and that calls MakeMessages. When the function is called, the "self" value is not complete (we're still building instance variables). Therefore the function assumes it is static, as there is no self, and creates a ClassContext that can only see (explicit) static functions. Therefore it cannot see MakeMessages(UserName), as this is not explicitly static.
Therefore you get the same problem if you just ask for "new POP3Test()".
The version of POP3Test I use in VDMJ's internal tests (in test/resources/VDMBook/POP3.vpp) does not include local variables that try to create a POP3Server. Rather, the test1 and test2 operations create the server as a local variable when they start.
from overture.
Ok I now changed the example so it works again. After the OO semantics LB improvements this problem should disappear.
from overture.
Comment by nick_battle, 2010-12-19 14:43:45:
It is also worth noting that the original problem here does not occur with VDM-10, where all functions are implicitly static and so they are visible during construction (even without a self value). Running the original specification under VDM-10 does allow the CT tests to execute (after a declaration is re-ordered to be defined before it is used).
Closing this bug, as the fix is provided in VDM-10, and is a known issue with VDM classic.
from overture.
Related Issues (20)
- Class unions cannot be used to start threads HOT 1
- Overture examples repo was updated with new measures
- Constructor overloading ambiguity HOT 15
- Difficult VDMUnit test scenario HOT 3
- Function union parameters can produce errors HOT 1
- Add InvariantValueMaps from VDMJ HOT 1
- Problem evaluating large trace HOT 4
- Removed hard limit on module initialization HOT 2
- Allow nested block comments in parser HOT 8
- Correctly colour nested comments in VDM editor HOT 1
- Map domain and range restrictions are over-constrained HOT 1
- Proof obligation exception when assigning to a record's sequence by index HOT 2
- Code generation to java gives ambiguous reference to Record
- The codegen runtime plugin includes a test dependency
- java error HOT 2
- NotSerializableException when saving a type checked specification through the bundled version of VDMJ HOT 2
- Add Annotations "provided" jar into the release artifacts
- Can't run app on MacOS 12 HOT 1
- Repos in overture.p2.inf no longer valid since bintray.com shutdown
- Type Variables invariants seem to be broken when used as type variables in further function calls HOT 12
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 overture.