Comments (7)
Thanks for the examples! Let me check my understanding:
- Supports a finite range of random values, the tester searches for a process within this range that accepts the SUT.
- Defines the model from a tester's perspective, modelling the clients' knowledge of the SUT.
Test
is specified as a channel provided by SUT. Servers not sendingdata
toTest
violate the model.
If so, that solves my question!
from torxakis.
Looking at your example code, have you considered
Data ? x [[(0 <= x) /\ (x <= 12345)]]
or even just Data ? x
?
from torxakis.
Passes parser but doesn't step:
PROCDEF rand [Data :: Int] () ::=
Data ? x -- with or without [[(0 <= x) /\ (x <= 12345)]]
ENDDEF
TXS >> input files parsed:
TXS >> ["q.txs"]
TXS >> stepper Model
TXS >> unfoldCTbranch: Not unique
TXS >> Stepper started
TXS >> stepper 10
TXS >> NoOp : No action
The ##
approach could step.
from torxakis.
Another attempt:
PROCDEF rand [Data :: Int] (x :: Int) ::=
Data ! x
## rand [Data] (x + 1)
ENDDEF
stepper Model
does not return, process txsserver
is busy.
from torxakis.
The another attempt is an infinite model: causing, as observed, an infinite unfolding in txsserver.
from torxakis.
Torxakis assumes (for efficient calculation/limits of problem solvers) that the value communicated over hidden channels must be uniquely solvable. Your model violates this assumption.
When I have access to a pc, I will add a model that does what you want when the range of values is limited, which seems to be the case in your example where the range is from 0 up to 9.
from torxakis.
Today at the lab, so I could also access the article ;-)
TorXakis does not support generalized choice as specified by the Lotos paper.
TorXakis support however at least three alternatives:
- using dynamic process creation
PROCDEF q [In :: Int; Out :: Bool] (data :: Int) ::=
In ? request
>-> Out ! request == data
>-> q [In, Out] (data)
ENDDEF
PROCDEF qs [In :: Int; Out :: Bool] (nr :: Int) ::=
q [In,Out] (nr)
##
[[nr >= 0]] =>> qs[In,Out] (nr-1)
ENDDEF
PROCDEF server [In :: Int; Out :: Bool] () ::=
qs[In,Out](9)
ENDDEF
See for the whole file issue952.alt1.txt
Note: that LPE and LpeOps don't support dynamic process creation.
- Using a list of different numbers
Whenrequest == data
isFalse
we don't learn the value ofdata
, we only learn a value that is different todata
.
PROCDEF q [In :: Int; Out :: Bool] (data :: Int) ::=
In ? request
>-> Out ! request == data
>-> q [In, Out] (data)
ENDDEF
TYPEDEF List ::= Nil | Cstr { head :: Int; tail :: List } ENDDEF
FUNCDEF in ( i :: Int; l :: List ) :: Bool ::=
IF isNil (l) THEN False
ELSE IF head (l) == i THEN True
ELSE in (i, tail(l))
FI
FI
ENDDEF
PROCDEF unknown [In :: Int; Out :: Bool] (ds :: List) ::=
In ? request
>-> ( [[ in (request, ds) ]] =>> Out ! False >-> unknown [In, Out] (ds)
## [[not (in (request, ds)) ]] =>> ( Out ! True >-> q [In, Out](request)
## Out ! False >-> unknown [In, Out] (Cstr(request, ds))
)
)
ENDDEF
PROCDEF server [In :: Int; Out :: Bool] () ::=
unknown[In,Out](Nil)
ENDDEF
See for the whole file issue952.alt2.txt
- Using a test interface
PROCDEF q [In :: Int; Out :: Bool] (data :: Int) ::=
In ? request
>-> Out ! request == data
>-> q [In, Out] (data)
ENDDEF
PROCDEF server [In :: Int; Test :: Int; Out :: Bool] () ::=
Test ? data >-> q [In, Out](data)
ENDDEF
CHANDEF ChanDefs ::=
In :: Int;
Out :: Bool;
Test :: Int
ENDDEF
MODELDEF Model ::=
CHAN IN In
CHAN OUT Out, Test
BEHAVIOUR server [In, Test, Out] ()
ENDDEF
For the whole file see issue952.alt3.txt
I hope this helps!
If so you can close the issue.
from torxakis.
Related Issues (20)
- Undefined Function at <no location> HOT 4
- Parsing of SUT messages can result in a MultipleDefinitions error HOT 5
- Haddock pages not working HOT 2
- ISTEP translation to MCRL2 leads to erroneous MCRL2 model HOT 2
- Move to latest stack / ghc version
- 'trace purp' command produces incorrect purpose HOT 1
- Update of gh-pages fails on new pull-request HOT 13
- New stack requires new weeder HOT 1
- crashing toString HOT 1
- Release cvc4 1.8 is incompatible HOT 4
- [LPE] Provide number of states before applying LPE HOT 1
- Regex with $ fails HOT 1
- Regex with special characters fails HOT 1
- Constant values are not inferred correctly HOT 1
- Can the SUT create new connections? HOT 7
- Abstraction of Events
- Test purposes versus global settings
- eval fails on nested constdef
- Allow parentheses surrounding ConditionalCommunications in ProcessBehaviourSequence
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 torxakis.