Package net.hydromatic.morel.util
Utilities.
-
Interface Summary Interface Description MorelException Interface implemented by all exceptions in Morel.Ord.IntObjObjConsumer<K,V> Consumer that receives an ordinal, a key, and a value.Pair.PairWithOrdinalConsumer<K,V> Represents an operation that accepts two input arguments and an ordinal, and returns no result.Unifier.Action Called by the unifier when a Term's type becomes known.Unifier.Result Result of attempting unification.Unifier.Term Term (variable, symbol or node).Unifier.TermVisitor<R> Visitor for terms.Unifier.Tracer Called on various events during unification. -
Class Summary Class Description AbstractImmutableList<E> Base class for lists whose contents are constant after creation.ComparableSingletonList<E extends Comparable<E>> A comparable singleton list.ConsList<E> List that consists of a head element and an immutable non-empty list.Folder<E> Enable creating right-deep trees.Folder.End<E> Sub-class ofFolderthat marks the end of a list.MapList<E> Read-only list that generates elements between 0 andsize- 1 by applying a function.MartelliUnifier Unification algorithm due to Martelli, Montanari (1976) and Paterson, Wegman (1978).Ord<E> Pair of an element and an ordinal.Ord.OrdArrayList<E> List ofOrdbacked by an array of elements.Ord.OrdList<E> List ofOrdbacked by a list of elements.Ord.OrdRandomAccessList<E> List ofOrdbacked by a random-access list of elements.Pair<T1,T2> Pair of objects.Pair.AdjacentIterator<E> Iterator that returns consecutive pairs of elements from an underlying iterator.Pair.FirstAndIterator<E> Iterator that returns the first element of a collection paired with every other element.Pair.LeftIterator<L,R> Iterator that returns the left field of each pair.Pair.MutableZipList<K,V> A mutable list of pairs backed by a pair of mutable lists.Pair.RightIterator<L,R> Iterator that returns the right field of each pair.Pair.ZipIterator<L,R> Iterator that pairs elements from two iterators.Pair.ZipList<K,V> Unmodifiable list of pairs, backed by a pair of lists.RobinsonUnifier Robinson's unification algorithm.Sat Boolean satisfiability.Sat.And "And" term.Sat.Assignment Assignment of a variable to a value.Sat.Node Term that has a variable number of arguments ("and" or "or").Sat.Not "Not" term.Sat.Or "Or" term.Sat.Term Base class for all terms (variables, and, or, not).Sat.Variable Variable.Static Utilities.TailList<E> A dynamic list that reads from a given point in a backing list.ThreadLocals Utilities forThreadLocal.Tracers Implementations ofUnifier.Tracer.Tracers.NullTracer Implementation ofUnifier.Tracerthat does nothing.Tracers.PrintTracer Implementation ofUnifier.Tracerthat writes to a givenPrintWriter.Unifier Given pairs of terms, finds a substitution to minimize those pairs of terms.Unifier.Failure Result indicating that unification was not possible.Unifier.Sequence A sequence of terms.Unifier.Substitution Map from variables to terms.Unifier.SubstitutionResult The results of a successful unification.Unifier.TermTerm A pair of terms.Unifier.Variable A variable that represents a symbol or a sequence; unification's task is to find the substitutions for such variables. -
Enum Summary Enum Description Sat.Op Operator (or type of term), with its left and right precedence and print name. -
Exception Summary Exception Description Unifier.CycleException Control flow exception, thrown byUnifier.Term.checkCycle(Map, Map)if it finds a cycle in a substitution map.