|
From: notifies s. of c. c. <per...@li...> - 2007-02-13 15:22:08
|
Revision: 86
http://svn.sourceforge.net/perl-flat/?rev=86&view=rev
Author: estrabd
Date: 2007-02-13 07:20:36 -0800 (Tue, 13 Feb 2007)
Log Message:
-----------
getting ready for transform
Modified Paths:
--------------
trunk/perl-flat/MANIFEST
trunk/perl-flat/dev-scripts/bdetest.pl
Added Paths:
-----------
trunk/perl-flat/lib/FLAT/Regex/Transform.pm
Modified: trunk/perl-flat/MANIFEST
===================================================================
--- trunk/perl-flat/MANIFEST 2007-02-09 17:17:25 UTC (rev 85)
+++ trunk/perl-flat/MANIFEST 2007-02-13 15:20:36 UTC (rev 86)
@@ -2,6 +2,7 @@
MANIFEST
lib/FLAT/Regex/Op.pm
lib/FLAT/Regex/Parser.pm
+lib/FLAT/Regex/Transform.pm
lib/FLAT/Regex/WithNegations.pm
lib/FLAT/Regex.pm
lib/FLAT/FA.pm
Modified: trunk/perl-flat/dev-scripts/bdetest.pl
===================================================================
--- trunk/perl-flat/dev-scripts/bdetest.pl 2007-02-09 17:17:25 UTC (rev 85)
+++ trunk/perl-flat/dev-scripts/bdetest.pl 2007-02-13 15:20:36 UTC (rev 86)
@@ -2,28 +2,8 @@
use strict;
use lib qw(../lib);
-use FLAT;
-use FLAT::NFA;
-use FLAT::PFA;
-use FLAT::Regex::WithExtraOps;
+use FLAT::Regex::Transform;
use Data::Dumper;
-# This is mainly my test script for FLAT::FA::PFA.pm
-
-#my $DFA = FLAT::Regex->new('ab+ba')->as_nfa->as_min_dfa;
-#print $DFA->as_gdl;
-
-my $PFA1 = FLAT::Regex::WithExtraOps->new('(abc)*dx&(efg)*hy')->as_pfa(); #<--!
-my $PFA2 = FLAT::Regex::WithExtraOps->new('(abc+efg)*(
- dx&(efg)*hy+
- hy&(abc)*dx+
- a(((bca)*bcdx)&((efg)*hy))+
- a(((bca)*)&((efg)*hy))bcdx+
- e(((fge)*fghy)&((abc)*dx))+
- e(((fge)*)&((abc)*dx))fghy
- )')->as_pfa();
-
-my $DFA1 = $PFA1->as_nfa->as_min_dfa;
-my $DFA2 = $PFA2->as_nfa->as_min_dfa;
-
-print $DFA1->equals($DFA2);
+my $trans = FLAT::Regex::Transform->new('abc&efg+hi');
+print Dumper($trans);
Added: trunk/perl-flat/lib/FLAT/Regex/Transform.pm
===================================================================
--- trunk/perl-flat/lib/FLAT/Regex/Transform.pm (rev 0)
+++ trunk/perl-flat/lib/FLAT/Regex/Transform.pm 2007-02-13 15:20:36 UTC (rev 86)
@@ -0,0 +1,18 @@
+package FLAT::Regex::Transform;
+
+# Extends FLAT::Regex::WithExtraOps with PRegex transformations
+# (i.e., reductions based on: w*v & a*b
+
+use base 'FLAT::Regex::WithExtraOps';
+
+sub new {
+ my $pkg = shift;
+ my $self = $pkg->SUPER::new(@_);
+ return $self;
+}
+
+# Ideally, the transformation should be implemented as an iterator. This
+# approach will be finite for shuffles with NO closed strings, but will carry on
+# indefinitely for the shuffle of strings where at least one of the strings is closed
+
+1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|