S
- The type of formulas.public abstract class InconsistencyMeasurementProcess<S extends Formula>
extends java.lang.Thread
Modifier and Type | Class and Description |
---|---|
private class |
InconsistencyMeasurementProcess.UpdateCallee
For handling timeouts.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
abort
Whether execution should be aborted.
|
static java.lang.String |
CONFIG_TIMEOUT
Key for the configuration map that gives a time out (given in seconds)
for a single update operation Default value is -1 which means no time out.
|
private java.lang.Double |
iValue
The current inconsistency value.
|
private StreamBasedInconsistencyMeasure<S> |
parent
The measure from where this process has been dispatched.
|
private FormulaStream<S> |
stream
The stream.
|
private long |
timeout
Time out for the update operation (in seconds).
|
Constructor and Description |
---|
InconsistencyMeasurementProcess()
Creates a new process for the given stream.
|
Modifier and Type | Method and Description |
---|---|
void |
abort()
Aborts the measurement of a stream.
|
java.lang.Double |
getInconsistencyValue()
Returns the current inconsistency value of this stream processing or
the last value if the stream processing has finalized.
|
protected void |
init(FormulaStream<S> stream,
StreamBasedInconsistencyMeasure<S> parent,
java.util.Map<java.lang.String,java.lang.Object> config)
Initialization statements.
|
protected abstract void |
init(java.util.Map<java.lang.String,java.lang.Object> config)
Additional initialization statements are put here.
|
void |
run() |
abstract java.lang.String |
toString() |
protected abstract double |
update(S formula)
Updates the inconsistency value with the new formula.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
public static final java.lang.String CONFIG_TIMEOUT
private FormulaStream<S extends Formula> stream
private boolean abort
private java.lang.Double iValue
private StreamBasedInconsistencyMeasure<S extends Formula> parent
private long timeout
public InconsistencyMeasurementProcess()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected void init(FormulaStream<S> stream, StreamBasedInconsistencyMeasure<S> parent, java.util.Map<java.lang.String,java.lang.Object> config)
stream
- some formula stream.parent
- the measure from where this process has been dispatched.config
- configuration options for the specific process.protected abstract void init(java.util.Map<java.lang.String,java.lang.Object> config)
protected abstract double update(S formula)
formula
- some formula.public abstract java.lang.String toString()
toString
in class java.lang.Thread
public void abort()
public java.lang.Double getInconsistencyValue()