Changeset 2975


Ignore:
Timestamp:
Mar 27, 2013, 2:35:01 PM (5 years ago)
Author:
ksherdy
Message:

Updated tests and driver.

Location:
proto/pabloj/trunk
Files:
2 deleted
5 edited
2 copied

Legend:

Unmodified
Added
Removed
  • proto/pabloj/trunk/input/test/pabloS/statements/while/while1.pablos

    r2972 r2975  
    11function void While() {
    2                
     2                       
    33        var stream cursor = 1;
    44       
  • proto/pabloj/trunk/input/test/visitors/CarryIntroXFormer/FinalBlock/atEOF.pablos

    r2834 r2975  
    44                       
    55        // Translate atEOF(X) calls in non-final blocks to andc(X, EOF_mask)
    6         R = simd_andc(EOF_mask, X);
     6        R = simd_andc(X, EOF_mask);
    77        R = atEOF(X);
    88}
  • proto/pabloj/trunk/input/test/visitors/CarryIntroXFormer/FinalBlock/pablo2CarryQ.pablos

    r2834 r2975  
    77        // TODO - UPDATE EXPECTED RESULTS
    88       
    9         R = carryQ.BitBlock_advance_ci_co(C,carryQ.get_carry_in(0),0);  // Expected
     9        R = carry_set_0.BitBlock_advance_ci_co(C,carry_set_0.CarryAt(0),0);     // Expected
    1010        R = Advance(C);                                                                                                 // Translated
    1111               
    12         R = carryQ.BitBlock_advance_ci_co(C,carryQ.get_carry_in(1),1);
     12        R = carry_set_0.BitBlock_advance_ci_co(C,carry_set_0.CarryAt(1),1);
    1313        R = pablo.Advance(C);
    1414       
    15         R = carryQ.BitBlock_scantofirst(M,carryQ.get_carry_in(2),2);
     15        R = carry_set_0.BitBlock_scantofirst(M,carry_set_0.CarryAt(2),2);
    1616        R = ScanToFirst(M);
    1717
    18         R = carryQ.BitBlock_scantofirst(M,carryQ.get_carry_in(3),3);   
     18        R = carry_set_0.BitBlock_scantofirst(M,carry_set_0.CarryAt(3),3);       
    1919        R = pablo.ScanToFirst(M);
    2020
    21         R = carryQ.BitBlock_scanthru_ci_co(C,X,carryQ.get_carry_in(4),4);
     21        R = carry_set_0.BitBlock_scanthru_ci_co(C,X,carry_set_0.CarryAt(4),4);
    2222        R = ScanThru(C,X);
    2323
    24         R = carryQ.BitBlock_scanthru_ci_co(C,X,carryQ.get_carry_in(5),5);
     24        R = carry_set_0.BitBlock_scanthru_ci_co(C,X,carry_set_0.CarryAt(5),5);
    2525        R = pablo.ScanThru(C,X);
    2626
    27         R = carryQ.BitBlock_scanthru_ci_co(C,simd_andc(EOF_mask, X),carryQ.get_carry_in(6),6);
     27        R = carry_set_0.BitBlock_scanthru_ci_co(C,simd_andc(EOF_mask, X),carry_set_0.CarryAt(6),6);
    2828        R = ScanTo(C,X);
    2929       
    30         R = carryQ.BitBlock_scanthru_ci_co(C,simd_andc(EOF_mask, X),carryQ.get_carry_in(7),7); 
     30        R = carry_set_0.BitBlock_scanthru_ci_co(C,simd_andc(EOF_mask, X),carry_set_0.CarryAt(7),7);     
    3131        R = pablo.ScanTo(C,X);
    3232
    33         R = carryQ.BitBlock_advance_then_scanthru(C,X,carryQ.get_carry_in(8),8);
     33        R = carry_set_0.BitBlock_advance_then_scanthru(C,X,carry_set_0.CarryAt(8),8);
    3434        R = AdvanceThenScanThru(C,X);
    3535       
    36         R = carryQ.BitBlock_advance_then_scanthru(C,X,carryQ.get_carry_in(9),9);       
     36        R = carry_set_0.BitBlock_advance_then_scanthru(C,X,carry_set_0.CarryAt(9),9);   
    3737        R = pablo.AdvanceThenScanThru(C,X);
    3838
    39         R = carryQ.BitBlock_advance_then_scanthru(C,simd_andc(EOF_mask, X),carryQ.get_carry_in(10),10);                 
     39        R = carry_set_0.BitBlock_advance_then_scanthru(C,simd_andc(EOF_mask, X),carry_set_0.CarryAt(10),10);                   
    4040        R = AdvanceThenScanTo(C,X);
    4141       
    42         R = carryQ.BitBlock_advance_then_scanthru(C,simd_andc(EOF_mask, X),carryQ.get_carry_in(11),11);
     42        R = carry_set_0.BitBlock_advance_then_scanthru(C,simd_andc(EOF_mask, X),carry_set_0.CarryAt(11),11);   
    4343        R = pablo.AdvanceThenScanTo(C,X);
    4444
    45         R = carryQ.BitBlock_span_upto(C,X,carryQ.get_carry_in(12),12);
     45        R = carry_set_0.BitBlock_span_upto(C,X,carry_set_0.CarryAt(12),12);
    4646        R = SpanUpTo(C,X);
    4747       
    48         R = carryQ.BitBlock_span_upto(C,X,carryQ.get_carry_in(13),13); 
     48        R = carry_set_0.BitBlock_span_upto(C,X,carry_set_0.CarryAt(13),13);     
    4949        R = pablo.SpanUpTo(C,X);
    5050               
    51         R = carryQ.BitBlock_inclusive_span(C,X,carryQ.get_carry_in(14),14);     
     51        R = carry_set_0.BitBlock_inclusive_span(C,X,carry_set_0.CarryAt(14),14);       
    5252        R = InclusiveSpan(C,X);
    5353       
    54         R = carryQ.BitBlock_inclusive_span(C,X,carryQ.get_carry_in(15),15);     
     54        R = carry_set_0.BitBlock_inclusive_span(C,X,carry_set_0.CarryAt(15),15);       
    5555        R = pablo.InclusiveSpan(C,X);                   
    5656
    57         R = carryQ.BitBlock_exclusive_span(C,X,carryQ.get_carry_in(16),16);     
     57        R = carry_set_0.BitBlock_exclusive_span(C,X,carry_set_0.CarryAt(16),16);       
    5858        R = ExclusiveSpan(C,X);
    5959       
    60         R = carryQ.BitBlock_exclusive_span(C,X,carryQ.get_carry_in(17),17);             
     60        R = carry_set_0.BitBlock_exclusive_span(C,X,carry_set_0.CarryAt(17),17);               
    6161        R = pablo.ExclusiveSpan(C,X);                   
    6262               
  • proto/pabloj/trunk/input/test/visitors/CarryIntroXFormer/NotFinalBlock/pablo2CarryQ.pablos

    r2834 r2975  
    77        // TODO - UPDATE EXPECTED RESULTS
    88       
    9         R = carryQ.BitBlock_advance_ci_co(C,carryQ.get_carry_in(0),0);  // Expected
     9        R = carry_set_0.BitBlock_advance_ci_co(C,carry_set_0.CarryAt(0),0);     // Expected
    1010        R = Advance(C);                                                                                                 // Translated
    1111               
    12         R = carryQ.BitBlock_advance_ci_co(C,carryQ.get_carry_in(1),1);
     12        R = carry_set_0.BitBlock_advance_ci_co(C,carry_set_0.CarryAt(1),1);
    1313        R = pablo.Advance(C);
    1414       
    15         R = carryQ.BitBlock_scantofirst(M,carryQ.get_carry_in(2),2);
     15        R = carry_set_0.BitBlock_scantofirst(M,carry_set_0.CarryAt(2),2);
    1616        R = ScanToFirst(M);
    1717
    18         R = carryQ.BitBlock_scantofirst(M,carryQ.get_carry_in(3),3);   
     18        R = carry_set_0.BitBlock_scantofirst(M,carry_set_0.CarryAt(3),3);       
    1919        R = pablo.ScanToFirst(M);
    2020
    21         R = carryQ.BitBlock_scanthru_ci_co(C,X,carryQ.get_carry_in(4),4);
     21        R = carry_set_0.BitBlock_scanthru_ci_co(C,X,carry_set_0.CarryAt(4),4);
    2222        R = ScanThru(C,X);
    2323
    24         R = carryQ.BitBlock_scanthru_ci_co(C,X,carryQ.get_carry_in(5),5);
     24        R = carry_set_0.BitBlock_scanthru_ci_co(C,X,carry_set_0.CarryAt(5),5);
    2525        R = pablo.ScanThru(C,X);
    2626
    27         R = carryQ.BitBlock_scanthru_ci_co(C,simd_not(X),carryQ.get_carry_in(6),6);
     27        R = carry_set_0.BitBlock_scanthru_ci_co(C,simd_not(X),carry_set_0.CarryAt(6),6);
    2828        R = ScanTo(C,X);
    2929       
    30         R = carryQ.BitBlock_scanthru_ci_co(C,simd_not(X),carryQ.get_carry_in(7),7);     
     30        R = carry_set_0.BitBlock_scanthru_ci_co(C,simd_not(X),carry_set_0.CarryAt(7),7);       
    3131        R = pablo.ScanTo(C,X);
    3232
    33         R = carryQ.BitBlock_advance_then_scanthru(C,X,carryQ.get_carry_in(8),8);
     33        R = carry_set_0.BitBlock_advance_then_scanthru(C,X,carry_set_0.CarryAt(8),8);
    3434        R = AdvanceThenScanThru(C,X);
    3535       
    36         R = carryQ.BitBlock_advance_then_scanthru(C,X,carryQ.get_carry_in(9),9);       
     36        R = carry_set_0.BitBlock_advance_then_scanthru(C,X,carry_set_0.CarryAt(9),9);   
    3737        R = pablo.AdvanceThenScanThru(C,X);
    3838
    39         R = carryQ.BitBlock_advance_then_scanthru(C,simd_not(X),carryQ.get_carry_in(10),10);                   
     39        R = carry_set_0.BitBlock_advance_then_scanthru(C,simd_not(X),carry_set_0.CarryAt(10),10);                       
    4040        R = AdvanceThenScanTo(C,X);
    4141       
    42         R = carryQ.BitBlock_advance_then_scanthru(C,simd_not(X),carryQ.get_carry_in(11),11);   
     42        R = carry_set_0.BitBlock_advance_then_scanthru(C,simd_not(X),carry_set_0.CarryAt(11),11);       
    4343        R = pablo.AdvanceThenScanTo(C,X);
    4444
    45         R = carryQ.BitBlock_span_upto(C,X,carryQ.get_carry_in(12),12);
     45        R = carry_set_0.BitBlock_span_upto(C,X,carry_set_0.CarryAt(12),12);
    4646        R = SpanUpTo(C,X);
    4747       
    48         R = carryQ.BitBlock_span_upto(C,X,carryQ.get_carry_in(13),13); 
     48        R = carry_set_0.BitBlock_span_upto(C,X,carry_set_0.CarryAt(13),13);     
    4949        R = pablo.SpanUpTo(C,X);
    5050               
    51         R = carryQ.BitBlock_inclusive_span(C,X,carryQ.get_carry_in(14),14);     
     51        R = carry_set_0.BitBlock_inclusive_span(C,X,carry_set_0.CarryAt(14),14);       
    5252        R = InclusiveSpan(C,X);
    5353       
    54         R = carryQ.BitBlock_inclusive_span(C,X,carryQ.get_carry_in(15),15);     
     54        R = carry_set_0.BitBlock_inclusive_span(C,X,carry_set_0.CarryAt(15),15);       
    5555        R = pablo.InclusiveSpan(C,X);                   
    5656
    57         R = carryQ.BitBlock_exclusive_span(C,X,carryQ.get_carry_in(16),16);     
     57        R = carry_set_0.BitBlock_exclusive_span(C,X,carry_set_0.CarryAt(16),16);       
    5858        R = ExclusiveSpan(C,X);
    5959       
    60         R = carryQ.BitBlock_exclusive_span(C,X,carryQ.get_carry_in(17),17);             
     60        R = carry_set_0.BitBlock_exclusive_span(C,X,carry_set_0.CarryAt(17),17);               
    6161        R = pablo.ExclusiveSpan(C,X);                   
    6262               
  • proto/pabloj/trunk/src/test/pabloB/PabloBAST.java

    r2956 r2975  
    11/*
    2  * Quick and dirty test PabloB test driver program.
     2 * Quick and dirty.
    33 *
    4  * Recursively traverses directories and parses .pabloB files.
    5  *
    6  * For each .pabloB file if no syntax errors are encountered the AST is output otherwise
    7  * an error message is output.
     4 * Recursively traverses and parses PabloS files (.pabloS). 
     5 * If no errors PabloS AST prints AST otherwise prints error message.
    86 *
    97 * @author Ken Herdy <ksherdy at sfu dot ca>
    108 * @date December 17 2012
     9 *
     10 * TODO -
     11 *
     12 * Make a single input file the default.
     13 * Add a simple CLI command line arg handler.
    1114 */
    1215 
    13 package test.pabloB.grammar;
     16package test.pabloB;
    1417
    1518import java.io.*;
     
    2326import test.PabloApplication;
    2427
    25 public class TestPabloBAST extends SampleApplication {
     28public class PabloBAST extends SampleApplication {
    2629
    2730        private static final String PABLOBEXT = ".pablob";
     
    3437               
    3538                List<File> list = listFilesInDirectory(new File(args[0]),PABLOBEXT);
    36                
    3739                Collections.sort(list);
    38                
    3940                for(File f: list) {
    4041                        System.out.println(delimeterLine());
  • proto/pabloj/trunk/src/test/pabloS/PabloSAST.java

    r2956 r2975  
    11/*
    2  * Quick and dirty test PabloB test driver program.
     2 * Quick and dirty.
    33 *
    4  * Recursively traverses directories and parses .pabloB files.
    5  *
    6  * For each .pabloB file if no syntax errors are encountered the AST is output otherwise
    7  * an error message is output.
     4 * Recursively traverses and parses PabloS files (.pabloS). 
     5 * If no errors PabloS AST prints AST otherwise prints error message.
    86 *
    97 * @author Ken Herdy <ksherdy at sfu dot ca>
    108 * @date December 17 2012
     9 *
     10 * TODO -
     11 *
     12 * Make a single input file the default.
     13 * Add a simple CLI command line arg handler.
     14 *
    1115 */
    1216 
    13 package test.pabloS.grammar;
     17package test.pabloS;
    1418
    1519import java.io.*;
     
    2529
    2630
    27 public class TestPabloSAST extends SampleApplication {
     31public class PabloSAST extends SampleApplication {
    2832
    2933        private static final String PABLOSEXT = ".pablos";
     
    3741               
    3842                List<File> list = TestUtil.listFilesInDirectory(new File(args[0]),PABLOSEXT);
    39                
    4043                Collections.sort(list);
    41                
    4244                for(File f: list) {
    4345                        System.out.println(TestUtil.delimeterLine());
  • proto/pabloj/trunk/src/test/pabloS/PabloSTestHarness.java

    r2972 r2975  
    2121import compilers.pabloS.semanticAnalyzer.visitors.AdvanceCombinerXFormer;
    2222import compilers.pabloS.semanticAnalyzer.visitors.AugAssignXFormer;
     23import compilers.pabloS.semanticAnalyzer.visitors.Bitwise2IDISAXFormer;
    2324import compilers.pabloS.semanticAnalyzer.visitors.InitStreamDefaultsXFormer;
    2425import compilers.pabloS.semanticAnalyzer.visitors.CarryIntroXFormer;
     
    4748            CARRYINTROXFORMERNOTFINALBLOCK("CarryIntroXFormer/NotFinalBlock", true),
    4849            CARRYINTROXFORMERFINALBLOCK("CarryIntroXFormer/FinalBlock", true);
     50           
    4951            //ASSERTZERO("",true); // TODO
    5052           
     
    163165               
    164166                for (Map.Entry<String, ASTNode> entry : streamFuncMap.entrySet()) {                                             
    165                         InitStreamDefaultsXFormer bitwiseToIDISA = new InitStreamDefaultsXFormer(entry.getValue());
    166                         bitwiseToIDISA.XForm();                     
     167                        Bitwise2IDISAXFormer bitwise2IDISA = new Bitwise2IDISAXFormer(entry.getValue());
     168                        bitwise2IDISA.XForm();                     
    167169                }
    168170               
Note: See TracChangeset for help on using the changeset viewer.