<commit_before>package planstack.anml.model.concrete

import java.util

import planstack.anml.model.abs.AbstractDecomposition
import planstack.anml.model.concrete.statements.{BindingConstraint, Statement}
import planstack.anml.model.{AnmlProblem, Context}

import scala.collection.JavaConversions._

class Decomposition(
    val context:Context,
    val container:Action)
  extends Chronicle
{


  val statements = new util.LinkedList[Statement]()
  val bindingConstraints = new util.LinkedList[BindingConstraint]()
  val temporalConstraints = new util.LinkedList[TemporalConstraint]()
  val actions = new util.LinkedList[Action]()
  val actionConditions = new util.LinkedList[ActionCondition]()

  assert(context.interval == null)
  context.setInterval(container)

  def vars = seqAsJavaList(context.varsToCreate)
}


object Decomposition {

  def apply(pb:AnmlProblem, parent:Action, dec:AbstractDecomposition) : Decomposition = {
    val context = dec.context.buildContext(pb, Some(parent.context))

    val decomposition = new Decomposition(context, parent)

    decomposition.addAll(dec.statements, context, pb)


    decomposition
  }
}<commit_msg>Store the decomposition number in Decomposition class.<commit_after>package planstack.anml.model.concrete

import java.util

import planstack.anml.model.abs.AbstractDecomposition
import planstack.anml.model.concrete.statements.{BindingConstraint, Statement}
import planstack.anml.model.{AnmlProblem, Context}

import scala.collection.JavaConversions._

class Decomposition(
    val context:Context,
    val container:Action,
    val decNum: Int)
  extends Chronicle
{


  val statements = new util.LinkedList[Statement]()
  val bindingConstraints = new util.LinkedList[BindingConstraint]()
  val temporalConstraints = new util.LinkedList[TemporalConstraint]()
  val actions = new util.LinkedList[Action]()
  val actionConditions = new util.LinkedList[ActionCondition]()

  assert(context.interval == null)
  context.setInterval(container)

  def vars = seqAsJavaList(context.varsToCreate)
}


object Decomposition {

  def apply(pb:AnmlProblem, parent:Action, dec:AbstractDecomposition) : Decomposition = {
    val context = dec.context.buildContext(pb, Some(parent.context))

    val decNum = parent.decompositions.indexOf(dec)
    val decomposition = new Decomposition(context, parent, decNum)

    decomposition.addAll(dec.statements, context, pb)


    decomposition
  }
}
{'fraction_non_alphanumeric': 0.0934156378600823, 'fraction_numerical': 0.0, 'mean_word_length': 5.397368421052631, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6439618', 'n_tokens_mistral': 721, 'n_tokens_neox': 681, 'n_words': 149}