Package net.maswag.falcaun
Class SimulinkRandomTester
java.lang.Object
net.maswag.falcaun.SimulinkRandomTester
Pure Random Tester of a Simulink model
- Author:
- Masaki Waga
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final net.automatalib.alphabet.Alphabet
<String> private List
<TemporalLogic.STLCost> private final List
<TemporalLogic.STLCost> private final int
private static final org.slf4j.Logger
private final NumericSULMapper
private final Random
private final SimulinkSUL
private final double
protected de.learnlib.sul.SUL
<List<Double>, IOSignalPiece<List<Double>>> private long
-
Constructor Summary
ConstructorsConstructorDescriptionSimulinkRandomTester
(String initScript, List<String> paramName, int length, double signalStep, List<String> properties, List<TemporalLogic.STLCost> costFunc, NumericSULMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptionprivate net.automatalib.word.Word
<String> generateTestWord
(List<? extends String> symbolList) Generate one word of lengthlength
randomlyboolean
run()
(package private) void
setTimeout
(long timeout) Set timeout to the equivalence oracle added next time.
-
Field Details
-
simulink
-
rawSimulink
-
abstractInputAlphabet
-
mapper
-
costFunc
-
timeout
private long timeout -
cexInput
-
cexProperty
-
cexOutput
-
length
private final int length -
random
-
properties
-
signalStep
private final double signalStep -
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
SimulinkRandomTester
public SimulinkRandomTester(String initScript, List<String> paramName, int length, double signalStep, List<String> properties, List<TemporalLogic.STLCost> costFunc, NumericSULMapper mapper) throws Exception - Parameters:
initScript
- The MATLAB script called at first. You have to define mdl in the script.paramName
- The list of input parameters.length
- The length of the sampled signals.signalStep
- The signal step in the simulationproperties
- The LTL properties to be verifiedcostFunc
- The STL properties to be verifiedmapper
- The I/O mapepr between abstract/concrete Simulink models.- Throws:
Exception
- It can be thrown from the constructor of SimulinkSUL.
-
-
Method Details
-
setTimeout
void setTimeout(long timeout) Set timeout to the equivalence oracle added next time.- Parameters:
timeout
- timeout in seconds.
-
getCexConcreteInput
-
run
public boolean run()- Returns:
- Returns
true
if and only if the Simulink model is verified i.e., no counter example is found.
-
generateTestWord
Generate one word of lengthlength
randomly- Parameters:
symbolList
- The list of the possible symbols- Returns:
- the generated word
-