http://hg.viff.dk/viff/rev/8bb853b24714
changeset: 1057:8bb853b24714
user:      Martin Geisler <[email protected]>
date:      Tue Dec 16 13:21:18 2008 +0100
summary:   Renamed BasicRuntime to Runtime.
This should actually have been when we renamed Runtime to
PassiveRuntime.

diffstat:

8 files changed, 20 insertions(+), 20 deletions(-)
apps/benchmark.py |    4 ++--
apps/divide.py    |    4 ++--
apps/multiply.py  |    4 ++--
apps/sum.py       |    4 ++--
doc/runtime.txt   |    8 ++++----
viff/paillier.py  |    6 +++---
viff/passive.py   |    6 +++---
viff/runtime.py   |    4 ++--

diffs (179 lines):

diff -r 79c3110de9b5 -r 8bb853b24714 apps/benchmark.py
--- a/apps/benchmark.py Thu Dec 11 13:55:58 2008 +0100
+++ b/apps/benchmark.py Tue Dec 16 13:21:18 2008 +0100
@@ -63,7 +63,7 @@
 from twisted.internet import reactor
 
 from viff.field import GF, GF256, FakeGF
-from viff.runtime import BasicRuntime, create_runtime, gather_shares, \
+from viff.runtime import Runtime, create_runtime, gather_shares, \
     make_runtime_class
 from viff.passive import PassiveRuntime
 from viff.active import BasicActiveRuntime, \
@@ -126,7 +126,7 @@
                     operation=operations[0], parallel=True, fake=False)
 
 # Add standard VIFF options.
-BasicRuntime.add_options(parser)
+Runtime.add_options(parser)
 
 (options, args) = parser.parse_args()
 
diff -r 79c3110de9b5 -r 8bb853b24714 apps/divide.py
--- a/apps/divide.py    Thu Dec 11 13:55:58 2008 +0100
+++ b/apps/divide.py    Tue Dec 16 13:21:18 2008 +0100
@@ -35,7 +35,7 @@
 from twisted.internet import reactor
 
 from viff.field import GF
-from viff.runtime import BasicRuntime, create_runtime, make_runtime_class
+from viff.runtime import Runtime, create_runtime, make_runtime_class
 from viff.comparison import ComparisonToft07Mixin
 from viff.config import load_config
 from viff.util import find_prime, dprint
@@ -82,7 +82,7 @@
 
     parser.set_defaults(modulus=2**65)
 
-    BasicRuntime.add_options(parser)
+    Runtime.add_options(parser)
 
     options, args = parser.parse_args()
     if len(args)==2:
diff -r 79c3110de9b5 -r 8bb853b24714 apps/multiply.py
--- a/apps/multiply.py  Thu Dec 11 13:55:58 2008 +0100
+++ b/apps/multiply.py  Tue Dec 16 13:21:18 2008 +0100
@@ -21,11 +21,11 @@
 from twisted.internet import reactor
 
 from viff.field import GF
-from viff.runtime import create_runtime, BasicRuntime
+from viff.runtime import create_runtime, Runtime
 from viff.config import load_config
 
 parser = OptionParser()
-BasicRuntime.add_options(parser)
+Runtime.add_options(parser)
 (options, args) = parser.parse_args()
 
 Zp = GF(1031)
diff -r 79c3110de9b5 -r 8bb853b24714 apps/sum.py
--- a/apps/sum.py       Thu Dec 11 13:55:58 2008 +0100
+++ b/apps/sum.py       Tue Dec 16 13:21:18 2008 +0100
@@ -21,11 +21,11 @@
 from twisted.internet import reactor
 
 from viff.field import GF
-from viff.runtime import create_runtime, BasicRuntime
+from viff.runtime import create_runtime, Runtime
 from viff.config import load_config
 
 parser = OptionParser()
-BasicRuntime.add_options(parser)
+Runtime.add_options(parser)
 (options, args) = parser.parse_args()
 
 Zp = GF(1031)
diff -r 79c3110de9b5 -r 8bb853b24714 doc/runtime.txt
--- a/doc/runtime.txt   Thu Dec 11 13:55:58 2008 +0100
+++ b/doc/runtime.txt   Tue Dec 16 13:21:18 2008 +0100
@@ -29,20 +29,20 @@
 
    .. autofunction:: create_runtime
 
-   .. autoclass:: BasicRuntime
+   .. autoclass:: Runtime
       :members:
 
-      .. attribute:: BasicRuntime.id
+      .. attribute:: Runtime.id
 
          Player ID. This is an integer in the range 1--*n* for *n*
          players.
 
-      .. attribute:: BasicRuntime.threshold
+      .. attribute:: Runtime.threshold
 
          Default threshold used by :meth:`Runtime.shamir_share`,
          :meth:`Runtime.open`, and others.
 
-      .. attribute:: BasicRuntime.program_counter
+      .. attribute:: Runtime.program_counter
 
          Whenever a share is sent over the network, it must be
          uniquely identified so that the receiving player known what
diff -r 79c3110de9b5 -r 8bb853b24714 viff/paillier.py
--- a/viff/paillier.py  Thu Dec 11 13:55:58 2008 +0100
+++ b/viff/paillier.py  Tue Dec 16 13:21:18 2008 +0100
@@ -27,7 +27,7 @@
 from twisted.internet.defer import Deferred, gatherResults
 import gmpy
 
-from viff.runtime import BasicRuntime, increment_pc, Share, gather_shares
+from viff.runtime import Runtime, increment_pc, Share, gather_shares
 from viff.util import rand, find_random_prime
 
 def L(u, n):
@@ -64,11 +64,11 @@
     return (numer*gmpy.invert(denom, n)) % n
 
 
-class PaillierRuntime(BasicRuntime):
+class PaillierRuntime(Runtime):
     """Two-player runtime based on the Paillier crypto system."""
 
     def add_player(self, player, protocol):
-        BasicRuntime.add_player(self, player, protocol)
+        Runtime.add_player(self, player, protocol)
         if player.id == self.id:
             self.player = player
         else:
diff -r 79c3110de9b5 -r 8bb853b24714 viff/passive.py
--- a/viff/passive.py   Thu Dec 11 13:55:58 2008 +0100
+++ b/viff/passive.py   Tue Dec 16 13:21:18 2008 +0100
@@ -20,13 +20,13 @@
 """Passively secure VIFF runtime."""
 
 from viff import shamir
-from viff.runtime import BasicRuntime, increment_pc, Share, ShareList, 
gather_shares
+from viff.runtime import Runtime, increment_pc, Share, ShareList, gather_shares
 from viff.prss import prss, prss_lsb, prss_zero
 from viff.field import GF256, FieldElement
 from viff.util import rand, profile
 
 
-class PassiveRuntime(BasicRuntime):
+class PassiveRuntime(Runtime):
     """The VIFF runtime.
 
     The runtime is used for sharing values (:meth:`shamir_share` or
@@ -47,7 +47,7 @@
 
     def __init__(self, player, threshold, options=None):
         """Initialize runtime."""
-        BasicRuntime.__init__(self, player, threshold, options)
+        Runtime.__init__(self, player, threshold, options)
 
     @increment_pc
     def open(self, share, receivers=None, threshold=None):
diff -r 79c3110de9b5 -r 8bb853b24714 viff/runtime.py
--- a/viff/runtime.py   Thu Dec 11 13:55:58 2008 +0100
+++ b/viff/runtime.py   Tue Dec 16 13:21:18 2008 +0100
@@ -375,7 +375,7 @@
 
     The decorated method will be replaced with a proxy method which
     first tries to get the data needed from
-    :attr:`BasicRuntime._pool`, and if that fails it falls back to the
+    :attr:`Runtime._pool`, and if that fails it falls back to the
     original method.
 
     The *generator* method is only used to record where the data
@@ -401,7 +401,7 @@
     return preprocess_decorator
 
 
-class BasicRuntime:
+class Runtime:
     """Basic VIFF runtime with no crypto.
 
     This runtime contains only the most basic operations needed such
_______________________________________________
viff-commits mailing list
[email protected]
http://lists.viff.dk/listinfo.cgi/viff-commits-viff.dk

Reply via email to