ngsankha / rbsyn

Program synthesis for Ruby
BSD 3-Clause "New" or "Revised" License
94 stars 4 forks source link

petri nets? #18

Open ngsankha opened 4 years ago

ngsankha commented 4 years ago

Can we use petri nets for better computation of paths through types? Side effects help when there are assertions that test that side effect. But there is no way to reach a side effect path if there is no assertion for it. Petri nets could be helpful.

Example:

# type: () -> B
def my_method
  a = A.new()
  a.set_some_state(:foo)
  B.lookup(a)
end
ngsankha commented 4 years ago

Petri net ideas are outlined here: Component-based synthesis for complex APIs

Read this paper multiple times, need to think if this approach would fit with how our synthesis works.

ngsankha commented 4 years ago

Or maybe just do #14