Class: Flowckerc::SolverClass
- Inherits:
-
Object
- Object
- Flowckerc::SolverClass
- Defined in:
- lib/flowckerc.rb
Defined Under Namespace
Classes: AtomExecContext, FormulaExecContext, LinksSolver
Instance Method Summary collapse
Instance Method Details
#solve(formula, options = {}) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/flowckerc.rb', line 56 def solve formula, ={} syms = SymTable.new molecule = Molecule.new molecule_ports = MoleculePorts.new context = FormulaExecContext.new syms, molecule, molecule_ports, formula.eval context LinksSolver.new(syms).solve(molecule.links) solve_ports_ids syms, molecule_ports FormulaSolution.new molecule, molecule_ports end |