require 'gisele-analysis' def debug(wf, name) where = (Path.dir/name) where.mkdir_p (where/"wf.dot").write(wf.to_dot) glts = wf.to_glts (where/"glts.dot").write(glts.to_dot) deterministic = glts.determinize (where/"deterministic.dot").write(deterministic.to_dot) minimal = deterministic.minimize (where/"minimal.dot").write(minimal.to_dot) minimal end Gisele::Analysis.session do |s| s.trackvar :breast, [] s.trackvar :m_plus, ["Staff:end"], false wf1 = s.ghmsc do |g| g.source = (Path.dir/"breast.gis").read g.c0 = "breast" end wf2 = s.ghmsc do |g| g.source = (Path.dir/"rectal.gis").read g.c0 = "not(breast)" end g1 = debug(wf1, "breast") g2 = debug(wf2, "rectal") merged = g1 | g2 (Path.dir/"merged.dot").write(merged.to_dot) minim = merged.minimize (Path.dir/"minim.dot").write(minim.to_dot) end