This GitLab instance reached the end of its service life. It won't be possible to create new users or projects.

Please read the deprecation notice for more information concerning the deprecation timeline

Visit migration.git.tu-berlin.de (internal network only) to import your old projects to the new GitLab platform 📥

NaiveReflexiveClosure.scala 606 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
package de.bbisping.coupledsim.algo

import scala.annotation.migration
import de.bbisping.coupledsim.ts.TransitionSystem
import de.bbisping.coupledsim.util.FixedPoint
import de.bbisping.coupledsim.util.Relation
import de.bbisping.coupledsim.util.LabeledRelation

class NaiveReflexiveClosure[S, A, L] (
    ts: TransitionSystem[S, A, L],
    reflexionActionLabel: A) {
  
  def compute() = {
    
    val newTrans = for {
      s <- ts.nodes
    } yield (s, reflexionActionLabel, s)
    val newSteps = ts.step merge new LabeledRelation(newTrans)
    
    TransitionSystem(newSteps, ts.nodeLabeling)
  }
  
}