Example #1
0
import logging

from PyDFlow.PyFun import py_ivar, func
from PyDFlow.base.states import *
import threading as th

from PyDFlow.types import Multiple, FlTypeError

import PyDFlow.examples.PyFun as ex
from PyDFlow.base import LocalExecutor
from PyDFlow.base.patterns import resultset
from PyDFlow.tests.PyDFlowTest import PyDFlowTest
from PyDFlow.base.exceptions import InvalidReplaceException
import sys

Int = py_ivar.subtype()
String = py_ivar.subtype()
#logging.basicConfig(level=logging.DEBUG)


@func((Int), ())
def one():
    return 1

@func((Int), (Int))
def inc(x):
    return x + 1

@func((Int), (Int, Int))
def add(x, y):
    return x + y
Example #2
0
import logging

from PyDFlow.PyFun import py_ivar, func
from PyDFlow.base.states import *
import threading as th

from PyDFlow.types import Multiple, FlTypeError

import PyDFlow.examples.PyFun as ex
from PyDFlow.base import LocalExecutor
from PyDFlow.base.patterns import resultset
from PyDFlow.tests.PyDFlowTest import PyDFlowTest
from PyDFlow.base.exceptions import InvalidReplaceException
import sys

Int = py_ivar.subtype()
String = py_ivar.subtype()
#logging.basicConfig(level=logging.DEBUG)


@func((Int), ())
def one():
    return 1


@func((Int), (Int))
def inc(x):
    return x + 1


@func((Int), (Int, Int))
Example #3
0
# limitations under the License.
'''
Created on Feb 28, 2011
@author: tga
'''
import unittest
import logging
from PyDFlow.PyFun import py_ivar, func, compound
from PyDFlow.base.states import *

from PyDFlow.types import Multiple
from PyDFlow.tests.PyDFlowTest import PyDFlowTest

#logging.basicConfig(level=logging.DEBUG)

Int = py_ivar.subtype()


@func((Int), (Int, Int))
def add(x, y):
    return x + y


@compound((Int), (Int))
def double(n):
    return add(n, n)


@compound((Int), (Int))
def id(n):
    return n
Example #4
0
'''
Created on Feb 28, 2011
@author: tga
'''
import unittest
import logging 
from PyDFlow.PyFun import py_ivar, func, compound
from PyDFlow.base.states import *

from PyDFlow.types import Multiple
from PyDFlow.tests.PyDFlowTest import PyDFlowTest

#logging.basicConfig(level=logging.DEBUG)

Int = py_ivar.subtype()


@func((Int), (Int, Int))
def add(x, y):
    return x + y

@compound((Int), (Int))
def double(n):
    return add(n, n)

@compound((Int), (Int))
def id(n):
    return n

@compound((Int, Int), (Int, Int))