Verification: how 'formal' is a tool like Java Modeling Language (JML) compared to certified libraries and model checking?

(note: this is probably a beginner question, and English is not my first language)

Recently, I have read a paper that used the “Java Modeling Language” (JML), see for instance:

a) certified Software
To my understanding, a sorting algorithm proven correct in the theorem prover Coq (and possibly extracted to an ocaml program) is “certified software” or formally verified software, as a mathematical proof of the correctness can be extracted and possibly manually verified.

b) model checking
software verified via model checking is not certified or formally verified software, as the model checker has to be trusted.

How does the “Java Modeling Language” (JML) compare for verification purposes?

Okay, I think I get it. It is not about software verification, as it is stated that:

The contracts are defined by program code
in the programming language itself, and are trans-
lated into executable code by the compiler. Thus,
any violation of the contract that occurs while the
program is running can be detected immediately.

I cannot find a real example of verification in the above paper, at least not in the sense of model checking or certified software, so I guess they just don’t have an emphasis on formal methods.

Collision detection of cicle and rectangle [closed]

How to find the collision detection of a moving rectangle on circular object?
Here i have tried to junp rectangular object but the collision detection of a small rectangular object while jumping doesnt have smooth collision detection? Can anyone please help me ?

Unity game in edit the scene mode all of a sudden became incredibly slow/“laggy”

So I recently have been working on a game. So far I have very few assets in the game, which are a point light, a piece of terrain (which is textured), a player controller and a tree. Everything was going well until I put the tree in the scene. I made tree and started to add some branches I got to about 8 branches, and then I added 35 leafs. Then the edit scene started to become laggy.
When I played the game it was running perfectly. But as soon as I changed the scene back to edit mode it became laggy again. I then deleted the tree to see if that would solve the problem but it seems to have done nothing at all. I would really appreciate if someone could explain why the edit scene is becoming laggy even though there are only a few assets within the game.

Thanks, Nova

How Use loop's in cocos2d-x

I’ve for loop which work well on Windows

double speed = 35;

    for(int i=0; i<60 ;i++){

        speed += 0.3;
        Sleep (1000); // sleep 1000 mili seonds


But it responds an error on cocos2d-x.what should i do in cocos2d-x.
In my code i want to increase my speed to N unit every X second.

auto Action = MoveBy::create(3  *   visibleSize.width,Point(-visibleSize.width * speed, 0));

My way is right or should I do something else

invisible actor at group (libgdx)

I add to HorizontalGroup several actors: 1, 2, 3. I want to set invisible 2nd actor, and it doesn’t take any space (seems in Android View.GONE –

But now if set to 2nd actor setVisible(false), I still see empty space between 1nd and 3rd actors.

What’s I need did? Each time addActor/removeActor from HorizontalGroup if want hide/show actor?

SpriteBatch passing textures to GPU

How exactly (or, how often) are textures passed to the GPU shaders in MonoGame/XNA?

I am asking because I was profiling a MonoGame/XNA application and noticed that the memory controller load (using GPU-Z) was pretty high.

After disabling pretty much everything except the background texture (a static 24-bit 1920×1080 image), my frame rate went up as expected (~500fps) with GPU load peaking at 99% – but what surprised me was that the GPU memory controller load remained at ~50%.

Setting the breakpoint inside TextureCollection.PlatformSetTextures confirmed that SpriteBatch is indeed passing this texture to the pixel shader on each call.

Does this really mean that all textures are being passed to GPU on each frame over and over again? Am I misinterpreting these readings, or have a fundamentally wrong understanding of how the rendering process should work? Or did I mess something up with my Draw calls?

What is classified as a “High Level Design Decision”? [closed]

I’m a student studying game development and I have an assignment about level design due in a few days, the last question is about identifying high level design decisions from a game scenario, but the scenario is a very simple outline of a stealth game.

What is a “High Level Design Decision”?

How can i Zoom and Drag The Multiple Image in RelativeLayout [closed]

i try but it did not see the effect for the zoom and Rotate the image ..Here is my code….

ima1 = (ImageView) findViewById(;
    ima1.setOnTouchListener(new View.OnTouchListener() {

        public boolean onTouch(View v, MotionEvent event) {
            // TODO Auto-generated method stub
            int x_cord = (int) event.getRawX();
            int y_cord = (int) event.getRawY();

            layoutParams1 = (RelativeLayout.LayoutParams) ima1
            switch (event.getActionMasked()) {
            case MotionEvent.ACTION_DOWN:
                start.set(event.getX(), event.getY());
                mode = DRAG;
                lastEvent = null;

            case MotionEvent.ACTION_POINTER_DOWN:
                oldDist = spacing(event);
                if (oldDist > 10f) {
                    midPoint(mid, event);
                    mode = ZOOM;
                lastEvent = new float[4];
                lastEvent[0] = event.getX(0);
                lastEvent[1] = event.getX(1);
                lastEvent[2] = event.getY(0);
                lastEvent[3] = event.getY(1);
                d = rotation(event);

            case MotionEvent.ACTION_POINTER_UP:
                mode = NONE;
                lastEvent = null;
            case MotionEvent.ACTION_MOVE:
                if (mode == ZOOM) {
                    float newDist = spacing(event);
                    if (newDist > 10f) {
                        float scale = (newDist / oldDist);
                        matrix.postScale(scale, scale, mid.x, mid.y);
                        layoutParams1.leftMargin = x_cord;
                        layoutParams1.topMargin = y_cord;
                        System.out.println("=== Mode Zoom = " + mode + " == " + scale ) ;

                } else if (mode == DRAG) {

                    System.out.println("==== DRAG  " + x_cord + " - "
                            + y_cord);
                    if (x_cord > windowwidth) {
                        x_cord = windowwidth;
                    if (y_cord > windowheight) {
                        y_cord = windowheight;
                    layoutParams1.leftMargin = x_cord;
                    layoutParams1.topMargin = y_cord;

                } else if (lastEvent != null
                        && event.getPointerCount() == 2) {
                    /*newRot = rotation(event);
                    float r = newRot - d;
                    float[] values = new float[9];
                    float tx = values[2];
                    float ty = values[5];
                    float sx = values[0];
                    matrix.postRotate(r, mid.x, mid.y);
                    System.out.println("=== Mode Rotate = " + mode);*/

            return true;

my Layout XML file is …

    android:src="@drawable/ic_launcher" >


    android:src="@drawable/ic_launcher" >

Can I develop a game for Kinect without a Kinect?

I have to make a game in Unity3D using Kinect. The problem is I don’t have the Kinect yet. I need to wait until they deliver it to me.

Can I imitate Kinect’s movement for debugging my app?

Handling an item database with procedurally generated items?

Let’s say you have an item database which has every item in your game.
This works fine for regular items like a Health Potion, a normal Iron Sword etc, because these items have ItemID’s so we can get an exact copy of this item.
But what if we have an Iron Sword with an enchantment: ‘+5 Fire Damage’? (or whatever)

If you were to save that item to a player’s inventory, exit the game and load the game, the item will load as a regular Iron Sword, because it still has that ID.

Specifically, how would you save that item to a file? I’m using Unity, so to save the Player’s inventory, I use:

PlayerPrefs.SetInt("Inventory " + i, inventory[i].ItemId );

Would you create a custom item ID for every item with enchantments or is there a better way around this?

Question and Answer is proudly powered by WordPress.
Theme "The Fundamentals of Graphic Design" by Arjuna
Icons by FamFamFam