Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: using repeat within an altstep which is used itself as activated default within an interleave statement

using repeat within an altstep which is used itself as activated default within an interleave statement 04 Nov 2010 14:28 #7707

Hello,
there might be a dilemma within the ttcn-3 specification regarding usage
of repeat within interleave statement.
It is clearly specified that repeat must not be used inside an
interleave block.
It is also clearly specified that activated defaults function within
interleave.
This means that an repeat in an activated default could cause an error
when executed from an interleave rather than a normal alt.
Here is an example that shows the situation.

The question is should this situation cause an runtime error or not? If
not, then perhaps clarification should be made in the specification.

module repeatInDefaultFromInterleave {
type component M {
timer t1 := 1.0
timer t2 := 2.0
timer t3 := 0.1
}

altstep as() runs on M {
[] t3.timeout {
t3.start
repeat
}
}

testcase tc() runs on M {
t1.start
t2.start
t3.start

activate(as())

interleave {
[] t1.timeout {
log("t1 done")
}
[] t2.timeout {
log("t2 done")
}
}
}

control {
execute(tc())
}
}


BR.
Uwe
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin