|
|
|
|
|
by lomnakkus
4384 days ago
|
|
Just had a little glance (I'm on my way out the door), but if it's possible to construct arbitrarily large lists (as seems to be implied by the availability of e.g. "range N" for any N, how can you guarantee that e.g. "sum large_list" can actually terminate within the time bound set by the frequency? Also there seems to be no actual proof of safety of the language's semantics (are the semantics formally specified?), but perhaps I missed it. |
|
The compiler can find out the range of numbers and the lengths of lists using static analysis, because SolScript is such a "restricted" language. Functional programmers would probably dump all that information into a type system. We call it "dataflow analysis", but I think the end result is the same.
Note that, all of the static analysis is done on the dataflow graph underlying a SolScript program. In the dataflow graph there are no "functions" or "classes"... The static analysis is much simpler because it is done on something more primitive than the language itself.