[Checkins] SVN: Sandbox/adamg/ocql/branches/alg-compiler/src/ocql/ add interface declerations of algebra operation classes

Charith Paranaliyanage paranaliyanage at gmail.com
Tue Jul 1 13:56:50 EDT 2008


Log message for revision 87890:
  add interface declerations of algebra operation classes

Changed:
  U   Sandbox/adamg/ocql/branches/alg-compiler/src/ocql/interfaces.py
  U   Sandbox/adamg/ocql/branches/alg-compiler/src/ocql/rewriter/algebra.py
  A   Sandbox/adamg/ocql/branches/alg-compiler/src/ocql/rewriter/interfaces.py

-=-
Modified: Sandbox/adamg/ocql/branches/alg-compiler/src/ocql/interfaces.py
===================================================================
--- Sandbox/adamg/ocql/branches/alg-compiler/src/ocql/interfaces.py	2008-07-01 17:53:05 UTC (rev 87889)
+++ Sandbox/adamg/ocql/branches/alg-compiler/src/ocql/interfaces.py	2008-07-01 17:56:49 UTC (rev 87890)
@@ -115,77 +115,4 @@
     """Stores statistical data based on queries run before.
     Provides statistical data for optimization.
     """
-
-################
-#Algebra operation interfaces
-################
-
-class IEmpty(IAlgebraObject):
-    """Objects providing this interface represent the
-    Empty Algebra object
-    """ 
-    
-class ISingle(IAlgebraObject):
-    """Objects providing this interface represent the
-    Single Algebra object
-    """
-    
-class IUnion(IAlgebraObject):
-    """Objects providing this interface represent the
-    Union Algebra object
-    """
-    
-class IIter(IAlgebraObject):
-    """Objects providing this interface represent the
-    Iter Algebra object
-    """
-    
-class ISelect(IAlgebraObject):
-    """Objects providing this interface represent the
-    Select Algebra object
-    """
-
-class IReduce(IAlgebraObject):
-    """Objects providing this interface represent the
-    Reduce Algebra object
-    """
-
-class IRange(IAlgebraObject):
-    """Objects providing this interface represent the
-    Range Algebra object
-    """
-    
-class IMake(IAlgebraObject):
-    """Objects providing this interface represent the
-    Make Algebra object
-    """
-    
-class IIf(IAlgebraObject):
-    """Objects providing this interface represent the
-    If Algebra object
-    """
-    
-class ILambda(IAlgebraObject):
-    """Objects providing this interface represent the
-    Lambda Algebra object
-    """
-    
-class IConstant(IAlgebraObject):
-    """Objects providing this interface represent the
-    Constant Algebra object
-    """
-    
-class IIdentifier(IAlgebraObject):
-    """Objects providing this interface represent the
-    Identifier Algebra object
-    """
-    
-class IBinery(IAlgebraObject):
-    """Objects providing this interface represent the
-    Binery Algebra object
-    """
-
-class IOperator(IAlgebraObject):
-    """Objects providing this interface represent the
-    Operator Algebra object
-    """
+    
\ No newline at end of file

Modified: Sandbox/adamg/ocql/branches/alg-compiler/src/ocql/rewriter/algebra.py
===================================================================
--- Sandbox/adamg/ocql/branches/alg-compiler/src/ocql/rewriter/algebra.py	2008-07-01 17:53:05 UTC (rev 87889)
+++ Sandbox/adamg/ocql/branches/alg-compiler/src/ocql/rewriter/algebra.py	2008-07-01 17:56:49 UTC (rev 87890)
@@ -12,7 +12,8 @@
 
 from zope.interface import implements
 
-from ocql.interfaces import *
+from ocql.interfaces import IAlgebraObject
+from ocql.rewriter.interfaces import *
 
 class Algebra:
     """Signature definition of Algebra operation classes.

Added: Sandbox/adamg/ocql/branches/alg-compiler/src/ocql/rewriter/interfaces.py
===================================================================
--- Sandbox/adamg/ocql/branches/alg-compiler/src/ocql/rewriter/interfaces.py	                        (rev 0)
+++ Sandbox/adamg/ocql/branches/alg-compiler/src/ocql/rewriter/interfaces.py	2008-07-01 17:56:49 UTC (rev 87890)
@@ -0,0 +1,107 @@
+# -*- coding: UTF-8 -*-
+
+from ocql.interfaces import IAlgebraObject
+from zope.schema import Dict, Text
+from zope.interface import Attribute
+
+################
+#Algebra operation interfaces
+################
+
+class IEmpty(IAlgebraObject):
+    """Objects providing this interface represent the
+    Empty Algebra object
+    """ 
+    klass = Attribute('collection type name')
+    expr = Attribute('expression')
+
+
+class ISingle(IAlgebraObject):
+    """Objects providing this interface represent the
+    Single Algebra object
+    """
+    klass = Attribute('collection type name')
+    expr = Attribute('expression')
+
+    
+class IUnion(IAlgebraObject):
+    """Objects providing this interface represent the
+    Union Algebra object
+    """
+    klass = Attribute('collection type name')
+    coll1 = Attribute('first collection')
+    coll2 = Attribute('second collection')
+
+    
+class IIter(IAlgebraObject):
+    """Objects providing this interface represent the
+    Iter Algebra object
+    """
+    klass = Attribute('collection type name')
+    fun = Attribute('function')
+    coll = Attribute('collection')
+    
+
+class ISelect(IAlgebraObject):
+    """Objects providing this interface represent the
+    Select Algebra object
+    """
+    klass = Attribute('collection type name')
+    fun = Attribute('function')
+    coll = Attribute('collection')
+    
+
+class IReduce(IAlgebraObject):
+    """Objects providing this interface represent the
+    Reduce Algebra object
+    """
+    klass = Attribute('collection type name')
+    expr = Attribute('expression')
+    fun = Attribute('function')
+    aggreg = Attribute('aggregation')
+    coll = Attribute('collection')
+    
+
+class IOperator(IAlgebraObject):
+    """Objects providing this interface represent the
+    Operator Algebra object
+    """
+    ops = Dict(Text(), Text())
+    op = Text()
+    
+    
+class IRange(IAlgebraObject):
+    """Objects providing this interface represent the
+    Range Algebra object
+    """
+    
+class IMake(IAlgebraObject):
+    """Objects providing this interface represent the
+    Make Algebra object
+    """
+    
+class IIf(IAlgebraObject):
+    """Objects providing this interface represent the
+    If Algebra object
+    """
+    
+class ILambda(IAlgebraObject):
+    """Objects providing this interface represent the
+    Lambda Algebra object
+    """
+    
+class IConstant(IAlgebraObject):
+    """Objects providing this interface represent the
+    Constant Algebra object
+    """
+    
+class IIdentifier(IAlgebraObject):
+    """Objects providing this interface represent the
+    Identifier Algebra object
+    """
+    
+class IBinery(IAlgebraObject):
+    """Objects providing this interface represent the
+    Binery Algebra object
+    """
+    



More information about the Checkins mailing list