Members
LurchOptions
Lurch Options
We just use a global for storing the current options. This avoids having to
pass it as an optional argument through the entire validation chain of
interpretations and validation tools. To set an option just do e.g.
LurchOptions.avoidLoneMetavars = false. Current validation options are:
validateall- if true, validate all inferences. If false, only validate the target.checkPreemies- Check for preemies iff this is trueprocessBIHs- process BIHs iff this is trueinstantiateEverything- don't avoid anything below (equivalent to setting the next three settings to false)avoidLoneMetavars- if true don't try to instantiate lone metavariables, otherwise try to instantiate them with every user proposition.avoidLoneEFAs- the same thing for lone EFAsavoidLoneElementOfs- the same thing for lone x∈A's where A is a metavariableprocessChains- process chains and equations iff this is trueprocessEquations- process equations iff this is trueprocessCases- process the cases tool iff this is trueautoCases- similar to avoidLoneMetavars=false. If true, then identify all Cases-like rules and try to instantiate their univar conclusion with every user's conclusion in the document.processCAS- process CAS tool iff this is trueprocessAlgebra- use the CAS tool to validate equations followed by 'by algebra' iff this is trueswapTheoremProofPairs- move theorems after their next sibling if its a proofupdateProgress- the function that gives progress updates while instantiatingupdateFreq- how often to give a progress update during a passbadResultMsg- what the feedback message should be internally to expressions which are not found to be propositionally validrunStudentTests- use all of the student test files in the acid test suitestartStudentTest- the number of the first student test to runendStudentTest- the number of the last student test to run
Source
addIndex
Create a document index, add it to the document, and populate it. The second argument specifies the type of index to make. The types correspond to the various phases of processing.
Source
addLurchIndices
addLurchIndices
This routine populates the generic tree indexer with the index definition we
need for a Lurch document. It will usually be called by the addIndex(doc)
routine to create, define, and populate a document's index which can then be
accessed via doc.index.
Source
runParserTests
Run all of the parser golden-snapshot test suites.
Source
Methods
compileSingleTest()
Compile a single test when TestIndex is set.
Source
computeChainResult()
Compute the validation result for an equation chain with _id.
Source
elapsedTime()
Format elapsed time in ms to human-readable string.
Source
loadAcidTests()
Load all acid tests.
Source
loadStudentTests()
Load all student tests if enabled.
Source
loadTest()
Load a single test document (compiled or raw string).
Source
putdownSymbolText()
Render a symbol's text the way putdown does: unchanged if it contains no putdown delimiter or whitespace characters, and quoted with the appropriate escapes otherwise. This matches the Symbol case of toPutdown().
Source
runTests()
Run validation on all loaded tests.
Source
safeExecute()
Safely run a function and log errors.