Ejemplo n.º 1
0
        public void visitFunction(Function f)
        {
            DFGNode high;
            DFGNode low;

            high = _dfg.high;
            low  = _dfg.low;
            if (_isVerification)
            {
                high = DFGNode.generateHigh();
                low  = DFGNode.generateLow();
            }
            else
            {
                high = _dfg.high;
                low  = _dfg.low;
            }

            DFGVisitor fv = new DFGVisitor(f.body, f.formalParams, high, low, _componentFunctionGraphs, _deferredInvocations, _currentComponent, _isVerification);
            Dictionary <Identifier, DFG> functionList = _componentFunctionGraphs[_currentComponent];

            // if function has no return, add a ghost return
            if (fv.dfg.returnNode == null)
            {
                fv.dfg.addReturn();
            }

            functionList.Add(f.name.identifier, fv.dfg);
        }
Ejemplo n.º 2
0
        public DFG()
        {
            _initialise();

            _high = DFGNode.generateHigh();
            addNode(_high);

            _low = DFGNode.generateLow();
            addNode(_low);
        }