Jump to content
Sign in to follow this  
tudor.timi

Clarification on example 102

Recommended Posts

Here's example 102:

component top {
  buffer mem_obj {
    int val;
    constraint val%2 == 0; // val must be even
  }

  action write1 {
    output mem_obj out_obj;
    constraint out_obj.val inside [1..5];
  }

  action write2 {
    output mem_obj out_obj;
    constraint out_obj.val inside [6..10];
  }

  action read {
    input mem_obj in_obj;
    constraint in_obj.val inside [8..12];
  }

  action test {
    activity {
      do write1;
      do read;
    }
  }
}

The description states that

Quote

[the] PSS processing tool needs to schedule another action of type write2 at some point prior to rd, whose mem_obj is bound to rd’s input.

Do tools start to introduce actions just to be able to satisfy preconditions?  Do I just specify "do this" and the tool figures out how to get there? If so, this is a really cool feature, which isn't immediately obvious from the PSS document or from the DVCon Europe tutorial I went to. I would insist on it and give it a prominent place in the specification. The Brekker motto of "beginning with the end in mind" comes to mind here.

The follow-up question is, can a tool generate all possible ways to get to a certain outcome?

Share this post


Link to post
Share on other sites

From PSWG:

Indeed, the language is designed in a way that enables automatic insertion of action to complete partially specified scenario flows. You are right in observing that this is not stressed or illustrated enough in the EA version, and we are working to expand on this topic (Mantis issue #6333).  I would say that the moto here is more – focus on the pure test intent, and abstract from the means to achieve it. It’s not just “begin with the end in mind”, but more generally “capture the end and not the means”.
W.r.t. the follow-up question, there is no general meaning in PSS to the term ‘all possible ways’. There can be different bring-up sequences leading to some desired behavior, different schedules, different resource assignments, different parameter values, etc. The space for ‘all possible ways’ without further qualification is not well defined, and not bounded. All of these different aspects of the scenario can be explicitly constrained. Tools may provide means to exhaustively cover all combinations for a specific property of a scenario, or some coverage goal.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...