public final class Preprocess extends Object
Modifier and Type | Class and Description |
---|---|
class |
Preprocess.FixIdVisitor
A temporary hack to fix up any incorrect ZName ids
left/created by the typechecker.
|
Constructor and Description |
---|
Preprocess(net.sourceforge.czt.session.SectionManager sectman)
Create a term preprocessor that will apply a set
of rules (see setRules) to a given term.
|
Modifier and Type | Method and Description |
---|---|
net.sourceforge.czt.base.ast.Term |
fixIds(net.sourceforge.czt.base.ast.Term term)
A temporary hack to fix up any incorrect ZName ids
left/created by the typechecker.
|
net.sourceforge.czt.base.ast.Term |
preprocess(String sectname,
net.sourceforge.czt.base.ast.Term term)
Rewrites the given term by firstly unfolding VarDecls
with multiple variables (x,y:T), then appling all the rewrite
rules of this Preprocess object to that term.
|
void |
setRules(String rulesFile)
Collects the rules of the first ZSect in a given source file.
|
public Preprocess(net.sourceforge.czt.session.SectionManager sectman)
sectman
- The section manager used to find rule tables.public void setRules(String rulesFile) throws IOException, ParseException, net.sourceforge.czt.session.CommandException
rulesFile
- The name of the source file that contains the rules.IOException
ParseException
net.sourceforge.czt.session.CommandException
public net.sourceforge.czt.base.ast.Term preprocess(String sectname, net.sourceforge.czt.base.ast.Term term) throws net.sourceforge.czt.session.CommandException, UnboundJokerException
sectname
- Gives the context for the proofs of rewrite rules.term
- The input term to rewrite.net.sourceforge.czt.session.CommandException
UnboundJokerException
public net.sourceforge.czt.base.ast.Term fixIds(net.sourceforge.czt.base.ast.Term term)
Copyright © 2003–2016 Community Z Tools Project. All rights reserved.