Sha256: 044266f2f4a5bc105c1dd1369ca1aa1b45afeb53b9ef814b8598680f069398e6

Contents?: true

Size: 868 Bytes

Versions: 1

Compression:

Stored size: 868 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gisele-0.6.0 examples/union/union.rb