Open
Description
This is a collection of issues I notice while looking at the docs.
-
Database
has a new method which takes aDbOptions
which implementsDefault
, butDatabase
doesn't implDefault
. - Is the default instance for
DbOptions
actually correct? -
Database::parse
has a complicated input type. The desired flexibility is better accommodated with animpl FileResolver
, and it should have a basic API that takes animpl Read
orimpl BufRead
. -
Database::parse_result
is a public method that returns a private object. -
Nameset::update
shouldn't be public? It can't be called fromDatabase::name_result
. - The nameset interface is too complicated. You map atoms to tokens, tokens to
LookupLabel
, then pull out the label and... do something undocumented that depends onSegmentSet
to get a statement. -
Frame
is unrecognizable compared to the MM spec. Most of the fields probably shouldn't be public, and it should have an actual API for getting the bits out. -
Diagnostic
doesn't have docstrings for the variants. -
Database::export
should output to animpl Write
rather than opening a file itself, and statements should be identified in a uniform way, e.g. byStatementAddress
rather than using&str
,Token
,Atom
,StatementAddress
andStatementRef
depending on the function. -
Database::statement
andDatabase::export
shouldn't need to mutate the database. -
Database::print_grammar
,Database::print_formula
etc. look like debugging tools, they shouldn't be in the public API. If they are, they should have a return value or write to animpl Write
or something. -
Database::diag_notations
is a weird API.types
could be a config struct with boolean fields, and the output could be provided by a callback to allow for incremental rendering and doing whatever the user wants to do with the diagnostics. -
Notation
could be swapped out forannotate_snippets::snippet::Snippet
-
Executor
should not be public. Also, why is there an async implementation in this crate? Usesmol
or something. -
export::export_mmp
should not be public, it should be a function onDatabase
. -
Formula::display
should not produce a string, it should be an object implementingDisplay
. That object could beFormulaRef<'_>
which bundles together the formula and references into theDatabase
, so thatFormula::iter
can also be supported. -
Substitutions
implementsIndex<&Label>
, which uses an unnecessary indirection sinceLabel
is a 4 byteCopy
type. -
Formula::build_syntax_proof
has an unusedA
type parameter. -
Grammar::parse_formula
takes a&mut dyn Iterator
but it could take&mut impl Iterator
-
outline
says it is not stable, so it should probably not be public at all. - There should be a more strongly typed way to inspect
StatementRef
s. Not all statement kinds have all the data, and the API should be a guide to what has what. -
parser
has lots of public types that should not really be public, or should be public with private members. -
parser::as_str
is unsound and should at least be private -
OutlineNode::get_name
is unsound becauseOutlineNode::name
is public -
ProofTree
is not stand-alone, it requiresProofTreeArray
, so it should probably be exposed asProofTreeRef
retaining a reference to the array -
ProofTreePrinter
has too many public fields -
VerifyExpr
should not be public -
Frame
has too many public fields, and in particularoptional_dv
is public but has a private type -
util
should not be public -
ProofBuilder::build
has a complicated type - Why are
filename
,fnv
andregex
being re-exported? I don't see any need to do this
Metadata
Assignees
Labels
No labels