GraphBody

trait GraphBody[U, V, E] extends U => V

An body generated by an hyper-graph, i.e., a graph where each edge has several source nodes and a single target node. Unknowns are nodes of the graph. Given an assignment, each hyper-edge produces a partial value. These values are combined with the upper bound operation of the domain V.

It is required that if edgeAction(rho)(e) depends on rho(x), then x shoud be in the sources of edge e. There are obvious coherence conditions among sources, target, ingoing and outgoing.

An unknown x which has no incoming edges corresponds to an equation x=x, with no influence from x to itself. This is useful for having an unknown which keeps its value fixed to that specificied in the initial assignment.

Type parameters:
E

type of edges.

U

the type for the unknowns, which are also the nodes of the graph.

V

the type for the values assumed by the unknowns, which is also the type of the values generated by each edge trough the edgeAction function.

Companion:
object
Source:
GraphBody.scala
trait (U => V) => U => V
class Object
trait Matchable
class Any
class SimpleGraphBody[U, V, E]

Value members

Abstract methods

def addLocalizedCombos(combos: ComboAssignment[U, V], unknownOrdering: Ordering[U]): GraphBody[U, V, E]

Returns a new graph-based body obtained by adding combos to this graph in a localized way.

Returns a new graph-based body obtained by adding combos to this graph in a localized way.

Value parameters:
combos

the assignment of combos to unknowns.

unknownOrdering

an ordering on unknowns used to decide the edges where combos need to be applied.

Source:
GraphBody.scala
def addLocalizedWarrowing(widenings: ComboAssignment[U, V], narrowings: ComboAssignment[U, V], unknownOrdering: Ordering[U])(using Domain[V]): U => V

Returns a new graph-based body obtained by adding warrowings to this graph in a localized way. Localized warrowings require a different procedure than standard localized widenings or narrowings. Moreover, it is not entirely clear whether this works as intended or not.

Returns a new graph-based body obtained by adding warrowings to this graph in a localized way. Localized warrowings require a different procedure than standard localized widenings or narrowings. Moreover, it is not entirely clear whether this works as intended or not.

Value parameters:
narrowings

the assignment of narrowings to unknowns.

unknownOrdering

an ordering on unknowns, used to decide the edges where combos need to be applied.

valuesParialOrdering

a partial ordering on values, used to decide whether widening or narrowing should be applied.

widenings

the assignment of widenings to unknowns.

Source:
GraphBody.scala
def combiner: (V, V) => V

Returns the operation used from combining the contributions of different edges.

Returns the operation used from combining the contributions of different edges.

Source:
GraphBody.scala
def edgeAction: (U, V) => E

Returns the edge actions of the graph.

Returns the edge actions of the graph.

Source:
GraphBody.scala
def ingoing: Relation[U, E]

Returns the relation mapping each node to its ingoing edges.

Returns the relation mapping each node to its ingoing edges.

Source:
GraphBody.scala
def outgoing: Relation[U, E]

Returns the relation mapping each node to its outgoing edges.

Returns the relation mapping each node to its outgoing edges.

Source:
GraphBody.scala
def sources: Relation[E, U]

Returns the relation mapping each edge to its source nodes

Returns the relation mapping each edge to its source nodes

Source:
GraphBody.scala
def target: E => U

Returns the relation mapping each edge to its target node.

Returns the relation mapping each edge to its target node.

Source:
GraphBody.scala

Returns the set of unknowns, i.e., the nodes of the graph.

Returns the set of unknowns, i.e., the nodes of the graph.

Source:
GraphBody.scala

Inherited methods

def andThen[A](g: (U => V) => A): (U => V) => A
Inherited from:
Function1
def apply(v1: U => V): U => V
Inherited from:
Function1
def compose[A](g: A => U => V): A => U => V
Inherited from:
Function1
override def toString(): String
Definition Classes
Function1 -> Any
Inherited from:
Function1