it.unich.scalafix

The fixpoint package contains everything which is related to defining and solving systems of equations. This package object defines some type aliases which are used in the API.

Type members

Classlikes

abstract class Box[V] extends (V, V) => V

A Box is a way to combine two values into a new one. It is a specialization of the functional type (V,V) => V, where the first parameter is the old value of an unknown and the second parameter is the new contribution. Both widenings and narrowings are examples of boxes. Boxes are mutable, i.e., the apply method may give different results for the same input when called multiple times.

A Box is a way to combine two values into a new one. It is a specialization of the functional type (V,V) => V, where the first parameter is the old value of an unknown and the second parameter is the new contribution. Both widenings and narrowings are examples of boxes. Boxes are mutable, i.e., the apply method may give different results for the same input when called multiple times.

Another function of boxes is to be blueprints for building other equivalent boxes. Each box has a copy method which should produce a functionally equivalent copy of this. The copy method should try to minimize object duplication.

Type parameters:
V

the type of the values to combine.

Companion:
object
object Box

The Box object defines several factories for building boxes.

The Box object defines several factories for building boxes.

Companion:
class
abstract class BoxAssignment[-U, V] extends PartialFunction[U, Box[V]]

A BoxAssignment maps a subset of unknowns to a Box. When isDefinedAt(u) is false for a given unknown u, the corresponding apply(u) should be a right box.

A BoxAssignment maps a subset of unknowns to a Box. When isDefinedAt(u) is false for a given unknown u, the corresponding apply(u) should be a right box.

Like it was the case for Box, a BoxAssignent is also a blueprint for buildind equivalent BoxAssignments. Each BoxAssignmant has a copy method which should produce a functionally equivalent copy of this. The copy method should try to minimize object duplication.

Companion:
object

The BoxAssignment object defines factories for building box assignments.

The BoxAssignment object defines factories for building box assignments.

Companion:
class
trait EquationSystem[U, V]

This is the abstract class for a generic equation system.

This is the abstract class for a generic equation system.

Type parameters:
U

the type for the unknowns of this equation system.

V

the type for the values assumed by the unknowns of this equation system.

Companion:
object
Companion:
class
abstract class EquationSystemBase[U, V] extends EquationSystem[U, V]

This class implements common utility methods.

This class implements common utility methods.

An EquationSystemTracer implements some methods which are called by equation systems when certain events occurs. They may be used for debugging, tracing, etc...

An EquationSystemTracer implements some methods which are called by equation systems when certain events occurs. They may be used for debugging, tracing, etc...

Type parameters:
U

the type of unknowns supported by this tracer

V

the type of values for unknowns supported by this tracer

Companion:
object
Companion:
class
abstract class EquationSystemTracerAdapter[U, V] extends EquationSystemTracer[U, V]

This abstract class implements a tracer which does nothing. May be sub-classed in order to override only the methods we are interested in.

This abstract class implements a tracer which does nothing. May be sub-classed in order to override only the methods we are interested in.

The FixpointSolver object contains many enumerations and auxiliary classes which are used by other fixpoint solvers.

The FixpointSolver object contains many enumerations and auxiliary classes which are used by other fixpoint solvers.

A FixpointSolverTracer implements some methods which are called by solvers when certain events occurs. They may be used for debugging, tracing, etc...

A FixpointSolverTracer implements some methods which are called by solvers when certain events occurs. They may be used for debugging, tracing, etc...

Type parameters:
U

the type of unknowns supported by this tracer

V

the type of values for unknowns supported by this tracer

Companion:
object
Companion:
class
abstract class FixpointSolverTracerAdapter[U, V] extends FixpointSolverTracer[U, V]

This abstract class implements a tracer for fixpoint solvers which does nothing. May be sub-classed in order to override only the methods we are interested in.

This abstract class implements a tracer for fixpoint solvers which does nothing. May be sub-classed in order to override only the methods we are interested in.

case class SimpleEquationSystem[U, V](body: U => V, initial: InputAssignment[U, V], inputUnknowns: U => Boolean, tracer: Option[EquationSystemTracer[U, V]]) extends EquationSystemBase[U, V]

A simple standard implementation of EquationSystem. All fields must be provided explicitly by the user with the exception of bodyWithDependencies which is computed by body.

A simple standard implementation of EquationSystem. All fields must be provided explicitly by the user with the exception of bodyWithDependencies which is computed by body.

Types

type Assignment[U, V] = U => V

An assignment for an equation system is a map from unknowns to values.

An assignment for an equation system is a map from unknowns to values.

type Body[U, V] = U => V => U => V

The body of an equation system, i.e., a map from assignments to assignments.

The body of an equation system, i.e., a map from assignments to assignments.

type BodyWithDependencies[U, V] = U => V => U => (V, Iterable[U])

A body which also calculates dependencies among unknowns.

A body which also calculates dependencies among unknowns.

type EdgeAction[U, V, E] = U => V => E => V

The effect of an edge in a graph equation system.

The effect of an edge in a graph equation system.

Value members

Concrete fields

final val TRACING: 5000

The constant to use in -Xelide-below in order to remove tracing code. Note that tracing might be required to make a program work, so only elide it if you known what you are doing.

The constant to use in -Xelide-below in order to remove tracing code. Note that tracing might be required to make a program work, so only elide it if you known what you are doing.