Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaned up. Added some neglected files. Added .gitignores.
- Loading branch information
Showing
11 changed files
with
169 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.o | ||
*.hi | ||
*~ | ||
dist/ | ||
scrap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env runhaskell | ||
|
||
import System.Directory | ||
import HSH | ||
|
||
-- cd = setCurrentDirectory | ||
|
||
|
||
publishdir = "/var/www/nightlytest/Haskell-CnC/" | ||
|
||
main = do | ||
|
||
putStrLn "Running full nightly regression tests in the current directory." | ||
|
||
-- runIO "git clone git://github.com/rrnewton/Haskell-CnC.git" | ||
-- cd "Haskell-CnC" | ||
|
||
putStrLn "Done with all regression testing." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.out | ||
*.ERR | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
[2011.01.04] | ||
|
||
This directory contains a number of tests that exercise the | ||
translator. To perform tests it is also necessary to have a working | ||
installation of the Intel CnC for C++ library. | ||
|
||
Currently this directory contains a makefile for building tests, as | ||
well as a Haskell script for running them (run_tests.hs). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//Each name starts and ends with '_' | ||
//a starting '_' is omitted | ||
|
||
//Is correct: Yes | ||
|
||
(_Work_); | ||
(_Start_); | ||
[_type_ _item_ <_int_>]; | ||
<_int_ _singleton_>; | ||
<_singleton_> :: (_Start_); | ||
<_int_ _worker_>; | ||
<_worker_> :: (_Work_); | ||
env -> <_singleton_>; | ||
(_Start_) -> [_item_]; | ||
(_Start_) -> <_worker_>; | ||
(_Work_) -> [_item_]; | ||
[_item_] -> env; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
|
||
// This version uses the same .cnc file but breaks the rules. | ||
|
||
#include<tagfun_checking_valid.h> | ||
|
||
template < class ctxt > | ||
int S1::execute( const int & tag, ctxt & c) const { | ||
printf("Step1 exec with tag %d\n", tag); | ||
c.T2.put(tag); | ||
return CnC::CNC_Success; | ||
} | ||
|
||
template < class ctxt > | ||
int S2::execute( const int & tag, ctxt & c) const { | ||
printf("Step2 exec with tag %d\n", tag); | ||
// VIOLATE THE TAG FUNCTION HERE, +2 instead of +1: | ||
c.I.put(tag + 2, (tag * 3.33)); | ||
return CnC::CNC_Success; | ||
} | ||
|
||
int main () { | ||
printf ("Running with tagfun checking.\n"); | ||
tagfun_checking_valid_context context; | ||
|
||
// Put some tags into the collection in a naive way: | ||
for(int i=0; i<5; i++) | ||
context.T1.put(i); | ||
|
||
context.wait(); | ||
|
||
double fl; | ||
context.I.get(3, fl); | ||
printf("Retrieve a single item, index 3: %lf\n", fl); | ||
return 0; | ||
} | ||
|
||
|
||
|
||
// template < class ctxt > | ||
// int S::execute( const int & tag, ctxt & c) const { | ||
// printf("Step exec with tag %d\n", tag); | ||
|
||
// // VIOLATE THE TAG FUNCTION HERE: | ||
// c.I.put(tag + 2, (tag * 3.33)); | ||
|
||
// return CnC::CNC_Success; | ||
// } | ||
|
||
// int main () { | ||
// printf ("Running with tagfun checking.\n"); | ||
// tagfun_checking_valid_context context; | ||
|
||
// // Put some tags into the collection in a naive way: | ||
// for(int i=0; i<10; i++) | ||
// context.T.put(i); | ||
|
||
// context.wait(); | ||
|
||
// double fl; | ||
// context.I.get(3, fl); | ||
|
||
// printf("Retrieve a single item, index 3: %lf\n", fl); | ||
// return 0; | ||
// } |