예제 #1
0
  @Test
  public void testDryRun() {
    TestUtils.checkDirectory(programs_location, cFileFilter, parserTest("--dry-run"), false);

    TestUtils.checkDirectoryRec(
        mini_programs_location, cFileFilter, parserTest("--dry-run", "--iter-times", "1"), false);

    TestUtils.checkDirectoryRec(
        mini_programs_location,
        cFileFilter,
        parserTest("--dry-run", "--iter-times", "1", "--lambda"),
        false);

    TestUtils.checkDirectoryRec(
        mini_programs_location,
        cFileFilter,
        parserTest("--dry-run", "--multi-cell", "--iter-times", "1"),
        false);

    TestUtils.checkDirectoryRec(
        mini_programs_location,
        cFileFilter,
        parserTest("--dry-run", "--multi-cell", "--iter-times", "1", "--lambda"),
        false);
  }
예제 #2
0
 private void runCascadeTO(final String... args) throws Exception {
   System.out.println("runCascade with timeout " + "20s: " + Joiner.on(";").join(args));
   TestUtils.callWithTimeout(
       new Runnable() {
         @Override
         public void run() {
           Preferences.clearAll();
           try {
             Main main = getInjector().getInstance(Main.class);
             main.init();
             List<String> files = main.processCommandLine(args);
             main.setOutStream(System.out);
             main.setErrStream(IOUtils.NULL_PRINT_STREAM);
             IOUtils.enableOut();
             main.run(files);
           } catch (TheoremProverException e) {
             e.printStackTrace();
           } catch (IOException e) {
             e.printStackTrace();
           } catch (ParseException e) {
             e.printStackTrace();
           }
         }
       },
       20);
 }
예제 #3
0
  @Test
  @Ignore
  public void testReachability() {
    File bv_programs_location = new File(sv_programs_location, "bitvector");
    File bv_reg_programs_location = new File(sv_programs_location, "bitvector-regression");

    TestUtils.checkDirectoryRec(
        bv_programs_location,
        iFileFilter,
        parserTestTimeout(
            "-r", "ERROR", "--multi-cell", "--iter-times", "10", "--function-inline", "2"),
        false);
    TestUtils.checkDirectoryRec(
        bv_reg_programs_location,
        iFileFilter,
        parserTestTimeout(
            "-r", "ERROR", "--multi-cell", "--iter-times", "10", "--function-inline", "2"),
        false);
  }
예제 #4
0
  @Test
  @Ignore
  public void testFieldSensitive() {
    File invalid_programs_location = new File(mini_programs_location, "invalid");
    File valid_programs_location = new File(mini_programs_location, "valid");
    Tester<File> tester =
        parserTestTimeout(
            "--inline-anno",
            "--iter-times",
            "10",
            "--vari-cell",
            "--lambda",
            "--memory-check",
            "--hoare",
            "--fs",
            "-m32");

    TestUtils.checkDirectoryRec(invalid_programs_location, cFileFilter, tester, false);
    TestUtils.checkDirectoryRec(valid_programs_location, cFileFilter, tester, false);
  }
예제 #5
0
  @Test
  // @Ignore
  public void testCFSCSMiniBenchmark() {
    final Tester<File> SoundTester =
        parserTestTimeout(
            "--inline-anno",
            "--iter-times",
            "10",
            "-m32",
            "--vari-cell",
            "--lambda",
            "--memory-check",
            "--hoare",
            "-cfscs");

    File invalid_location = new File(mini_programs_location, "invalid");
    File valid_location = new File(mini_programs_location, "valid");

    TestUtils.checkDirectoryRec(invalid_location, falseDerefFileFilter, SoundTester, false);
    TestUtils.checkDirectoryRec(invalid_location, falseFreeFileFilter, SoundTester, false);
    TestUtils.checkDirectoryRec(invalid_location, falseMemtrackFileFilter, SoundTester, false);
    TestUtils.checkDirectoryRec(invalid_location, falseAssertFileFilter, SoundTester, false);
    TestUtils.checkDirectoryRec(valid_location, cFileFilter, SoundTester, false);
  }
예제 #6
0
 private void runCascade(final String... args) throws Exception {
   System.out.println("runCascade: " + Joiner.on(";").join(args));
   TestUtils.callMayExit(
       new Callable<Void>() {
         @Override
         public Void call() throws Exception {
           Preferences.clearAll();
           Main main = getInjector().getInstance(Main.class);
           main.init();
           List<String> files = main.processCommandLine(args);
           main.setOutStream(IOUtils.NULL_PRINT_STREAM);
           main.setErrStream(System.err);
           main.setStatsStream(System.err);
           main.run(files);
           return null;
         }
       });
 }
예제 #7
0
  @Test
  @Ignore
  public void testMemorySafety() {
    File memsafety_programs_location = new File(sv_programs_location, "memsafety");

    TestUtils.checkDirectoryRec(
        memsafety_programs_location,
        iFileFilter,
        parserTestTimeout(
            "--memory-check",
            "--lambda",
            "--hoare",
            "--multi-cell",
            "--iter-times",
            "10",
            "--function-inline",
            "2"),
        false);
  }
예제 #8
0
 @Test
 @Ignore
 public void testNecInlineBenchmarkDry() {
   final Tester<File> SoundTester = parserTestTimeout("--dry-run", "--inline-anno");
   TestUtils.checkDirectoryRec(nec_inline_programs_location, cFileFilter, SoundTester, false);
 }
예제 #9
0
 @Test
 public void testProperties() {
   TestUtils.checkDirectory(bad_programs_location, propFileFilter, parserTest("--prop"), true);
 }
예제 #10
0
 @Test
 public void testBadProgramsNoThreads() {
   TestUtils.checkDirectory(
       bad_programs_location, cFileFilter, parserTest("--parsec", "--no-threads"), true);
 }
예제 #11
0
 @Test
 public void testPrograms() {
   TestUtils.checkDirectory(programs_location, cFileFilter, parserTest("--parsec"), false);
 }