Skip to content

Commit e302f40

Browse files
build: mark API as public
1 parent 80f47d4 commit e302f40

3 files changed

Lines changed: 25 additions & 4 deletions

File tree

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SymbolicUtils"
22
uuid = "d1185830-fcd6-423d-90d6-eec64667417b"
3-
authors = ["Shashi Gowda"]
43
version = "4.10.0"
4+
authors = ["Shashi Gowda"]
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
@@ -22,6 +22,7 @@ MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0"
2222
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
2323
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
2424
ReadOnlyArrays = "988b38a3-91fc-5605-94a2-ee2116b3bd83"
25+
SciMLPublic = "431bcebd-1456-4ced-9d72-93c2757fff0b"
2526
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
2627
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
2728
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
@@ -66,6 +67,7 @@ PrecompileTools = "1.2.1"
6667
ReadOnlyArrays = "0.2.0"
6768
ReverseDiff = "1"
6869
RuntimeGeneratedFunctions = "0.5.13"
70+
SciMLPublic = "1.0.1"
6971
Setfield = "0.7, 0.8, 1"
7072
SnoopCompileCore = "3.0.0"
7173
SparseArrays = "1"

src/SymbolicUtils.jl

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ import ArrayInterface
2424
import ExproniconLite as EL
2525
import TaskLocalValues: TaskLocalValue
2626
using WeakCacheSets: WeakCacheSet, getkey!
27-
using Base: RefValue
27+
using Base: RefValue, Constructor
2828
import MacroTools
2929
import PrecompileTools
30+
using SciMLPublic: @public
3031
PrecompileTools.@recompile_invalidations begin
3132
import MultivariatePolynomials as MP
3233
import DynamicPolynomials as DP
@@ -95,12 +96,20 @@ macro readlock(l, expr)
9596
end
9697
end
9798

99+
@public clear_cache!, @cache, toggle_caching!
98100
include("cache.jl")
99101
Base.@deprecate istree iscall
100102

101103
include("small_array.jl")
102104

103105
export istree, operation, arguments, sorted_arguments, iscall, unwrap_const
106+
@public Const, Sym, Term, Add, Mul, Div, ArrayOp, ArgsT, BSImpl, BasicSymbolic, FnType
107+
@public Operator, ROArgsT, isconst, issym, isterm, isadd, ismul, isaddmul, isdiv, ispow
108+
@public isarrayop, promote_symtype, shape, symtype, unwrap, ACDict, AddMulVariant, TypeT
109+
@public BasicSymbolicImpl, MetadataT, MonomialOrder, MonomialT, PolyCoeffT, PolyVarOrder
110+
@public PolyVarT, PolynomialT, ShapeT, ShapeVecT, Unknown, StableIndex, hashcons
111+
@public is_array_shape, is_called_function_symbolic, mul_worker, add_worker, one_of_vartype
112+
@public operator_to_term, promote_shape, zero_of_vartype, zeropoly
104113
# Sym, Term,
105114
# Add, Mul and Pow
106115
PrecompileTools.@recompile_invalidations begin
@@ -117,18 +126,20 @@ PrecompileTools.@recompile_invalidations begin
117126
include("symbolic_ops/getindex.jl")
118127
end
119128

120-
export BS
129+
export BS, parse_variable, sym_from_parse_result
121130
include("syms.jl")
122131
export @arrayop
123132
include("arrayop.jl")
124133

125134
# Methods on symbolic objects
126135
PrecompileTools.@recompile_invalidations begin
127136
using SpecialFunctions, NaNMath
137+
@public @map_methods, @mapreduce_methods, @number_methods, SymBroadcast
128138
include("methods.jl")
129139
include("printing.jl")
130140
end
131141
# LinkedList, simplification utilities
142+
@public _isone, _iszero
132143
include("utils.jl")
133144

134145
# Tree inspection
@@ -141,16 +152,18 @@ using Combinatorics: permutations, combinations
141152
export @rule, @acrule, RuleSet
142153

143154
# Rule type and @rule macro
155+
@public Rule
144156
include("rule.jl")
145157
include("matchers.jl")
146158
include("rewriters.jl")
147159

148160
# Convert to an efficient multi-variate polynomial representation
149161
import DynamicPolynomials
150-
export expand
162+
export expand, basicsymbolic_to_polyvar, fraction_iszero, fraction_isone, from_poly, to_poly!
151163
include("polyform.jl")
152164

153165
# Term ordering
166+
@public <
154167
include("ordering.jl")
155168

156169
# Default rules for expression simplification
@@ -161,8 +174,11 @@ export simplify
161174
include("simplify.jl")
162175

163176
export substitute
177+
@public scalarize, search_variables, search_variables!, Substituter, default_is_atomic
178+
@public default_substitute_filter, evaluate, query
164179
include("substitute.jl")
165180

181+
@public Code
166182
include("code.jl")
167183

168184
PrecompileTools.@recompile_invalidations begin

src/code.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ export toexpr, Assignment, (←), Let, Func, DestructuredArgs, LiteralExpr,
77
SetArray, MakeArray, MakeSparseArray, MakeTuple, AtIndex,
88
SpawnFetch, Multithreaded, ForLoop, cse
99

10+
using SciMLPublic: @public
11+
1012
export OptimizationRule, substitute_in_ir, apply_optimization_rules
13+
@public cse_inside_expr, function_to_expr, get_rewrites, LazyState, NameState
1114

1215
import ..SymbolicUtils
1316
import ..SymbolicUtils.Rewriters

0 commit comments

Comments
 (0)