@@ -8,7 +8,7 @@ package viper.server.core
88
99import ch .qos .logback .classic .Logger
1010import viper .server .vsi .MessageStreamingTask
11- import viper .silver .reporter .{Entity , EntityFailureMessage , EntitySuccessMessage , Message , Reporter , Time , VerificationResultMessage }
11+ import viper .silver .reporter .{Entity , EntityFailureMessage , EntitySuccessMessage , Message , PluginAwareReporter , Time , VerificationResultMessage }
1212import viper .silver .verifier .{Success , VerificationResult }
1313
1414trait MessageReportingTask [T ] extends MessageStreamingTask [T ] with ViperPost {
@@ -24,34 +24,18 @@ trait MessageReportingTask[T] extends MessageStreamingTask[T] with ViperPost {
2424 super .registerTaskEnd(success, logger)
2525 }
2626
27- /** implementations of this functions should let plugins map verification results for each entity */
28- def mapEntityVerificationResult (entity : Entity , result : VerificationResult ): VerificationResult
29-
30- private def processEntityResultMessage (verifier : String , entity : Entity ,
31- verificationTime : Time , result : VerificationResult , cached : Boolean ): Unit = {
32- val mappedResult = mapEntityVerificationResult(entity, result)
33- enqueueMessage(VerificationResultMessage (verifier, entity, verificationTime, mappedResult, cached))
34- }
35-
3627 // Implementation of the Reporter interface used by the backend.
37- class ActorReporter (tag : String ) extends Reporter {
28+ class ActorReporter (tag : String ) extends PluginAwareReporter {
3829 val name = s " ViperServer_ $tag"
3930
40- def report (msg : Message ): Unit = {
31+ def doReport (msg : Message ): Unit = {
4132 logger.trace(s " ActorReport received msg $msg" )
4233 msg match {
4334 case m : EntityFailureMessage if m.concerning.info.isCached =>
4435 case m : EntitySuccessMessage if m.concerning.info.isCached =>
4536 // Do not re-send messages about AST nodes that have been cached;
4637 // the information about these nodes is going to be reported anyway.
4738
48- // to properly support streaming of (partial) verification results, we must invoke
49- // the plugins to do the post-processing and enqueue the resulting message:
50- case EntitySuccessMessage (verifier, entity, verificationTime, cached) =>
51- processEntityResultMessage(verifier, entity, verificationTime, Success , cached)
52- case EntityFailureMessage (verifier, entity, verificationTime, failure, cached) =>
53- processEntityResultMessage(verifier, entity, verificationTime, failure, cached)
54-
5539 case m =>
5640 enqueueMessage(m)
5741 }
0 commit comments