jp.kobe_u

copris

package copris

Provides classes for Constraint Programming in Scala.

OVERVIEW

The following is a sample program in Copris DSL (Domain Specific Language).

object FirstStep {
import jp.kobe_u.copris._
import jp.kobe_u.copris.dsl._

def main(args: Array[String]) = {
  val x = int('x, 0, 7)
  val y = int('y, 0, 7)
  add(x + y === 7)
  add(x * 2 + y * 4 === 20)
  if (find) {
    println(solution)
  }
}
}
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. copris
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class Abs(x0: Term) extends Term with Product with Serializable

    Case class for absolute value of term.

  2. abstract class AbstractSolver extends SolverTrait

    Abstract class for CSP solvers

  3. case class Add(xs: Term*) extends Term with Product with Serializable

    Case class for addition of terms.

  4. case class Alldifferent(xs: Term*) extends GlobalConstraint with Product with Serializable

    Case class for Alldifferent global constraints.

  5. case class And(cs: Constraint*) extends Constraint with Product with Serializable

    Case class for conjuction of constaints.

  6. case class Bool(name: String, is: String*) extends Constraint with Ordering[Bool] with Product with Serializable

    Case class of Boolean variables.

  7. case class CSP(variables: IndexedSeq[Var] = ..., bools: IndexedSeq[Bool] = ..., dom: Map[Var, Domain] = ..., constraints: IndexedSeq[Constraint] = ...) extends CSPTrait with Product with Serializable

    Case class of CSP (Constraint Satisfaction Problem)

  8. trait CSPTrait extends AnyRef

    Trait of CSP (Constraint Satisfaction Problem)

  9. sealed abstract class Constraint extends Expr

    Abstract class of constraints.

  10. class Copris extends CoprisTrait

    Class for Copris DSL which provides methods for CSP and CSP solver.

  11. trait CoprisTrait extends CSPTrait with SolverTrait

    Trait for Copris DSL which provides methods for CSP and CSP solver.

  12. case class Count(value: Term, xs: Seq[Term], cmp: String, count: Term) extends GlobalConstraint with Product with Serializable

    Case class for Count global constraints.

  13. case class Cumulative(tasks: Seq[(Term, Term, Term, Term)], limit: Term) extends GlobalConstraint with Product with Serializable

    Case class for Cumulative global constraints.

  14. case class Disjunctive(tasks: (Term, Term)*) extends GlobalConstraint with Product with Serializable

    Case class for Disjunctive global constraints.

  15. case class Div(x0: Term, x1: Term) extends Term with Product with Serializable

    Case class for division of terms.

  16. abstract class Domain extends AnyRef

    Abstract class of domains.

  17. case class Element(i: Term, xs: Seq[Term], xi: Term) extends GlobalConstraint with Product with Serializable

    Case class for Element global constraints.

  18. case class EnumDomain[A](values: A*) extends Product with Serializable

    Case class of enum domain

  19. case class Eq(x0: Term, x1: Term) extends Constraint with Product with Serializable

    Case class for equals constraints.

  20. abstract class Expr extends AnyRef

    Abstract class of expressions.

  21. case class Ge(x0: Term, x1: Term) extends Constraint with Product with Serializable

    Case class for greater-than-or-equals constraints.

  22. case class GlobalCardinality(xs: Seq[Term], card: Seq[(Int, Term)]) extends GlobalConstraint with Product with Serializable

    Case class for GlobalCardinality global constraints.

  23. case class GlobalCardinalityWithCosts(xs: Seq[Term], card: Seq[(Int, Term)], table: Seq[(Int, Int, Int)], cost: Term) extends GlobalConstraint with Product with Serializable

    Case class for GlobalCardinalityWithCosts global constraints.

  24. sealed abstract class GlobalConstraint extends Constraint

    Abstract class of global constraints.

  25. case class Gt(x0: Term, x1: Term) extends Constraint with Product with Serializable

    Case class for greater-than constraints.

  26. case class If(c: Constraint, x0: Term, x1: Term) extends Term with Product with Serializable

    Case class for if expressions.

  27. case class Iff(c0: Constraint, c1: Constraint) extends Constraint with Product with Serializable

    Case class for if-and-only-if of constaint.

  28. case class Imp(c0: Constraint, c1: Constraint) extends Constraint with Product with Serializable

    Case class for implication of constaint.

  29. case class IntervalDomain(lo: Int, hi: Int) extends Domain with Product with Serializable

    Case class of interval domain

  30. case class Le(x0: Term, x1: Term) extends Constraint with Product with Serializable

    Case class for less-than-or-equals constraints.

  31. case class LexLess(xs: Seq[Term], ys: Seq[Term]) extends GlobalConstraint with Product with Serializable

    Case class for LexLess global constraints.

  32. case class LexLesseq(xs: Seq[Term], ys: Seq[Term]) extends GlobalConstraint with Product with Serializable

    Case class for LexLesseq global constraints.

  33. case class Lt(x0: Term, x1: Term) extends Constraint with Product with Serializable

    Case class for less-than constraints.

  34. case class Matrix(vs: Seq[Vec]) extends Iterable[Vec] with Product with Serializable

    Case class for matrices of terms.

  35. case class Max(xs: Term*) extends Term with Product with Serializable

    Case class for maximum of terms.

  36. case class Min(xs: Term*) extends Term with Product with Serializable

    Case class for minimum of terms.

  37. case class Mod(x0: Term, x1: Term) extends Term with Product with Serializable

    Case class for remainder of terms.

  38. case class Mul(xs: Term*) extends Term with Product with Serializable

    Case class for multiplication of terms.

  39. case class Ne(x0: Term, x1: Term) extends Constraint with Product with Serializable

    Case class for not-equals constraints.

  40. case class Neg(x0: Term) extends Term with Product with Serializable

    Case class for negation of term.

  41. case class Not(c0: Constraint) extends Constraint with Product with Serializable

    Case class for logical negation of constaint.

  42. case class Num(value: Int) extends Term with Product with Serializable

    Case class of number terms.

  43. case class Nvalue(count: Term, xs: Seq[Term]) extends GlobalConstraint with Product with Serializable

    Case class for Nvalue global constraints.

  44. case class Or(cs: Constraint*) extends Constraint with Product with Serializable

    Case class for disjuction of constaints.

  45. case class SetDomain(values: SortedSet[Int]) extends Domain with Product with Serializable

    Case class of set domain

  46. case class Solution(intValues: Map[Var, Int], boolValues: Map[Bool, Boolean]) extends Product with Serializable

    Case class for solutions

  47. trait SolverTrait extends AnyRef

    Trait for CSP solvers

  48. case class Sub(xs: Term*) extends Term with Product with Serializable

    Case class for subtraction of terms.

  49. sealed abstract class Term extends Expr

    Abstract class of terms.

  50. class Timer extends AnyRef

    Class Timer (experimental)

  51. case class Var(name: String, is: String*) extends Term with Ordering[Var] with Product with Serializable

    Case class of integer variables.

  52. case class Vec(xs: Seq[Term]) extends Iterable[Term] with Product with Serializable

    Case class for vectors of terms.

  53. case class Weightedsum(axs: Seq[(Int, Term)], cmp: String, b: Term) extends GlobalConstraint with Product with Serializable

    Case class for Weightedsum global constraints.

  54. case class Xor(c0: Constraint, c1: Constraint) extends Constraint with Product with Serializable

    Case class for exclusive-or of constaint.

Value Members

  1. object Add extends Serializable

    Factory for addition of terms.

  2. object Alldifferent extends Serializable

    Factory for Alldifferent global constraints.

  3. object And extends Serializable

    Factory for conjunction of terms.

  4. object Bool extends Serializable

  5. object DefaultSolver

    Factory for default solver.

  6. object Disjunctive extends Serializable

    Factory for Disjunctive global constraints.

  7. object Domain

    Factory for creating domains.

  8. object FALSE extends Constraint

    Object of FALSE constraint.

  9. object Matrix extends Serializable

    Factory for vectors

  10. object Max extends Serializable

    Factory for maximum of terms.

  11. object Min extends Serializable

    Factory for minimum of terms.

  12. object Mul extends Serializable

    Factory for multiplication of terms.

  13. object NIL extends Term

    Object of NIL term.

  14. object ONE extends Num

    Object of number term 1.

  15. object Or extends Serializable

    Factory for disjunction of terms.

  16. object Sub extends Serializable

    Factory for subtraction of terms.

  17. object Sum

    Factory for addition of terms.

  18. object TRUE extends Constraint

    Object of TRUE constraint.

  19. object Timer

    Object Timer (experimental)

  20. object Var extends Serializable

  21. object Vec extends Serializable

    Factory for vectors

  22. object ZERO extends Num

    Object of number term 0.

  23. object dsl extends CoprisTrait

    Object for Copris DSL which provides methods for CSP and CSP solver.

  24. package jsr331

  25. package loader

  26. package pb

  27. package smt

  28. package sugar

Inherited from AnyRef

Inherited from Any

Ungrouped