CliMA / Impero.jl

A symbolic language for equation specification
Apache License 2.0
15 stars 1 forks source link

Playing nice with SymbolicUtils #3

Closed sandreza closed 4 years ago

sandreza commented 4 years ago

Currently rewrite rules do not work with the objects in SymbolicUtils. When the structs are defined we need to add in hooks to do this similar to

SymbolicUtils.istree(a::Add) = true
SymbolicUtils.arguments(a::Add) = [a.term1, a.term2] 
SymbolicUtils.operation(a::Add) = +;
SymbolicUtils.symtype(a::Add) = Number

but for every struct