Giter Site home page Giter Site logo

Comments (4)

joey-coleman avatar joey-coleman commented on May 11, 2024

Comment by nick_battle, 2010-12-19 12:16:02:

This is reproducible in VDMJ directly. I will look at it...

from overture.

joey-coleman avatar joey-coleman commented on May 11, 2024

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.

joey-coleman avatar joey-coleman commented on May 11, 2024

Comment by pglvdm, 2010-12-19 14:25:56:

Ok I now changed the example so it works again. After the OO semantics LB improvements this problem should disappear.

from overture.

joey-coleman avatar joey-coleman commented on May 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.