Packages

  • package root
    Definition Classes
    root
  • package info
    Definition Classes
    root
  • package kwarc
    Definition Classes
    info
  • package mmt
    Definition Classes
    kwarc
  • package api

    This is the main package of the MMT API.

    This is the main package of the MMT API.

    It holds subpackages for all data structures, data containers, and the central algorithms and services.

    Classes directly defined in the package

    Some minor classes that are used throughout MMT are defined in this package, in particular:

    • MMT URIs in the class Path and Namespace
    • processing and content errors in the class Error

    The package also contains root classes for certain types that are subclassed throughout the package. Most importantly:

    • StructuralElement: structure-level (= named) parts in the data structures for the MMT language: documents, theories, constants, ...
    • MMTTask: tasks for a single object: parsing, checking, ...
    • Rule: object-level part of the MMT language that is written in Scala

    Subpackages

    Data structures for the MMT language

    The data structures for the MMT languages are defined in 4 packages corresponding to the 4 levels: - documents: Documents and all other NarrativeElements - modules: Modules (= the toplevel declarations), in particular Theorys and Views - symbols: all Declarations inside modules, in particular Constants - objects: all anonymous Objects (e.g., formulas, functions, etc.), in particular Contexts and Terms

    The former 3 levels are jointly called 'structural' levels. All elements subclass StructuralElement, have an MMT URI, and carry an MMT URI referring to their parent in the MMT abstract syntax tree.

    Structural elements are extensible (via DerivedModules and DerivedDeclarations), and the package patterns defines declaration patterns as a built-in extension.

    All structural elements are mutable and implement the ContainerElement interface for changing their children. Objects, by contrast, are represented as immutable inductive types.(except for carrying metadata.Metadata and objects.ClientProperties). The boundary between structural elements and objects is mediated by ComponentContainers: these are mutable, owned by structural elements, and maintain objects.

    A few auxiliary data structures shifted to separate packages: - opaque: external (i.e., informal, computation) content - informal: partially outdated informal data structures - metadata: metadata annotations to all structural elements or objects

    The MMT main class and its internal state

    The package frontend contains the class Controller, which owns all state relevant for running MMT. Typically, each application creates a single instance of this class. The package also defines several other essential classes, most importantly MMT's extension (=plug-in, add-on) interfaces via the Extension class.

    The package libraries maintains the instances of MMT language data structures, in particular the Library class. Controller owns a Library, which stores all structural elements that have been loaded into memory.

    User interfaces

    The package frontend also contains the main executable classes, in particular the Shell class.

    The package gui collects all classes for building graphical user interfaces. This includes auxiliary classes for use in IDE plugins.

    The package web collects all classes for the HTTP interface of MMT.

    Physical storage of the MMT language files

    The package archives defines MMT Archives (= projects) as well as classes for building and working with archives. The latter include in particular the BuildManager and BuildTarget. Build targets include Importers and [Exporter]]s that translate between MMT and other formats.

    The package backend defines classes for maintaining archives and translating between the MMT URIs of structural elements and their physical storage locations.

    The central algorithms for processing MMT content

    The processing model of MMT consists of several major algorithms. - parser: read strings into MMT data structures - checking: check and refine MMT data structures - uom: pure computation on MMT data structures - proving: theorem proving on MMT data structures (in very early state)) - execution: imperative computation (in very, very early state) - presentation: rendering MMT data structures in user-facing formats (including HTML+presentation MathML)

    All algorithms are defined in Extensions coupled with default implementations. Moreover, all algorithms are split into two separate levels, one for structural elements and objects. See LeveledExtension.

    The package notations maintains the common code for parsing and presentation.

    The package valuebases maintains mathematical databases as a part of MMT.

    Other algorithms on the MMT data structures

    The package ontology contains a relational, semantic web-style ontology and query engine for it.

    The package moc contains change management.

    The package refactoring contains refactoring principles.

    General purpose utility functions

    The package utils defines general purpose APIs for files, URIs, HTML building, etc.

    Definition Classes
    mmt
  • package archives

    This package holds all classes related to MMT Archives (= project).

    This package holds all classes related to MMT Archives (= project).

    The BuildManager allows defining BuildTargets to run on archives, including in particular Importers and Exporters.

    Most archives are stored in hub of git repositories such as and MathHub or GitHub. Such hubs are represented by the class LMHHub, which allows for cloning, etc. archives.

    The list of currently open archives (from which MMT will load content if needed) is maintained by the backend.Backend.

    Definition Classes
    api
  • package backend

    This package maintains the interface between MMT content in persistent physical storage and MMT content loaded into memory.

    This package maintains the interface between MMT content in persistent physical storage and MMT content loaded into memory.

    The class Storage is the interface for individual physical storage containers. Most of the time this corresponds to a folder containing an archives.Archive.

    Content is usually stored in OMDoc XML format, which is parsed by the XMLStreamer.

    The class Backend maintains the registered storages and performs conversion between logical MMT URIs and physical locations.

    The frontend.Controller owns an instance of Backend. Any referenced MMT URI is lazily and transparently loaded from the backend into memory and unloaded if MMT runs out of memory.

    Definition Classes
    api
  • package checking

    The algorithm for checking MMT content.

    The algorithm for checking MMT content. See api for an overview of the algorithms.

    The main interfaces are - Checker: the main interface for checkers (combining a structure and an object checker) - StructureChecker: checking structural elements - ObjectChecker: checking objects

    The main implementations are - MMTStructureChecker for structural elements - RuleBasedChecker for objects

    The latter creates a Solver for each judgment, which perform type reconstruction.

    Structure checking is not extensible except through DerivedElements. Object checking is extensible through Rules.

    Definition Classes
    api
  • AbbreviationRuleGenerator
  • ApplicableUnder
  • BranchInfo
  • Branchpoint
  • Checker
  • CheckingCallback
  • CheckingEnvironment
  • CheckingResult
  • CheckingRule
  • CheckingUnit
  • Comment
  • ComputationRule
  • CongruenceRule
  • Continue
  • Contravariant
  • Covariant
  • DelarativeVarianceRule
  • DelayedConstraint
  • DelayedInference
  • DelayedJudgement
  • Disambiguation
  • DryRunResult
  • EliminationRule
  • Expectation
  • ExtendedCheckingEnvironment
  • ExtensionalityRule
  • FormationRule
  • ForwardSolutionRule
  • History
  • HistoryEntry
  • Hole
  • HoleTerm
  • Ignorevariant
  • IndentedHistoryEntry
  • InferAmbiguous
  • InferenceAndTypingRule
  • InferenceRule
  • InferredType
  • InhabitableRule
  • Interpreter
  • IntroductionRule
  • Invariant
  • MMTStructureChecker
  • MaytriggerBacktrack
  • MightFail
  • NoHistory
  • NullChecker
  • ObjectChecker
  • OneStepInterpreter
  • RelationHandler
  • RuleBasedChecker
  • SingleTermBasedCheckingRule
  • SolutionRule
  • Solver
  • SolverAlgorithms
  • SolverError
  • Stability
  • StructureChecker
  • SubtypingRule
  • Success
  • SupertypeRule
  • TermBasedEqualityRule
  • TermHeadBasedEqualityRule
  • TheoryExpRule
  • ThrowableDryRunResult
  • TwoStepInterpreter
  • TypeBasedEqualityRule
  • TypeBasedSolutionRule
  • TypeBound
  • TypeCoercionRule
  • TypeSolutionRule
  • TypingRule
  • UnaryTermRule
  • UncheckedElement
  • UniverseRule
  • ValueSolutionRule
  • Variance
  • VarianceRule
  • WouldFail
  • package documents

    NarrativeElements are all elements that do not have a semantics of their own.

    NarrativeElements are all elements that do not have a semantics of their own.

    The most important case are Documents. Inside, documents a few other other documents may occur.

    Definition Classes
    api
  • package execution

    The algorithm for imperatively executing MMT content.

    The algorithm for imperatively executing MMT content. This is currently very young and immature.

    See api for an overview of the algorithms.

    Definition Classes
    api
  • package frontend

    This package defines several central classes: - Controller is the main MMT class.

    This package defines several central classes: - Controller is the main MMT class. - Shell is the main executable (which will create one controller). - MMTConfig is the MMT configuration data structure. A controller maintains one configuration. - Extension is the addon/plugin interface of MMT. Every extension has access to one controller instance. - Report handles logging, and every instance of Logger has access to a report instance.

    Definition Classes
    api
  • package gui

    GUIPanel and [GUIFrame]] maintain a swing-based graphical interface to the frontend.Controller and its children.

    GUIPanel and [GUIFrame]] maintain a swing-based graphical interface to the frontend.Controller and its children.

    Definition Classes
    api
  • package informal
    Definition Classes
    api
  • package libraries

    Library maintains the structural elements that have been loaded into memory.

    Library maintains the structural elements that have been loaded into memory. That includes the theory diagram and all documents.

    ImplicitGraph maintains the commutative sub-diagram of implicit morphisms.

    Definition Classes
    api
  • package metadata

    MetaDatum is the stateless class that represents metadata items.

    MetaDatum is the stateless class that represents metadata items.

    MetaData statefully maintains a set of MetaDatums.

    Elements that have metadata inherit from HasMetaData.

    Linker and Tagger make setting and getting metadata easier.

    Definition Classes
    api
  • package moc

    Change is the main class statelessly representing differences/changes.

    Change is the main class statelessly representing differences/changes.

    Differ is a differ for MMT data structures.

    Definition Classes
    api
  • package modules

    MMT Modules, i.e., Theorys and Views.

    MMT Modules, i.e., Theorys and Views.

    Link unifies Views and symbols.Structures, the two kinds of atomic theory morphisms.

    ModuleOrLink unifies the two. That class defines most of the state of a module, in particular the body.

    Definition Classes
    api
  • package notations

    This package maintains the common data structures for parsing and presentation.

    This package maintains the common data structures for parsing and presentation.

    TextNotation is the main notation class. It is similar to MMT objects, in particular it is stateless.

    NotationContainer statefully maintains the notations assigned to a declaration. These are owned by StructuralElements to carry notations, akin to how they carry type/definition.

    Definition Classes
    api
  • package objects

    MMT objects are

    MMT objects are

    AnonymousDiagram, AnonymousTheory, and AnonymousMorphism represent anonymous counterparts to libraries.Library modules.Module}.

    This package also contains various auxiliary classes: - Position defines paths within objects - SubstitutionApplier is the main interface for substitution strategies. - Matcher is a simple matcher.

    Definition Classes
    api
  • package ontology

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

    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.

    Definition Classes
    api
  • package opaque

    Informal or unknown content that MMT does not process.

    Informal or unknown content that MMT does not process. The main classes are - OpaqueElement: such content - OpaqueElementInterpreter the abstract interface for extensions that interpret it

    Definition Classes
    api
  • package parser

    The algorithm for parsing MMT content (strings to MMT data structures).

    The algorithm for parsing MMT content (strings to MMT data structures). See api for an overview of the algorithms.

    The main interfaces are - Parser: the main interface for parser (combining a structure and an object parser) - StructureParser: parsing structural elements - ObjectParser: parsing objects

    The main implementations are - KeywordBasedParser for structural elements in .mmt files - NotationBasedParser for objects

    The latter creates a Scanner for each string, which applies notations to parse user-defined mixifx syntax.

    Structure parsing is extensible using ParserExtensions. Object parsing is extensible using notations or LexerExtensions.

    Definition Classes
    api
  • package patterns

    Declaration patterns in the sense of Horozal's PhD thesis, realized as two special cases of structural features: - Pattern for the patterns (elaborates to nothing) - Instance for the instances of patterns (elaborates by looking up the pattern)

    Declaration patterns in the sense of Horozal's PhD thesis, realized as two special cases of structural features: - Pattern for the patterns (elaborates to nothing) - Instance for the instances of patterns (elaborates by looking up the pattern)

    Definition Classes
    api
  • package presentation

    The algorithm for presenting MMT content (data structures to user-facing formats).

    The algorithm for presenting MMT content (data structures to user-facing formats). See api for an overview of the algorithms.

    The main interfaces are - Presenter: the main interface for parser (combining a structure and an object parser) - StructurePresenter: presenting structural elements - ObjectPresenter: presenting objects

    The main implementations are (in each case for structural elements and objects) - for OMDoc XML: OMDocPresenter resp. OpenMathPresenter - for plain strings (using the toString methods): TextPresenter resp. ObjectTextPresenter - for nice human-oriented strings: MMTStructurePresenter resp. NotationBasedParser - for HTML: HTMLPresenter resp. MathMLPresenter

    Definition Classes
    api
  • package proving

    The algorithm for proving theorems about MMT content.

    The algorithm for proving theorems about MMT content. This is very premature and experimental.

    See api for an overview of the algorithms.

    The main interfaces are - Prover: object level proving

    Structure level proving does not exist yet.

    The main implementations are - RuleBasedProver for object-level proving

    The latter creates a Searcher for each proving task, which applies search rules to find MMT objects.

    Definition Classes
    api
  • package refactoring
    Definition Classes
    api
  • package symbols

    MMT Declarations are the elements of Modules.

    MMT Declarations are the elements of Modules. The kinds of declarations are documented at Declaration.

    ObjContainer are owned by structural elements, in particular by declarations, to store objects.

    Definition Classes
    api
  • package uom

    The algorithm for immutably computing with MMT content, i.e., simplification (strings to MMT data structures).

    Simplification

    The algorithm for immutably computing with MMT content, i.e., simplification (strings to MMT data structures). See api for an overview of the algorithms.

    The main interfaces are - Simplifier: the main interface for parser (combining a structure and an object simplifier) - StructureSimplifier: simplifying structural elements - ObjectSimplifier: simplifying objects

    The main implementations are - ElaborationBasedSimplifier for structural elements - RuleBasedSimplifier for objects

    Structure simplification is extensible using derived elements. Object simplification is extensible using rules.

    Literals and semantic objects

    This package also contains the classes for using Scala objects as MMT literals.

    SemanticType defines types as sets of Scala objects. SemanticValue defines a distinguished element of such a type. SemanitcOperator defines functions on such types as Scala functions.

    Literals and operations on them are injected into the MMT language by declaring RealizedValue, RealizedType and RealizedOperator rules, which tie a syntactic type/operator (i.e., an MMT term) to a semantic counterpart.

    StandardLiterals defines semantic types for the most important types.

    RealizedTheory represents an MMT theory programmed in Scala, usually as a Scala class.

    Scala companion objects for MMT theories

    TheoryScala and ConstantScala are auxiliary classes that are useful when implementing MMT rules or other logic-specific algorithms.

    Definition Classes
    api
  • package utils

    This package defines various MMT-independent high-level APIs.

    This package defines various MMT-independent high-level APIs. Various basic functions are declared directly in this package object in order to be easily available.

    Most other files in this package are self-contained and independent of the rest of MMT and each other. We describe them in groups below.

    Data structures*

    - Union disjoint union of Scala types - MyList extensions of Scala's lists (via implicit conversions) - HashRelation, HashMapToSet, and HashEquality: hash-related data structures for - While while loops that allow for break and continue

    General purpose utilities

    - Killable tasks that can be notified that they should be canceled. In particular, MMTTasks can be aborted without risking an inconsistent state. - Unparsed for simple parsing of strings - ScalaTo serialization helpers for Scala objects - ValueCache factory methods that introduce structure sharing by resuing previous pointers - XMLToScala framework for conveniently turning a set of case classes into an XML parser for the corresponding schema

    Wrappers for low-level APIs

    MMT provides various APIs that extend or simplify APIs provided Java or Scala: - File file paths and interacting with files - URI URIs - xml various helper function for working with XML and dereferencing URLs (not really a wrapper but fits best here) - ShellCommand commands executed on the system shell

    APIs for external languages

    - Dot the dot languages for graph layouting - JSON the JSON language - HTML API for building HTML pages programmatically

    Definition Classes
    api
  • package valuebases

    This package maintains databases of cocnrete mathematical objects.

    This package maintains databases of cocnrete mathematical objects.

    Concrete objects are special MMT Terms that can be represented as concrete database objects (e.g., JSON). The connection between the two is mediated by Codecs and CodecOerator. The codec-based translation is implemented in the Coder.

    Definition Classes
    api
  • package web

    Server maintains the HTTP interface of MMT.

    Server maintains the HTTP interface of MMT. The server is owned by the frontend.Controller.

    It can be customized by ServerExtensions.

    The REPLServer maintains a set of independent REPL loops for MMT content.

    Definition Classes
    api
p

info.kwarc.mmt.api

checking

package checking

The algorithm for checking MMT content. See api for an overview of the algorithms.

The main interfaces are - Checker: the main interface for checkers (combining a structure and an object checker) - StructureChecker: checking structural elements - ObjectChecker: checking objects

The main implementations are - MMTStructureChecker for structural elements - RuleBasedChecker for objects

The latter creates a Solver for each judgment, which perform type reconstruction.

Structure checking is not extensible except through DerivedElements. Object checking is extensible through Rules.

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

Type Members

  1. class AbbreviationRuleGenerator extends ChangeListener
  2. trait ApplicableUnder extends SingleTermBasedCheckingRule

    used to change the 'applicable' method when the head symbol of the rule occurs under some HOAS apply operators

  3. class BranchInfo extends AnyRef
  4. class Branchpoint extends AnyRef

    experimental backtracking support in Solver

  5. abstract class Checker extends StructureChecker with ObjectChecker with LeveledExtension

    the designated super class for all checkers

  6. trait CheckingCallback extends AnyRef

    passed to Rules to permit callbacks to the Solver

  7. class CheckingEnvironment extends AnyRef
  8. case class CheckingResult(solved: Boolean, solution: Option[Context], term: Term) extends Product with Serializable

    A checking result encapsulates all information returned by an ObjectChecker.

    A checking result encapsulates all information returned by an ObjectChecker.

    See CheckingUnit.

    solved

    true if term was checked successfully

    solution

    the substitution for the unknown context (possibly partial)

    term

    the checked version of the term (possibly approximate if check failed)

  9. trait CheckingRule extends SyntaxDrivenRule

    super class of all rules primarily used by the Solver

  10. case class CheckingUnit(component: Option[CPath], context: Context, unknowns: Context, judgement: WFJudgement) extends MMTTask with Product with Serializable

    A checking unit encapsulates the proof obligations produced by a StructureChecker and passed on to an ObjectChecker.

    A checking unit encapsulates the proof obligations produced by a StructureChecker and passed on to an ObjectChecker.

    Typically, each checking unit checks a single term that is part of a WFJudgement, i.e., the other parts of the judgement are assumed to be valid.

    component

    the term component that is validated, e.g., namespace?theory?symbol?type

    context

    the constant context

    unknowns

    the unknown context

    judgement

    the typing judgement to check A checking unit involves three contexts, which must be separated because they correspond to a quantifier alternation. The constant context is the (universally quantified) global context that does not change during checking. It includes in particular the theory relative to which a unit is formed. The unknown context is the (existentially quantified) context of unknowns that are to be solved during checking. The variable context is the context that arises from traversing binders during checking. It changes during checking and is therefore stored within the judgement.

  11. case class Comment(text: () ⇒ String) extends HistoryEntry with Product with Serializable

    a HistoryEntry that consists of a string, meant as a log or error message

  12. abstract class ComputationRule extends SingleTermBasedCheckingRule

    A ComputationRule simplifies an expression operating at the toplevel of the term.

    A ComputationRule simplifies an expression operating at the toplevel of the term. But it may recursively simplify the components if that makes the rule applicable. The rule must preserve equality and well-typedness of the simplified term. If necessary, additional checks must be performed.

  13. class CongruenceRule extends TermHeadBasedEqualityRule

    Congruence as a TermBasedEqualityRule for two terms with the same head

  14. class Continue[A] extends AnyRef

    continuation used by some rules

  15. class DelarativeVarianceRule extends VarianceRule

    VarianceRule for OMA(op, args) defined by giving a variance annotation for each arg

  16. abstract class DelayedConstraint extends AnyRef

    A wrapper around a Judgement to maintain meta-information while a constraint is delayed

  17. class DelayedInference extends DelayedConstraint

    A wrapper around a continuation function to be delayed until a certain type inference succeeds

  18. class DelayedJudgement extends DelayedConstraint

    A wrapper around a Judgement to maintain meta-information while a constraint is delayed

  19. sealed trait DryRunResult extends AnyRef

    returned by Solver.dryRun as the result of a side-effect-free check

  20. abstract class EliminationRule extends InferenceRule
  21. case class Expectation(tp: Option[Term], df: Option[Term]) extends Product with Serializable

    auxiliary class for the MMTStructureChecker to store expectations about a constant

  22. case class ExtendedCheckingEnvironment(ce: CheckingEnvironment, objectChecker: ObjectChecker, rules: RuleSet, current: Path, timeout: Int = 0) extends Product with Serializable

    variant of CheckingEnvironment that carries around more structure

  23. abstract class ExtensionalityRule extends TypeBasedEqualityRule

    For extensionality rules, it makes sense to make applicableToTerm true only for terms that can be reduced after applying the elimination form, i.e., for terms that are not stable or an introduction form.

  24. abstract class FormationRule extends InferenceRule
  25. abstract class ForwardSolutionRule extends SingleTermBasedCheckingRule

    A ForwardSolutionRule solves for an unknown by inspecting its declarations (as opposed to its use) It can solve a variable directly (e.g., if it has unit type) or apply a variable transformation (e.g., X --> (X1,X2) if X has product type).

  26. class History extends AnyRef
  27. trait HistoryEntry extends AnyRef

    wrapper for classes that can occur in the History

  28. case class IndentedHistoryEntry(e: HistoryEntry, level: Int) extends HistoryEntry with Product with Serializable

    The History is a branch in the tree of decisions, messages, and judgements that occurred during type-checking

    The History is a branch in the tree of decisions, messages, and judgements that occurred during type-checking

    The most import History's are those ending in an error message. See Solver.getErrors

  29. abstract class InferenceAndTypingRule extends InferenceRule

    A variant of InferenceRule that may additionally use the expected type.

    A variant of InferenceRule that may additionally use the expected type. Thus it can be used both for type inference and for type checking.

  30. abstract class InferenceRule extends SingleTermBasedCheckingRule with MaytriggerBacktrack

    An InferenceRule infers the type of an expression It may recursively infer the types of components.

  31. abstract class InhabitableRule extends UnaryTermRule

    checks an Inhabitable judgement

  32. abstract class Interpreter extends Importer

    parses and returns a checked result

  33. abstract class IntroductionRule extends InferenceRule
  34. class MMTStructureChecker extends Checker

    A StructureChecker traverses structural elements and checks them, calling the object checker as needed.

    A StructureChecker traverses structural elements and checks them, calling the object checker as needed.

    After checking an element, it is immediately elaborated.

    Deriving classes may override unitCont and reCont to customize the behavior.

  35. trait MaytriggerBacktrack extends AnyRef

    rules can throw this exception after being called if they are not applicable because actual back-tracking is not implemented yet, they may only do so if they have not recursed into any state-changing judgments yet

  36. case class MightFail(history: History) extends Throwable with ThrowableDryRunResult with Product with Serializable
  37. trait ObjectChecker extends Extension

    checks objects

    checks objects

    see also Checker

  38. class OneStepInterpreter extends Interpreter

    an interpreter created from a trusted parser

  39. trait RelationHandler extends AnyRef

    type of continuation functions passed to an ObjectChecker to report dependencies

  40. class RuleBasedChecker extends ObjectChecker

    the primary object level checker of MMT

    the primary object level checker of MMT

    It checks CheckingUnits by invoking Solvers and updates the checked objects with the solutions. It manages errors and dependencies.

  41. trait SingleTermBasedCheckingRule extends CheckingRule
  42. abstract class SolutionRule extends CheckingRule

    A SolutionRule tries to isolate an unknown that occurs in a judgement.

    A SolutionRule tries to isolate an unknown that occurs in a judgement.

    It may be partial by, e.g., by inverting the toplevel operation of a Term without completely isolating an unknown occurring in it.

  43. class Solver extends CheckingCallback with SolverAlgorithms with Logger

    A Solver is used to solve a system of constraints about Term's given as judgments.

    A Solver is used to solve a system of constraints about Term's given as judgments.

    The judgments may contain unknown variables (also called meta-variables or logic variables); variables may represent any MMT term, i.e., object language terms, types, etc.; the solution is a Substitution that provides a closed Term for every unknown variable. (Higher-order abstract syntax should be used to represent unknown terms with free variables as closed function terms.)

    The Solver decomposes the judgments individually by applying typing rules, collecting (partial) solutions along the way and possibly delaying unsolvable judgments. If the unknown variables are untyped and rules require a certain type, the Solver adds the type.

    Unsolvable constraints are delayed and reactivated if later solving of unknowns provides further information.

  44. trait SolverAlgorithms extends AnyRef

    the essential subalgorithms of a bidirectional type-checking, factored out from the Solver class, which holds all bureaucracy

  45. case class SolverError(level: Level.Level, history: History, msgO: Option[((Obj) ⇒ String) ⇒ String] = None) extends Product with Serializable

    error/warning produced by Solver

  46. class Stability extends BooleanTermProperty

    used by Solver to mark a term as head-normal: no simplification rule can change the head symbol

  47. trait StructureChecker extends FormatBasedExtension

    checks structural elements

    checks structural elements

    see also Checker

    INVARIANTS: apply(se) must be equivalent to - for ContainerElement's: applyElementBegin(se) + se.getPrimitiveDeclarations.foreach(apply) + applyElementEnd(se) - for other elements: apply(se) must be equivalent to applyElementBegin(se)

    That way all calls to the StructureParserContinuations together check the entire element.

  48. abstract class SubtypingRule extends CheckingRule

    A SubtypingRule handles Subtyping judgements

  49. case class Success[A](result: A) extends DryRunResult with Product with Serializable
  50. abstract class SupertypeRule extends SingleTermBasedCheckingRule

    A SupertypeRule represnts a type as a subtype of a bigger one

  51. abstract class TermBasedEqualityRule extends CheckingRule

    A TermBasedEqualityRule checks the equality of two terms without considering types

  52. abstract class TermHeadBasedEqualityRule extends TermBasedEqualityRule

    A TermBasedEqualityRule checks the equality of two terms with certain heads

  53. sealed trait ThrowableDryRunResult extends Throwable with DryRunResult
  54. class TwoStepInterpreter extends Interpreter

    a combination of a Parser and a Checker

  55. abstract class TypeBasedEqualityRule extends SingleTermBasedCheckingRule with ApplicableUnder

    A TypeBasedEqualityRule checks the equality of two terms based on the head of their type

  56. abstract class TypeBasedSolutionRule extends TypeBasedEqualityRule

    A TypeBasedSolutionRule solves an unknown based on its type, by constructing a term of that type.

    A TypeBasedSolutionRule solves an unknown based on its type, by constructing a term of that type. This is legal if all terms of that type are equal.

  57. case class TypeBound(bound: Term, upper: Boolean) extends Product with Serializable

    stores a type bound for an unknown as used in the Solver

  58. abstract class TypeCoercionRule extends CheckingRule with ApplicableUnder

    a type coercion rule lifts a non-type A to the type lift(A) if A occurs where a type is expected

  59. abstract class TypeSolutionRule extends SolutionRule

    A TypeSolutionRule tries to solve for the type of an unknown in the term of a typing judgment.

  60. abstract class TypingRule extends SingleTermBasedCheckingRule

    An TypingRule checks a term against a type.

    An TypingRule checks a term against a type. It may recursively call other checks.

  61. abstract class UnaryTermRule extends SingleTermBasedCheckingRule

    A UnaryTermRule checks a UnaryTermJudgement

  62. abstract class UniverseRule extends UnaryTermRule

    checks a Universe judgement

  63. abstract class ValueSolutionRule extends SolutionRule

    A ValueSolutionRule tries to solve for the value an unknown in an equality judgment.

    A ValueSolutionRule tries to solve for the value an unknown in an equality judgment.

    f(t1) = t2 ---> t1 = g(t2), where t1 contains a target variable that we try to isolate

  64. sealed abstract class Variance extends AnyRef

    variances annotations, used by DelarativeVarianceRule

  65. abstract class VarianceRule extends SubtypingRule

    applies to op(args1) <: op(args2)

  66. abstract class TheoryExpRule extends InferenceRule
    Annotations
    @MMT_TODO( message = "must be reimplemented cleanly" )
    Deprecated

    must be reimplemented cleanly

Value Members

  1. object CheckingUnit extends Serializable
  2. object Continue
  3. object Contravariant extends Variance with Product with Serializable
  4. object Covariant extends Variance with Product with Serializable
  5. object Disambiguation extends ComputationRule

    oneOf(OMI(i),a_0,...a_n) ---> a_i

  6. object ForwardSolutionRule

    auxiliary object for the class ForwardSolutionRule

  7. object Hole

    apply/unapply methods for missing terms of known type

  8. object HoleTerm extends InferenceRule
  9. object Ignorevariant extends Variance with Product with Serializable
  10. object InferAmbiguous extends InferenceAndTypingRule

    solves unknown X in oneOf(X,a_0,...a_n) as i iff a_i is the only alternative whose type can be inferred

  11. object InferredType extends TermProperty[(Branchpoint, Term)]

    used by Solver to store inferred types with terms

  12. object Invariant extends Variance with Product with Serializable
  13. object NoHistory extends History

    a history that ignores all messages

  14. object NullChecker

    trivial checkers that do nothing

  15. object RelationHandler
  16. object Solver

    auxiliary methods and high-level type reconstruction API

  17. object Stability
  18. object TypingRule
  19. object UncheckedElement extends BooleanClientProperty[StructuralElement]

    if set, the element appears to be in scope but has not been checked yet

  20. object WouldFail extends Throwable with ThrowableDryRunResult with Product with Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped