Reduce.jl Library
Index
Reduce.RExpr
Base.parse
Reduce.ColCheck
Reduce.PrintLog
Reduce.Rational
Reduce.Reset
Reduce.SubCall
Reduce.SubFail
Reduce.SubHold
Reduce.load_package
Reduce.parsegen
Reduce.rcall
Reduce.squash
Reduce.unfoldgen
SyntaxTree.linefilter!
ForceImport.@force
Reduce Interface
Reduce.Reset
— FunctionReduce.Reset()
Kills the REDUCE process and starts a new instance.
Examples
julia> Reduce.Reset()
Reduce (Free PSL version, revision 4015), 5-May-2017 ...
Reduce.RExpr
— TypeReduce expression
Summary:
type RExpr <: Any
Fields:
str::Array{Compat.String,1}
Reduce.rcall
— Functionrcall(r::RExpr)
Evaluate a Reduce expression.
Examples
julia> R"int(sin(x), x)" |> RExpr |> rcall
- cos(x)
rcall{T}(e::T)
Evaluate a Julia expression or string using the Reduce interpretor and convert output back into the input type
Examples
julia> rcall("int(sin(y)^2, y)")
"( - cos(y)*sin(y) + y)/2"
julia> rcall(:(int(1/(1+x^2), x)))
:(atan(x))
Base.parse
— FunctionReduce.parse(r::RExpr)
Parse a Reduce expression into a Julia expression
Examples
julia> Reduce.parse(R"sin(i*x)")
:(sin(im * x))
Reduce.load_package
— Functionload_package(::Symbol)
Loads the specified package into REDUCE
Examples
julia> load_package(:rlfi)
Reduce.squash
— Functionsquash(expr)
Reduces an entire program statement block using symbolic rewriting
Tools & Options
Reduce.parsegen
— Functionparsegen(::Symbol,::Symbol)
Parser generator that outputs code to walk and manipulate REDUCE expressions
Reduce.unfoldgen
— Functionunfoldgen(::Symbol,::Symbol)
Parser generator that outputs code to walk and manipulate Julia expressions
SyntaxTree.linefilter!
— Functionlinefilter!(::Expr)
Recursively filters out :LineNumberNode
from Expr
objects.
Reduce.Rational
— FunctionReduce.Rational(::Bool)
Toggle whether to use '/' or '//' for division in julia expressions
Reduce.SubCall
— FunctionReduce.SubCall(::Bool)
Toggle whether to substitute additional expressions
Reduce.SubHold
— FunctionReduce.SubHold(::Real)
Sleep timer in case of clogged Reduce pipe on SubCall
Reduce.SubFail
— FunctionReduce.SubFail(::Integer)
Failure limit in case of clogged Reduce pipe on SubCall
Reduce.ColCheck
— FunctionReduce.ColCheck(::Bool)
Toggle whether to reset REPL linewidth on each show
Reduce.PrintLog
— FunctionReduce.PrintLog(::Bool)
Toggle whether to display the log of REDUCE commands
ForceImport.@force
— Macro @force using Module
Forces imports of exported methods from Module
, even if there are conflicts.