Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
titlePartitionStringCncDefinition.scala
borderStylesolid
object PartitionStringCncDefinition {
  def main(args: Array[String]): Unit = {
    ApplicationName("PartitionString")
    TargetPackage("partitionstring")
    TargetDirectory("partitionstring")

    Comment("Item Collections")
    ItemCollection[String, String]("input")
    ItemCollection[String, String]("span")
    ItemCollection[String, String]("results")

    Comment("Tag Collections")
    TagCollection[String]("singletonTagstringTag")
    TagCollection[String]("spanTags")

    Comment("Step Prescriptions")
    Presription("singletonTag", List("createSpan"))
    Presription("spanTags", List("processSpan"))

    Comment("Step Dependences")
    StepDependence("createSpan", List[String]("input"), List("spanTags", "span"))
    StepDependence("processSpan", List[String]("span"), List("results"))

    Comment("Environment Collections")
    EnvironmentDependence(
      List("input", "singletonTagstringTag"),
      List("results")
    )
  }
}

...

Diagrammatically, this is how the CnC graph looks:
image source: (Image from Kathleen Knobe's CnC Tutorial)

Next, run the CnC-Scala translator:

...