Package | Description |
---|---|
ca.uqac.lif.dag |
A package for manipulating directed acyclic graphs (DAGs).
|
ca.uqac.lif.petitpoucet |
Package defining the core classes and interfaces for lineage tracking.
|
ca.uqac.lif.petitpoucet.function |
Implementation of Petit Poucet lineage tracking capabilities for function
circuits.
|
ca.uqac.lif.petitpoucet.function.booleans |
Functions related to Boolean values and connectives.
|
ca.uqac.lif.petitpoucet.function.ltl |
Operators of Linear Temporal Logic (LTL) applied to vectors of Boolean
values.
|
ca.uqac.lif.petitpoucet.function.number |
Artithmetic operators and other basic numerical functions.
|
ca.uqac.lif.petitpoucet.function.reflect |
Functions related to reflection in Java.
|
ca.uqac.lif.petitpoucet.function.strings |
String manipulation functions.
|
ca.uqac.lif.petitpoucet.function.vector |
Vector manipulation functions.
|
examples.circuits |
Examples of more complex circuits.
|
examples.util |
Utility classes used in the examples.
|
Modifier and Type | Class and Description |
---|---|
class |
LabelledNode
A node that contains an object, called its "label".
|
class |
NestedNode
A node that itself encloses a directed acyclic graph of other nodes.
|
Modifier and Type | Field and Description |
---|---|
protected Node |
FlatteningCrawler.m_start
The starting point for the crawl.
|
protected Node |
Crawler.m_start
The starting point of the crawl.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.List<Node> |
NestedNode.NestedNodeCrawler.m_allNodes
The list of all visited nodes.
|
protected java.util.Map<Node,Node> |
FlatteningCrawler.m_copies
A map associating original nodes to their corresponding copy.
|
protected java.util.Map<Node,Node> |
FlatteningCrawler.m_copies
A map associating original nodes to their corresponding copy.
|
protected java.util.Map<Node,Node> |
NestedNode.CopyCrawler.m_copies
A map associating original nodes to their corresponding copy.
|
protected java.util.Map<Node,Node> |
NestedNode.CopyCrawler.m_copies
A map associating original nodes to their corresponding copy.
|
protected java.util.Set<Node> |
NestedNode.CopyCrawler.m_expanded
The set of nodes that have been expanded (i.e.
|
protected java.util.Map<java.lang.Integer,Pin<? extends Node>> |
NestedNode.m_inputAssociations
A map storing associations between the node's input pins and an input
pin of some internal node.
|
protected java.util.Map<java.lang.Integer,java.util.List<Pin<? extends Node>>> |
Node.m_inputs
A map associating input pin indices with a list of output pins of other
nodes.
|
protected java.util.List<Node> |
NestedNode.m_internalNodes
The internal nodes contained within this node.
|
protected java.util.List<Node> |
NestedNode.NestedNodeCrawler.m_leaves
The list of nodes that are leaves.
|
protected java.util.Map<java.lang.Integer,Pin<? extends Node>> |
NestedNode.m_outputAssociations
A map storing associations between the node's output pins and an output
pin of some internal node.
|
protected java.util.Map<java.lang.Integer,java.util.List<Pin<? extends Node>>> |
Node.m_outputs
A map associating output pin indices with a list of input pins of other
nodes.
|
Modifier and Type | Method and Description |
---|---|
protected Node |
FlatteningCrawler.crawl(Node current,
java.util.Set<Node> visited) |
Node |
Node.duplicate() |
Node |
Node.duplicate(boolean with_state) |
Node |
NestedNode.CopyCrawler.getCopyOf(Node n) |
Node |
FlatteningCrawler.getRootCopy() |
protected Node |
FlatteningCrawler.handleNode(Node current,
java.util.Set<Node> visited) |
Modifier and Type | Method and Description |
---|---|
Pin<? extends Node> |
NestedNode.getAssociatedInput(int i)
Gets the input pin of the internal node associated to a given input pin
of the nested node.
|
Pin<? extends Node> |
NestedNode.getAssociatedOutput(int i)
Gets the output pin of the internal node associated to a given output pin
of the nested node.
|
java.util.Collection<Pin<? extends Node>> |
Connectable.getInputLinks(int index)
Gets the output pins of other nodes that are connected to a given
input pin of this node.
|
java.util.Collection<Pin<? extends Node>> |
Node.getInputLinks(int index) |
Pin<? extends Node> |
Connectable.getInputPin(int index)
Gets the node's input pin for a given index.
|
Pin<? extends Node> |
Node.getInputPin(int index) |
java.util.List<Node> |
NestedNode.NestedNodeCrawler.getLeaves()
Gets the list of visited nodes that are leaves.
|
java.util.List<Node> |
NestedNode.NestedNodeCrawler.getNodes()
Gets the list of all visited nodes.
|
java.util.Collection<Pin<? extends Node>> |
Connectable.getOutputLinks(int index)
Gets the input pins of other nodes that are connected to a given
output pin of this node.
|
java.util.List<Pin<? extends Node>> |
Node.getOutputLinks(int index) |
Pin<? extends Node> |
Connectable.getOutputPin(int index)
Gets the node's input pin for a given index.
|
Pin<? extends Node> |
Node.getOutputPin(int index) |
Modifier and Type | Method and Description |
---|---|
void |
LabelledNode.addChild(Node n)
Connects the first output pin of the current node to the first input pin
of another node.
|
void |
NestedNode.addNodes(Node... nodes)
Adds nodes to the internal nodes of this nested node.
|
static void |
NodeConnector.connect(Node n1,
int i1,
Node n2,
int i2)
Connects an output pin of a node to the input pin of another node.
|
void |
NodeConnector.connectTo(Node n1,
int i1,
Node n2,
int i2)
Connects an output pin of a node to the input pin of another node.
|
protected void |
Node.copyInto(Node n,
boolean with_state)
Copies the contents of the current node into another node instance.
|
protected Node |
FlatteningCrawler.crawl(Node current,
java.util.Set<Node> visited) |
static NestedNode |
NestedNode.createFromTree(Node root)
Creates a new nested node from a tree of connected nodes.
|
static void |
NodeConnector.cutFrom(Node n1,
int i1,
Node n2,
int i2)
Cuts the directed link between a node and another one.
|
static void |
NodeConnector.disconnect(Node n1,
int i1,
Node n2,
int i2)
Disconnects an output pin of a node to the input pin of another node.
|
void |
NodeConnector.disconnectFrom(Node n1,
int i1,
Node n2,
int i2)
Disconnects an output pin of a node to the input pin of another node.
|
Node |
NestedNode.CopyCrawler.getCopyOf(Node n) |
int |
NestedNode.getNestedInput(Node node,
int index)
Gets the nested node input to which the n-th input of an inner node
is associated with.
|
protected Node |
FlatteningCrawler.handleNode(Node current,
java.util.Set<Node> visited) |
void |
Crawler.visit(Node n)
Visits a node in the graph.
|
void |
NestedNode.CopyCrawler.visit(Node n) |
void |
NestedNode.NestedNodeCrawler.visit(Node n) |
Modifier and Type | Method and Description |
---|---|
void |
NestedNode.addNodes(java.util.Collection<? extends Node> nodes)
Adds nodes to the internal nodes of this nested node.
|
void |
Connectable.addToInput(int index,
Pin<? extends Node> pin)
Adds a node's output pin to the set of connections of this node's
input pin.
|
void |
Node.addToInput(int index,
Pin<? extends Node> pin) |
void |
Connectable.addToOutput(int index,
Pin<? extends Node> pin)
Adds a node's input pin to the set of connections of this node's
output pin.
|
void |
Node.addToOutput(int index,
Pin<? extends Node> pin) |
void |
NestedNode.associateInput(int i,
Pin<? extends Node> p)
Associates an input pin of the nested node to an input pin of one of its
internal nodes.
|
void |
NestedNode.associateOutput(int i,
Pin<? extends Node> p)
Associates an input pin of the nested node to an output pin of one of its
internal nodes.
|
protected Node |
FlatteningCrawler.crawl(Node current,
java.util.Set<Node> visited) |
protected Node |
FlatteningCrawler.handleNode(Node current,
java.util.Set<Node> visited) |
void |
Connectable.removeFromInput(int index,
Pin<? extends Node> pin)
Removes a node's output pin to the set of connections of this node's
input pin.
|
void |
Node.removeFromInput(int index,
Pin<? extends Node> pin) |
void |
Connectable.removeFromOutput(int index,
Pin<? extends Node> pin)
Removes a node's input pin to the set of connections of this node's
output pin.
|
void |
Node.removeFromOutput(int index,
Pin<? extends Node> pin) |
void |
Connectable.setToInput(int index,
Pin<? extends Node> pin)
Sets a node's output pin as the connection of this node's input
pin.
|
void |
Node.setToInput(int index,
Pin<? extends Node> pin) |
void |
Connectable.setToOutput(int index,
Pin<? extends Node> pin)
Sets a node's input pin as the connection of this node's output
pin.
|
void |
Node.setToOutput(int index,
Pin<? extends Node> pin) |
Constructor and Description |
---|
CopyCrawler(Node start,
NodeConnector connector,
boolean with_state)
Creates a new crawler.
|
Crawler(Node start)
Creates a new crawler.
|
FlatteningCrawler(Node start,
NodeConnector connector) |
FlatteningCrawler(Node start,
NodeConnector connector,
FlatteningCrawler crawler) |
NestedNodeCrawler(Node start)
Creates a new crawler.
|
Modifier and Type | Class and Description |
---|---|
class |
AndNode
Node representing a conjunction of two lineage graphs.
|
class |
OrNode
Node representing a disjunction of two lineage graphs.
|
class |
PartNode
Node whose label is a pair made of a part and an object.
|
class |
UnknownNode
A node representing an unknown lineage.
|
Modifier and Type | Method and Description |
---|---|
static Node |
GraphUtilities.flatten(Node root)
Out of a single-rooted lineage graph, creates another graph where nested
nodes are exploded.
|
static Node |
GraphUtilities.simplify(Node root)
Simplifies a single-rooted lineage graph.
|
static Node |
GraphUtilities.squash(Node root)
Out of a single-rooted lineage graph, creates another graph where only
Boolean nodes and leaves are kept.
|
protected static Node |
GraphUtilities.squash(Node root,
java.util.Set<Node> visited,
java.util.Map<Node,Node> duplicates)
Out of a single-rooted lineage graph, creates another graph where only
Boolean nodes and leaves are kept.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<Node> |
GraphUtilities.flatten(java.util.List<Node> roots)
Out of a list of lineage graph roots, creates another set of graphs where
nested nodes are exploded.
|
static java.util.List<Node> |
GraphUtilities.simplify(java.util.List<Node> roots)
Simplifies a list of lineage graphs.
|
static java.util.List<Node> |
GraphUtilities.squash(java.util.List<Node> roots)
Out of a list of lineage graphs, creates another graph where only
Boolean nodes and leaves are kept.
|
Modifier and Type | Method and Description |
---|---|
static Node |
GraphUtilities.flatten(Node root)
Out of a single-rooted lineage graph, creates another graph where nested
nodes are exploded.
|
static boolean |
GraphUtilities.isLeaf(Node n)
Determines if a node is a leaf.
|
static Node |
GraphUtilities.simplify(Node root)
Simplifies a single-rooted lineage graph.
|
static Node |
GraphUtilities.squash(Node root)
Out of a single-rooted lineage graph, creates another graph where only
Boolean nodes and leaves are kept.
|
protected static void |
GraphUtilities.squash(Node parent,
int pin_index,
Pin<? extends Node> pin,
java.util.Set<Node> visited,
java.util.Map<Node,Node> duplicates) |
protected static Node |
GraphUtilities.squash(Node root,
java.util.Set<Node> visited,
java.util.Map<Node,Node> duplicates)
Out of a single-rooted lineage graph, creates another graph where only
Boolean nodes and leaves are kept.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<Node> |
GraphUtilities.flatten(java.util.List<Node> roots)
Out of a list of lineage graph roots, creates another set of graphs where
nested nodes are exploded.
|
static java.util.List<Node> |
GraphUtilities.simplify(java.util.List<Node> roots)
Simplifies a list of lineage graphs.
|
static java.util.List<Node> |
GraphUtilities.squash(java.util.List<Node> roots)
Out of a list of lineage graphs, creates another graph where only
Boolean nodes and leaves are kept.
|
protected static void |
GraphUtilities.squash(Node parent,
int pin_index,
Pin<? extends Node> pin,
java.util.Set<Node> visited,
java.util.Map<Node,Node> duplicates) |
protected static void |
GraphUtilities.squash(Node parent,
int pin_index,
Pin<? extends Node> pin,
java.util.Set<Node> visited,
java.util.Map<Node,Node> duplicates) |
protected static void |
GraphUtilities.squash(Node parent,
int pin_index,
Pin<? extends Node> pin,
java.util.Set<Node> visited,
java.util.Map<Node,Node> duplicates) |
protected static void |
GraphUtilities.squash(Node parent,
int pin_index,
Pin<? extends Node> pin,
java.util.Set<Node> visited,
java.util.Map<Node,Node> duplicates) |
protected static Node |
GraphUtilities.squash(Node root,
java.util.Set<Node> visited,
java.util.Map<Node,Node> duplicates)
Out of a single-rooted lineage graph, creates another graph where only
Boolean nodes and leaves are kept.
|
protected static Node |
GraphUtilities.squash(Node root,
java.util.Set<Node> visited,
java.util.Map<Node,Node> duplicates)
Out of a single-rooted lineage graph, creates another graph where only
Boolean nodes and leaves are kept.
|
protected static Node |
GraphUtilities.squash(Node root,
java.util.Set<Node> visited,
java.util.Map<Node,Node> duplicates)
Out of a single-rooted lineage graph, creates another graph where only
Boolean nodes and leaves are kept.
|
Modifier and Type | Class and Description |
---|---|
class |
AtomicFunction
A self-contained computation unit that produces an array of output values
from an array of input values.
|
class |
Circuit
An object encasing a graph of connected functions and acting externally as
a single function.
|
class |
Constant
Function that has no input and returns a constant value.
|
class |
Equals
Checks the equality between two values.
|
class |
Fork
Duplicates the value on an input pin to multiple output pins.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<Node> |
LineageDotRenderer.m_expanded
The set of nodes that have been expanded (nodes that had their children
rendered).
|
protected java.util.List<Node> |
LineageDotRenderer.m_leaves
The nodes that corresponds to he leaves of the graph.
|
protected java.util.Map<Node,java.lang.String> |
LineageDotRenderer.m_nodeIds
A map associating node instances to their uniquely generated ID.
|
protected java.util.Set<Node> |
LineageDotRenderer.m_rendered
The set of nodes that have been rendered.
|
protected java.util.List<Node> |
LineageDotRenderer.m_roots
The nodes used as the starting point for the rendering.
|
Modifier and Type | Method and Description |
---|---|
static Node |
FunctionLineageGraphUtilities.simplify(Node graph)
Simplifies a lineage graph.
|
Modifier and Type | Method and Description |
---|---|
protected static Pin<? extends Node> |
Circuit.getPin(java.util.Collection<Pin<? extends Node>> pins)
Extracts the first pin obtained from a collection.
|
static java.util.List<Node> |
FunctionLineageGraphUtilities.simplify(java.util.List<Node> roots)
Simplifies a lineage graph.
|
Modifier and Type | Method and Description |
---|---|
protected static void |
FunctionLineageGraphUtilities.deleteConstantLeaves(Node n)
Cuts a node from its parents if it is a leaf corresponding to a constant.
|
protected NestedNode |
Circuit.develop(Part start,
Node subject,
NodeFactory factory)
From an output pin of an inner function, calculates the explanation and
repeats the process if any input pins that are mentioned are connected to
output pins of other functions.
|
protected void |
LineageDotRenderer.render(java.io.PrintStream ps,
Node current)
Recursive function that renders a node and then calls itself to render its
descendants.
|
protected void |
LineageDotRenderer.renderNode(java.io.PrintStream ps,
Node current)
Renders a node.
|
protected void |
LineageDotRenderer.renderTransition(java.io.PrintStream ps,
Node from,
int out_index,
Pin<? extends Node> pin)
Renders a transition between two nodes of the graph.
|
static Node |
FunctionLineageGraphUtilities.simplify(Node graph)
Simplifies a lineage graph.
|
Modifier and Type | Method and Description |
---|---|
protected static Pin<? extends Node> |
Circuit.getPin(java.util.Collection<Pin<? extends Node>> pins)
Extracts the first pin obtained from a collection.
|
protected void |
LineageDotRenderer.renderTransition(java.io.PrintStream ps,
Node from,
int out_index,
Pin<? extends Node> pin)
Renders a transition between two nodes of the graph.
|
static java.util.List<Node> |
FunctionLineageGraphUtilities.simplify(java.util.List<Node> roots)
Simplifies a lineage graph.
|
Constructor and Description |
---|
LineageDotRenderer(Node... roots)
Creates a new instance of renderer.
|
LineageDotRenderer(Node root,
java.lang.String prefix,
int nesting_level,
boolean no_captions)
Creates a new instance of renderer.
|
Constructor and Description |
---|
LineageDotRenderer(java.util.List<Node> roots)
Creates a new instance of renderer.
|
LineageDotRenderer(java.util.List<Node> roots,
java.lang.String prefix,
int nesting_level,
boolean no_captions)
Creates a new instance of renderer.
|
Modifier and Type | Class and Description |
---|---|
class |
And
Function implementing logical conjunction.
|
class |
BooleanConnective
Abstract class used as a basis for the implementation of conjunction and
disjunction.
|
class |
IfThenElse
Function with three arguments that acts as an if-then-else construct.
|
class |
Not
Implementation of logical negation.
|
class |
Or
Function implementing logical conjunction.
|
Modifier and Type | Class and Description |
---|---|
class |
Eventually
The LTL "eventually" modality.
|
class |
Globally
The LTL "globally" modality.
|
class |
Next
The LTL "next" modality.
|
class |
UnaryOperator
The base class of
Globally and Eventually . |
Modifier and Type | Class and Description |
---|---|
class |
AbsoluteValue
Calculates the absolute value of a number.
|
class |
Addition
Adds all arguments of the input.
|
class |
IsGreaterThan
Determines if a number is greater than another one.
|
class |
Multiplication
Multiplies all arguments of the input.
|
class |
NumberCast
Converts an object into a number.
|
class |
Subtraction
Subtracts from the first argument all the remaining arguments.
|
Modifier and Type | Class and Description |
---|---|
class |
InstanceOf
Function that checks if an object is an instance of a given class.
|
Modifier and Type | Class and Description |
---|---|
class |
Split
Splits a string into parts according to a regular expression.
|
Modifier and Type | Class and Description |
---|---|
class |
ElementAt
Gets an element at a given position inside a vector.
|
class |
Filter
Filters the elements of a list based on the Boolean values of another.
|
class |
GetSize
Calculates the size of the input vector.
|
class |
ParameterizedVectorFunction
A function that applies another function repeatedly on elements of an input
vector.
|
class |
VectorAnd
Calculates the conjunction of all Boolean elements in a vector.
|
class |
VectorApply
Applies a m:1 function to m-uples of elements at matching positions in
m input vectors.
|
class |
VectorBooleanConnective
A vector function that applies a Boolean operator on elements on an input
vector (made of Boolean values).
|
class |
VectorFunction
An atomic function taking as its input m vectors, and producing as its
output an arbitrary value (not necessarily a vector).
|
class |
VectorOr
Calculates the disjunction of all Boolean elements in a vector.
|
class |
VectorOutputFunction
An atomic function taking as its input a number of vectors, and producing
as its output a single vector (of possibly different size).
|
class |
VectorProduct
Calculates the product of all numerical elements in a vector.
|
class |
VectorSum
Calculates the sum of all numerical elements in a vector.
|
class |
Window
Creates an output vector by applying a function on successive "windows" of
elements in an input vector.
|
Modifier and Type | Class and Description |
---|---|
protected static class |
Triangle.AllNumbers
Determines if all three elements of of vector are positive numbers.
|
protected static class |
Triangle.AllPositive
Determines if the first three elements of a vector are positive.
|
protected static class |
Triangle.IsPositive
Function that determines if a number is positive.
|
static class |
Triangle.IsValidTriangle
Determines if a vector contains the lengths of sides of a valid triangle.
|
protected static class |
Triangle.TriangleInequality
Verifies the triangle inequality on a vector of three numbers.
|
Modifier and Type | Method and Description |
---|---|
static void |
GraphViewer.display(Node root)
Displays an explanation graph into a window.
|
static void |
GraphViewer.save(Node root,
java.lang.String filename,
boolean no_captions)
Saves a graph to a file.
|
Modifier and Type | Method and Description |
---|---|
static void |
GraphViewer.display(java.util.List<Node> roots)
Displays an explanation graph into a window.
|
static void |
GraphViewer.display(java.util.List<Node> roots,
boolean no_captions)
Displays an explanation graph into a window.
|
protected static byte[] |
GraphViewer.getGraph(java.util.List<Node> roots,
boolean no_captions)
Renders a graph, calls DOT in the background and retrieves the binary
image it produces.
|
static void |
GraphViewer.save(java.util.List<Node> roots,
java.lang.String filename)
Saves a graph to a file.
|
static void |
GraphViewer.save(java.util.List<Node> roots,
java.lang.String filename,
boolean no_captions)
Saves a graph to a file.
|
static java.lang.String |
GraphViewer.toDot(java.util.List<Node> roots,
boolean no_captions)
Renders a graph as a DOT file.
|
Copyright © Sylvain Hallé. All Rights Reserved.