Packages

p

info.kwarc.mmt.api

ontology

package ontology

This package contains a relational ontology and a query engine for it.

The main classes are: - RelationalElement defines the concepts and relation of the ontology (TBox) - RelationalManager extracts the ABox from MMT content - RelStore maintains the model of the ontology (ABox) - RelationGraphExporter allows exporting the ABox as a graph. - Query defines a query language for the ontology - Evaluator implements the query language for a given ABox. - Search maintains classes for faceted search, in particular the facet for MathWebSearch.

Source
package.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ontology
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class AddAlignments extends Extension
  2. sealed abstract class Alignment extends AnyRef
  3. case class AlignmentConcatenation(first: FormalAlignment, second: FormalAlignment) extends FormalAlignment with Product with Serializable
  4. class AlignmentsServer extends ServerExtension
  5. class Analyze extends QueryFunctionExtension

    type reconstruction of objects

  6. case class And(left: Prop, right: Prop) extends Prop with Product with Serializable

    conjunction

  7. abstract class Annotation extends AnyRef

    an annotation returned by an AnnotationProvider, to be used by e.g.

    an annotation returned by an AnnotationProvider, to be used by e.g. MMTGutterAnnotations

  8. abstract class AnnotationProvider extends Extension

    provides additional information about MMT elements (e.g., compilation warnings, refactoring suggestions, discussion pointers)

  9. case class ArgumentAlignment(from: LogicalReference, to: LogicalReference, invertible: Boolean, arguments: List[(Int, Int)]) extends FormalAlignment with Product with Serializable
  10. trait BaseType extends AnyRef

    a trait for all concrete data types that can be returned by queries; atomic types are paths and objects

  11. case class BigUnion(domain: Query, varname: LocalName, of: Query) extends Query with Product with Serializable

    union of a collection of sets indexed by a set

  12. sealed abstract class Binary extends AnyRef

    An object of type Binary represents a binary predicate between MMT paths in the MMT ontology.

    An object of type Binary represents a binary predicate between MMT paths in the MMT ontology. The semantics of these objects is given by their name

  13. abstract class BinaryQueryJudgement extends QueryJudgement
  14. case class Bound(varname: LocalName) extends Query with Product with Serializable

    bound variable represented by a info.kwarc.mmt.api.LocalName

  15. case class Choice(qs: RelationExp*) extends RelationExp with Product with Serializable

    the union of a list of relations

  16. case class Closure(of: Query) extends Query with Product with Serializable

    dependency closure of a path

  17. case class Component(of: Query, component: ComponentKey) extends Query with Product with Serializable

    component of all elements inside a query

  18. case class Comprehension(domain: Query, varname: LocalName, pred: Prop) extends Query with Product with Serializable

    comprehension subset of a set

  19. case class ConceptAlignment extends Alignment with Product with Serializable
  20. case class ConceptPair(from: ConceptReference, to: ConceptReference) extends Alignment with Product with Serializable
  21. case class ConceptReference(con: String) extends Reference with CanonicalForm[ConceptReference] with Product with Serializable

    general concepts

  22. case class CustomBinary(name: String, desc: String, backwardsDesc: String) extends Binary with Product with Serializable

    Extractor extensions should use instances of this class to extend the ontology for binary relations

  23. case class CustomUnary(name: String) extends Unary with Product with Serializable

    Extractor extensions should use instances of this class to extend the ontology for unary relations

  24. class DeclarationTreeExporter extends SimpleRelationGraphExporter
  25. class DependencyGraphExporter extends SimpleRelationGraphExporter
  26. case class DereferenceAlignment(fromP: ContentPath, toP: ContentPath, dotOperator: GlobalName) extends FormalAlignment with Product with Serializable

    aligns a global function with a method that is accessed via projection on the first argument

  27. case class Difference(of: Query, without: Query) extends Query with Product with Serializable

    difference of sets

  28. sealed abstract class Edge extends AnyRef

    types of edges in a theory multigraph; edges may have an id; there may be at most one edge without id between two nodes

  29. case class EdgeTo(to: Path, edge: Edge, backwards: Boolean = false) extends Product with Serializable

    an edge together with its end point, optionally may be backwards

  30. case class ElemResult(t: List[BaseType]) extends QueryResult with Product with Serializable

    The results of an Element Query: A Tuple of [BaseType]s.

    The results of an Element Query: A Tuple of [BaseType]s.

    t

    Tuple of BaseType Results

  31. case class Element(q: Query, index: Int) extends Query with Product with Serializable

    takes a specific element from a querySet (negative indexes work also)

  32. case class ElementQuery(tp: List[QueryBaseType]) extends QueryType with Product with Serializable

    a single tuple of base types

  33. case class Equal(left: Query, right: Query) extends Prop with Product with Serializable

    equality of elements

  34. case class Equals(varname: LocalName, left: Term, right: Term) extends BinaryQueryJudgement with Product with Serializable

    semantic equality between two terms

  35. case class Forall(domain: Query, varname: LocalName, scope: Prop) extends Prop with Product with Serializable

    universal quantification over a set

  36. sealed abstract class FormalAlignment extends URIAlignment
  37. case class HasType(mustHave: Option[List[Unary]], mustNotHave: List[Unary]) extends RelationExp with Product with Serializable

    the reflexive relation restricted to a set of paths This permits the restriction of a result set to, e.g., elements of a certain type.

  38. case class Holds(about: Query, j: QueryJudgement) extends Prop with Product with Serializable

    judgement that holds for a single element

  39. case class I(q: Query, hint: Option[String]) extends Query with Product with Serializable

    isolated sub-query of a query.

    isolated sub-query of a query. Carries an optional hint on how to evaluate the query

  40. case class Individual(path: Path, tp: Unary) extends RelationalElement with Product with Serializable

    An object of type Individual represents a unary predicate in the ABox.

  41. class Infer extends QueryFunctionExtension

    type inference relative to a theory

  42. case class InformalAlignment(from: URIReference, to: URIReference) extends URIAlignment with Product with Serializable
  43. case class Intersection(left: Query, right: Query) extends Query with Product with Serializable

    intersection of sets

  44. case class IsA(e: Query, t: Unary) extends Prop with Product with Serializable

    typing relation between a path and a concept of the MMT ontology

  45. case class IsEmpty(r: Query) extends Prop with Product with Serializable

    emptiness of a set

  46. case class IsIn(elem: Query, tp: Query) extends Prop with Product with Serializable

    element relation between elements and sets

  47. case class Let(varname: LocalName, value: Query, in: Query) extends Query with Product with Serializable

    let binder

  48. case class Literal[T <: BaseType](literal: T) extends Query with Product with Serializable

    literal

  49. case class Literals[T <: BaseType](literals: T*) extends Query with Product with Serializable

    set of literals

  50. case class LogicalReference(mmturi: ContentPath) extends URIReference with Product with Serializable

    MMT objects

  51. case class Mapping(domain: Query, varname: LocalName, function: Term) extends Query with Product with Serializable

    apply a term to an existing set

  52. class MathWebSearch extends Extension

    abstraction that wraps around a remote MathWebSearch server

  53. case class MathWebSearchQuery(pattern: TermPattern, answsize: Int = 1000, limitmin: Int = 0) extends Product with Serializable

    a query to be sent to a MathWebSearch

  54. case class Measure(value: Int) extends Product with Serializable

    similarity measure; for now integers

  55. case class Not(arg: Prop) extends Prop with Product with Serializable

    negation

  56. class Parse extends QueryFunctionExtension

    parsing of strings into objects

  57. class PathGraphExporter extends RelationGraphExporter
  58. case class PathPattern(basePattern: Option[String], modulePattern: Option[String], namePattern: Option[String]) extends Product with Serializable

    regular expressions to be matched against components of a Path

  59. case class Paths(tp: Unary) extends Query with Product with Serializable

    the set of all URIs of a certain concept in the MMT ontology

  60. case class PhysicalReference(url: URI) extends URIReference with Product with Serializable

    external objects

  61. case class PrefixOf(short: Query, long: Query) extends Prop with Product with Serializable

    ancestor relation between paths

  62. class Present extends QueryFunctionExtension

    XML rendering of objects

  63. class PresentDecl extends QueryFunctionExtension

    XML rendering of declarations

  64. case class Projection(of: Query, index: Int) extends Query with Product with Serializable

    projection

    projection

    index

    the component to project out (starting from 1)

  65. sealed abstract class Prop extends AnyRef

    propositions

  66. sealed abstract class Query extends AnyRef

    the expressions of the query language

  67. sealed abstract class QueryBaseType extends AnyRef

    QueryBaseType = Path | Obj | XML | String

  68. class QueryEvaluator extends AnyRef

    evaluates a query expression to a query result

  69. abstract class QueryExtension extends Extension

    Extension that allow for the evaluation of (a subset of) queries

  70. case class QueryFunctionApply(function: QueryFunctionExtension, argument: Query, params: List[String]) extends Query with Product with Serializable

    query that applies an atomic function

  71. abstract class QueryFunctionExtension extends QueryExtension

    A QueryFunctionExtension provides the syntax and and semantics for an atomic function of the QMT query language

    A QueryFunctionExtension provides the syntax and and semantics for an atomic function of the QMT query language

    All functions are unary from one BaseType to another. All are actually families of functions, parametrized by an MPath.

  72. sealed abstract class QueryJudgement extends AnyRef

    A Judgement that MMT evaluates in a dynamic fashion at runtime.

    A Judgement that MMT evaluates in a dynamic fashion at runtime. Receives a single GlobalName as an argument

  73. sealed abstract class QueryResult extends AnyRef

    Wrapper type for the result of a query

  74. sealed abstract class QueryType extends AnyRef

    The different types of return Values of Queries

  75. sealed abstract class Reference extends AnyRef

    any named object that can be subject to alignment

  76. class RelStore extends RelStoreStatistics

    An ABoxStore stores the abox of the loaded elements with respect to the MMT ontology.

    An ABoxStore stores the abox of the loaded elements with respect to the MMT ontology.

    Triples (subject, binary, object) are hashed three ways so that for any two components the set of third components can be retrieved efficiently.

    Use TheoryGraph for theory graph-level querying

  77. trait RelStoreStatistics extends AnyRef

    generates statistics for the RelStore

  78. case class Related(to: Query, by: RelationExp) extends Query with Product with Serializable

    the set of all elements related to a certain path by a certain relation

  79. case class Relation(dep: Binary, subj: Path, obj: Path) extends RelationalElement with Product with Serializable

    An object of type Relation represents a binary predicate in the ABox.

    An object of type Relation represents a binary predicate in the ABox. The path of a Relation is always the knowledge item reading which produced the Relation.

  80. sealed abstract class RelationExp extends AnyRef

    binary relations between paths, i.e., relation in the MMT ontology

    binary relations between paths, i.e., relation in the MMT ontology

    The semantics of a RelationExp is a binary relation on Paths with the usual operations for the calculus of binary endorelations. For example,

    val relstore:RelStore
    val doc: DPath
    val deps = relstore.querySet(doc, +Declares * HasType(IsTheory) * (Imports | Reflexive) * -Declares)

    could be used as a dependency relation between documents.

  81. abstract class RelationGraphExporter extends BuildTarget with StructurePresenter

    builds a graph from relational and then calls dot to produce an svg file

  82. abstract class RelationalElement extends AnyRef

    A RelationalElement is any element that is used in the relational representation of MMT content.

    A RelationalElement is any element that is used in the relational representation of MMT content. These include the unary and binary predicates occurring in an MMT ABox. They do not correspond to XML elements in an OMDoc element and thus do not extend StructuralElement.

  83. abstract class RelationalExtractor extends Extension

    interface of any class that can be used by the RelationalManager to build the Abox from MMT content.

  84. class RelationalManager extends AnyRef
  85. class RelationalReader extends ArchiveChangeListener

    a change listener that guarantees that relational is read for all archives

  86. class ResultSet extends HashSet[List[BaseType]]
  87. class Search extends AnyRef

    an implementation of a search algorithm that calls MathWebSearch and filters the results

  88. case class SearchQuery(pp: PathPattern, comps: List[ComponentKey], pattern: Option[TermPattern]) extends Product with Serializable

    a query that can be sent to Search

  89. case class SearchResult(cpath: CPath, pos: Position, term: Option[Term]) extends Product with Serializable

    a result returned by Search or MathWebSearch

  90. case class Sequence(qs: RelationExp*) extends RelationExp with Product with Serializable

    the composition of a list of relations

  91. case class SetQuery(tp: List[QueryBaseType]) extends QueryType with Product with Serializable

    a set of tuples

  92. case class SetResult(s: HashSet[ElemResult]) extends QueryResult with Product with Serializable

    The result of a Set Query; A set of ElementResults.

    The result of a Set Query; A set of ElementResults.

    s

    Set of ElemResults

  93. class Similarity extends AnyRef
  94. case class SimpleAlignment(from: LogicalReference, to: LogicalReference, invertible: Boolean) extends FormalAlignment with Product with Serializable
  95. class SimpleRelationGraphExporter extends RelationGraphExporter

    builds a graph containing all nodes and edges of the types

  96. class Simplify extends QueryFunctionExtension

    simplification of objects

  97. case class Singleton(e: Query) extends Query with Product with Serializable

    singleton sets

  98. case class Slice(q: Query, from: Option[Int], to: Option[Int]) extends Query with Product with Serializable

    take a subset of the query

  99. sealed abstract class StatEntryType extends AnyRef

    the type of a single statistics entry

  100. sealed abstract class StatPrefixType extends AnyRef

    the overall type of statistics generated

  101. case class StatisticEntry(stat: StatEntryType, n: Int) extends Product with Serializable

    a single generated statistics entry

  102. case class Statistics(entries: Map[StatPrefixType, List[StatisticEntry]]) extends Product with Serializable

    statistics that are being returned

  103. class StatisticsExporter extends BuildTarget with Exporter
  104. case class StringValue(string: String) extends BaseType with Product with Serializable
  105. case class StructureEdge(id: Path) extends Edge with Product with Serializable

    named import

  106. case class SubObject(of: Query, position: Position) extends Query with Product with Serializable

    subobject of an object at a certain position

  107. case class TermPattern(qvars: Context, query: Term) extends Product with Serializable

    a pattern to be matched against a collection of terms, e.g., via MathWebSearch

  108. class TheoryGraph extends AnyRef

    This class adds advanced queries on top of a RelStore that expose the theory graph structure

  109. class TheoryGraphExporter extends RelationGraphExporter

    uses ontology.TheoryGraphFragment to produce a dot file and then calls dot to produce an svg file

  110. class TheoryGraphFragment extends AnyRef

    This class provides functions for rendering a theory graph fragment in the gexf and dot graph formats.

  111. case class ToObject(dep: Binary) extends RelationExp with Product with Serializable

    base case: an atomic binary relation

  112. case class ToSubject(dep: Binary) extends RelationExp with Product with Serializable

    base case: the inverse of an atomic binary relation

  113. case class Transitive(q: RelationExp) extends RelationExp with Product with Serializable

    the transitive closure of a relation

  114. case class Tuple(components: List[Query]) extends Query with Product with Serializable

    tupling

  115. case class Types(varname: LocalName, left: Term, right: Term) extends BinaryQueryJudgement with Product with Serializable

    semantic type of a term

  116. sealed abstract class URIAlignment extends Alignment
  117. sealed abstract class URIReference extends Reference

    objects that have URIs

  118. sealed abstract class Unary extends AnyRef

    An object of type Unary represents a unary predicate on MMT paths in the MMT ontology.

    An object of type Unary represents a unary predicate on MMT paths in the MMT ontology. The semantics of these objects is given by their name

  119. case class Union(left: Query, right: Query) extends Query with Product with Serializable

    union of sets

  120. case class ViewEdge(id: Path) extends Edge with Product with Serializable

    named view

  121. case class XMLValue(node: Node) extends BaseType with Product with Serializable

Value Members

  1. object AlignmentPrefix extends StatPrefixType with Product with Serializable
  2. object AlignmentsServer
  3. object AnyMorphismEntry extends StatEntryType with Product with Serializable
  4. object AnyMorphismPrefix extends StatPrefixType with Product with Serializable
  5. object AnyOtherEntry extends StatEntryType with Product with Serializable
  6. object ArgumentAlignment extends Serializable
  7. object BaseType
  8. object Binary
  9. object ConceptAlignment extends Serializable
  10. object ConceptPair extends Serializable
  11. object DataConstructorEntry extends StatEntryType with Product with Serializable
  12. object DatatypeConstructorEntry extends StatEntryType with Product with Serializable
  13. object Declares extends Binary with Product with Serializable
  14. object DependsOn extends Binary with Product with Serializable
  15. object DocumentEntry extends StatEntryType with Product with Serializable
  16. object ElementQuery extends Serializable
  17. object ElementQuery1

    a single basetype

  18. object Exists

    existential quantification over a set

  19. object ExplicitMorphismEntry extends StatEntryType with Product with Serializable
  20. object ExplicitMorphismPrefix extends StatPrefixType with Product with Serializable
  21. object HasCodomain extends Binary with Product with Serializable
  22. object HasDomain extends Binary with Product with Serializable
  23. object HasMeta extends Binary with Product with Serializable
  24. object HasType extends Serializable
  25. object HasViewFrom extends Binary with Product with Serializable
  26. object HighUniverseEntry extends StatEntryType with Product with Serializable
  27. object IncludeEdge extends Edge with Product with Serializable

    inclusion edge

  28. object Includes extends Binary with Product with Serializable
  29. object InformalAlignment extends Serializable
  30. object IsAliasFor extends Binary with Product with Serializable
  31. object IsAlignedWith extends Binary with Product with Serializable
  32. object IsConAss extends Unary with Product with Serializable
  33. object IsConstant extends Unary with Product with Serializable
  34. object IsDataConstructor extends Unary with Product with Serializable
  35. object IsDatatypeConstructor extends Unary with Product with Serializable
  36. object IsDerivedDeclaration extends Unary with Product with Serializable
  37. object IsDocument extends Unary with Product with Serializable
  38. object IsHighUniverse extends Unary with Product with Serializable
  39. object IsImplicitly extends Binary with Product with Serializable
  40. object IsInstance extends Unary with Product with Serializable
  41. object IsInstanceOf extends Binary with Product with Serializable
  42. object IsJudgementConstructor extends Unary with Product with Serializable
  43. object IsNotation extends Unary with Product with Serializable
  44. object IsPattern extends Unary with Product with Serializable
  45. object IsRule extends Unary with Product with Serializable
  46. object IsStrAss extends Unary with Product with Serializable
  47. object IsStructure extends Unary with Product with Serializable
  48. object IsTheory extends Unary with Product with Serializable
  49. object IsUntypedConstant extends Unary with Product with Serializable
  50. object IsView extends Unary with Product with Serializable
  51. object JudgementConstructorEntry extends StatEntryType with Product with Serializable
  52. object MMTExtractor extends RelationalExtractor

    The Extractor produces the declaration-level relational representation of a StructuralElement

  53. object MaltypedConstantEntry extends StatEntryType with Product with Serializable
  54. object MetaEdge extends Edge with Product with Serializable

    meta-theory edge

  55. object NoPrefix extends StatPrefixType with Product with Serializable
  56. object ObjType extends QueryBaseType with Product with Serializable
  57. object Or

    disjunction

  58. object PathType extends QueryBaseType with Product with Serializable
  59. object PatternEntry extends StatEntryType with Product with Serializable
  60. object Prop
  61. object QMTBinaries
  62. object QMTJudgements
  63. object QMTPaths
  64. object QMTProp
  65. object QMTQuery
  66. object QMTRelationExp
  67. object QMTTypes
  68. object QMTUnaries
  69. object Query
  70. object QueryChecker
  71. object QueryEvaluator
  72. object QueryJudgement
  73. object QueryResultConversion
  74. object QueryType
  75. object QueryTypeConversion

    implicit conversions from / to Query types

  76. object RefersTo extends Binary with Product with Serializable
  77. object Reflexive extends RelationExp with Product with Serializable

    the reflexive relation

  78. object RelationExp

    helper object for relation expressions

  79. object ResultSet extends Serializable
  80. object RuleEntry extends StatEntryType with Product with Serializable
  81. object SetQuery extends Serializable
  82. object SetQuery1

    a set of single base types

  83. object SimpleAlignment extends Serializable
  84. object StatEntryType
  85. object StatPrefixType
  86. object StringType extends QueryBaseType with Product with Serializable
  87. object StructureEntry extends StatEntryType with Product with Serializable
  88. object Symmetric

    the symmetric closure of a relation

  89. object TermPattern extends Serializable
  90. object TheoryEntry extends StatEntryType with Product with Serializable
  91. object TypedConstantEntry extends StatEntryType with Product with Serializable
  92. object Unary
  93. object UntypedConstantEntry extends StatEntryType with Product with Serializable
  94. object ViewEntry extends StatEntryType with Product with Serializable
  95. object XMLType extends QueryBaseType with Product with Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped