java.lang.Object
de.learnlib.oracle.membership.CLIOracle<I>
- Type Parameters:
I- input symbol type
- All Implemented Interfaces:
BatchProcessor<Query<I,,Boolean>> MembershipOracle<I,,Boolean> QueryAnswerer<I,,Boolean> SingleQueryOracle<I,Boolean>
An oracle that delegates its queries to an external program via the command-line interface. Acceptance of the queries
is determined based on the program's return code where
0 indicates success and any other value indicates
failure.
Queries are translated to program arguments via the symbol's Object.toString() method. Depending on whether a
reset symbol has been specified, this oracle assumes either a stateless (reset == null) or stateful
(reset != null) communication.
In a stateless communication, all symbols of a query are passed to the program at once and invocations should be
treated independently of each other. In a stateful communication, the program is executed multiple times with a
single query symbol each, preceded by a single invocation with only the reset symbol. The exit code of the
last invocation determines the query response.
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.learnlib.oracle.MembershipOracle
MembershipOracle.DFAMembershipOracle<I>, MembershipOracle.MealyMembershipOracle<I,O>, MembershipOracle.MooreMembershipOracle<I, O> Nested classes/interfaces inherited from interface de.learnlib.oracle.SingleQueryOracle
SingleQueryOracle.SingleQueryOracleDFA<I>, SingleQueryOracle.SingleQueryOracleMealy<I,O>, SingleQueryOracle.SingleQueryOracleMMLT<I, O>, SingleQueryOracle.SingleQueryOracleMoore<I, O> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.learnlib.oracle.MembershipOracle
answerQuery, asOracle, processBatchMethods inherited from interface de.learnlib.oracle.SingleQueryOracle
processQueries, processQuery
-
Constructor Details
-
CLIOracle
Constructor. Does not set aresetsymbol.- Parameters:
commandLine- the command line, containing the main binary and potential additional arguments- See Also:
-
CLIOracle
Constructor.- Parameters:
commandLine- the command line, containing the main binary and potential additional argumentsreset- the symbol passed to the program to indicate a reset
-
-
Method Details
-
answerQuery
- Specified by:
answerQueryin interfaceMembershipOracle<I,Boolean> - Specified by:
answerQueryin interfaceQueryAnswerer<I,Boolean> - Specified by:
answerQueryin interfaceSingleQueryOracle<I,Boolean>
-