JuliaReach / SpaceExParser.jl

Parser for the SpaceEx modeling language in Julia
https://juliareach.github.io/SpaceExParser.jl/
MIT License
7 stars 1 forks source link

Special characters as variable names #27

Open mforets opened 6 years ago

mforets commented 6 years ago

If one of:

is detected in

H = readsxmodel(file)
H.ext[:variables]

then some special care should be taken. For example transforming to math expressions in convert.


For a unit test see this comment

schillic commented 6 years ago

There might be more problematic cases. Maybe consider adding a prefix/suffix to all variable names (like _) as a preprocessing step.

mforets commented 6 years ago

whos(Base) gives the full list

nikos-kekatos commented 6 years ago

i like the idea of name_1

nikos-kekatos commented 6 years ago

similar to instantiation of base/network components in SpaceEx model editor

mforets commented 6 years ago

to check that there is a name issue we can do:

if any(vi ∈ names(Base) for vi in variables)
    warn("conflict of a variable name and an existing name detected")
end
schillic commented 6 years ago

It would be more helpful to output one of the variables vi that are conflicting.