Package com.uppaal.engine
Class DotProtocol
java.lang.Object
com.uppaal.engine.DotProtocol
- All Implemented Interfaces:
- Protocol
public class DotProtocol extends Object implements Protocol
This class implements the interface 'protocol'
- 
Constructor SummaryConstructors Constructor Description DotProtocol(InputStream in, OutputStream out)Constructor
- 
Method SummaryModifier and Type Method Description voidclose()Disconnect from the server.protected voidflush()Flushes the output stream.ConcreteStategetConcreteInitial(UppaalSystem system)Returns the concrete initial state for the system.ConcreteSuccessorgetConcreteSuccessor(UppaalSystem system, ConcreteState state, SystemEdgeSelect[] edges, BigDecimal currentTime, BigDecimal delay)Get the concrete simulation successorGanttChartgetGanttChart(UppaalSystem system, BigDecimal globalTime)Get the gantt chartStringgetOptionsInfo()Returns information about available options.SymbolicStategetSymbolicInitial(UppaalSystem system)Returns the symbolic initial state for the system.ArrayList<SymbolicTransition>getTransitions(UppaalSystem system, SymbolicState state)Returns the list of outgoing transitions for the state.StringgetVersion()Returns the version string of the server.protected StringparseResults(String results, QueryResult result)Parses the feedback block which may consist of the following items: popup message (starts with M) verbose result for display in the property list (starts with R) a data for plot (starts with P).See server.cpp for details.QueryResultquery(UppaalSystem system, Query query, QueryFeedback f)Write the query data to the serverQueryResultquery(UppaalSystem system, SymbolicState state, Query query, QueryFeedback f)Write the query data and the symbolic state to the servervoidsetOptions(String options)Sets server options used for verification.protected static Stringunquote(String s)Get the unquote stringUppaalSystemupload(Document document)Upload the document to the server.UppaalSystemupload(Document document, ArrayList<Problem> problems)Upload the document to the server.LscProcessuploadLsc(Document document, ArrayList<Problem> problems)protected voidwrite(ConcreteState state, BigDecimal delay)Writes the concrete state in the system to the output stream.protected voidwrite(SystemEdge[] edges)Writes the list of the edges to the output streamprotected voidwrite(SystemEdgeSelect[] edges)Writes the list of the selected edges to the output streamprotected voidwrite(Object o)Writes the object to the output stream following by a newline.protected voidwrite(String s)Writes the string to the output stream following by a newline.protected voidwrite(BigDecimal value)Writes the value to the output stream following by a new line
- 
Constructor Details- 
DotProtocolConstructor- Parameters:
- in- - The input stream
- out- - The output stream
 
 
- 
- 
Method Details- 
closeDescription copied from interface:ProtocolDisconnect from the server.- Specified by:
- closein interface- Protocol
- Throws:
- IOException- engine crash or problem in communication.
 
- 
getSymbolicInitialpublic SymbolicState getSymbolicInitial(UppaalSystem system) throws EngineException, IOException, CannotEvaluateExceptionDescription copied from interface:ProtocolReturns the symbolic initial state for the system. The stub must be connected and the system must be the last one uploaded to the server.- Specified by:
- getSymbolicInitialin interface- Protocol
- Parameters:
- system- the compiled Uppaal system representation.
- Returns:
- initial symbolic state.
- Throws:
- EngineException- error in the server protocol.
- IOException- I/O communication error.
- CannotEvaluateException- some expression could not be evaluated.
 
- 
getConcreteInitialpublic ConcreteState getConcreteInitial(UppaalSystem system) throws EngineException, IOException, CannotEvaluateExceptionDescription copied from interface:ProtocolReturns the concrete initial state for the system. The stub must be connected and the system must be the last one uploaded to the server.- Specified by:
- getConcreteInitialin interface- Protocol
- Parameters:
- system- the compiled Uppaal system representation.
- Returns:
- initial concrete state
- Throws:
- EngineException- error in the server protocol.
- IOException- I/O communication error.
- CannotEvaluateException- some expression could not be evaluated.
 
- 
getConcreteSuccessorpublic ConcreteSuccessor getConcreteSuccessor(UppaalSystem system, ConcreteState state, SystemEdgeSelect[] edges, BigDecimal currentTime, BigDecimal delay) throws EngineException, IOException, CannotEvaluateExceptionDescription copied from interface:ProtocolGet the concrete simulation successor- Specified by:
- getConcreteSuccessorin interface- Protocol
- Parameters:
- system- - The uppaal system
- state- - The concrete simulator state
- edges- - The vector of the selected system edges
- currentTime- - the current simulation time
- delay- - The delay time
- Returns:
- concrete successor object
- Throws:
- EngineException- error in the server protocol.
- IOException- I/O communication error.
- CannotEvaluateException- some expression could not be evaluated.
 
- 
getOptionsInfoDescription copied from interface:ProtocolReturns information about available options. The information is returned as an XML document. The stub must be connected.- Specified by:
- getOptionsInfoin interface- Protocol
- Returns:
- The options information
- Throws:
- EngineException- problem in the Uppaal engine.
- IOException- engine crash or problem in communication.
 
- 
getTransitionspublic ArrayList<SymbolicTransition> getTransitions(UppaalSystem system, SymbolicState state) throws EngineException, IOException, CannotEvaluateExceptionDescription copied from interface:ProtocolReturns the list of outgoing transitions for the state. The stub must be connected, the state must belong to the system, and the system must be the last one uploaded to the server.- Specified by:
- getTransitionsin interface- Protocol
- Parameters:
- system- - The uppaal system
- state- - The symbolic state of the system
- Returns:
- The array list of the symbolic transition
- Throws:
- EngineException- error in the server protocol.
- IOException- I/O communication error.
- CannotEvaluateException- some expression could not be evaluated.
 
- 
getVersionDescription copied from interface:ProtocolReturns the version string of the server. The stub must be connected.- Specified by:
- getVersionin interface- Protocol
- Returns:
- The version
- Throws:
- IOException- engine crash or problem in communication.
- EngineException- problem in the Uppaal engine.
 
- 
querypublic QueryResult query(UppaalSystem system, Query query, QueryFeedback f) throws EngineException, IOExceptionWrite the query data to the server- Specified by:
- queryin interface- Protocol
- Parameters:
- system- - The Uppaal system
- query- - The query string
- f- - The feedback char: 'T'/'M'/'E'
- Returns:
- The query result object: .result - 'T' if the query is satisfied, 'F' if the query is not satisfied, 'M' if the query is maybe satisfied and 'E' in case of errors. .exception - CannotEvaluateException
- Throws:
- EngineException- problem in Uppaal engine.
- IOException- engine crash or problem in communication.
 
- 
querypublic QueryResult query(UppaalSystem system, SymbolicState state, Query query, QueryFeedback f) throws EngineException, IOException, CannotEvaluateExceptionWrite the query data and the symbolic state to the server- Specified by:
- queryin interface- Protocol
- Parameters:
- system- - The uppaal system
- state- - Representing a state in a system
- query- - The query string
- f- - The feedback char: 'T'/'M'/'E'
- Returns:
- 'T' if the query is satisfied, 'F' if the query is not satisfied, 'M' if the query is maybe satisfied and 'E' in case of errors.
- Throws:
- EngineException- problem in Uppaal engine.
- IOException- engine crash or problem in communication.
- CannotEvaluateException
 
- 
unquoteGet the unquote string- Parameters:
- s- - The quote string
- Returns:
- The result string
 
- 
parseResultsParses the feedback block which may consist of the following items: popup message (starts with M) verbose result for display in the property list (starts with R) a data for plot (starts with P).See server.cpp for details.- Parameters:
- result- - The encoded results string
- Returns:
- Message - the parsed message
 
- 
setOptionsDescription copied from interface:ProtocolSets server options used for verification. The stub must be connected. TODO: Document format.- Specified by:
- setOptionsin interface- Protocol
- Parameters:
- options- - The options string
- Throws:
- EngineException- problem in the Uppaal engine.
- IOException- engine crash or problem in communication.
 
- 
uploadpublic UppaalSystem upload(Document document, ArrayList<Problem> problems) throws EngineException, IOExceptionDescription copied from interface:ProtocolUpload the document to the server. If no errors occurred, the instantiated system is returned. Otherwise, null is returned and error reports are stored in the problems vector. Even if no errors occurred, warnings may have been added to the problems vector. The stub must be connected.- Specified by:
- uploadin interface- Protocol
- Parameters:
- document- - The system document
- problems- - The problem array list
- Returns:
- the compiled system representation
- Throws:
- EngineException- error in the server protocol.
- IOException- I/O communication error.
 
- 
uploadDescription copied from interface:ProtocolUpload the document to the server. If no errors occurred, the instantiated system is returned. Otherwise, null is returned. The stub must be connected.- Specified by:
- uploadin interface- Protocol
- Parameters:
- document- - The system document
- Returns:
- The Uppaal system
- Throws:
- EngineException- error in the server protocol.
- IOException- I/O communication error.
 
- 
writeWrites the string to the output stream following by a newline.- Parameters:
- s- - The input string
- Throws:
- IOException- engine crash or problem in communication.
 
- 
writeWrites the object to the output stream following by a newline.- Parameters:
- o- - The object
- Throws:
- IOException- engine crash or problem in communication.
 
- 
writeWrites the value to the output stream following by a new line- Parameters:
- value- - The value
- Throws:
- IOException- engine crash or problem in communication.
 
- 
writeWrites the concrete state in the system to the output stream.- Parameters:
- state- - The concrete state in the system
- delay- - The delay time
- Throws:
- IOException- engine crash or problem in communication.
 
- 
writeWrites the list of the edges to the output stream- Parameters:
- edges- - The list of the edges
- Throws:
- IOException- engine crash or problem in communication.
 
- 
writeWrites the list of the selected edges to the output stream- Parameters:
- edges- - The list of the selected edges
- Throws:
- IOException- engine crash or problem in communication.
 
- 
flushFlushes the output stream.- Throws:
- IOException- engine crash or problem in communication.
 
- 
uploadLscpublic LscProcess uploadLsc(Document document, ArrayList<Problem> problems) throws EngineException, IOException- Specified by:
- uploadLscin interface- Protocol
- Throws:
- EngineException
- IOException
 
- 
getGanttChartpublic GanttChart getGanttChart(UppaalSystem system, BigDecimal globalTime) throws EngineException, IOExceptionDescription copied from interface:ProtocolGet the gantt chart- Specified by:
- getGanttChartin interface- Protocol
- Parameters:
- system- - The uppaal system
- globalTime- - The global time
- Returns:
- The gantt chart object
- Throws:
- EngineException- error in the server protocol.
- IOException- I/O communication error.
 
 
-