Changeset - 8278ae29364e
[Not reviewed]
0 2 0
Christopher Esterhuyse - 5 years ago 2020-08-27 17:16:54
christopher.esterhuyse@gmail.com
adopt Reo's naming conventions for canonical protocols, e.g., replicator2
2 files changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/protocol/inputsource.rs
Show inline comments
 
@@ -21,20 +21,20 @@ primitive forward(in i, out o) {
 
primitive sync(in i, out o) {
 
    while(true) synchronous() if(fires(i)) put(o, get(i));
 
}
 
primitive alternator_2(in i, out l, out r) {
 
primitive alternator2(in i, out l, out r) {
 
    while(true) {
 
        synchronous() if(fires(i)) put(l, get(i));
 
        synchronous() if(fires(i)) put(r, get(i));
 
    }
 
}
 
primitive replicator_2(in i, out l, out r) {
 
primitive replicator2(in i, out l, out r) {
 
    while(true) synchronous() if(fires(i)) {
 
        msg m = get(i);
 
        put(l, m);
 
        put(r, m);
 
    }
 
}
 
primitive merger_2(in l, in r, out o) {
 
primitive merger2(in l, in r, out o) {
 
    while(true) synchronous {
 
        if(fires(l))      put(o, get(l));
 
        else if(fires(r)) put(o, get(r));
src/runtime/tests.rs
Show inline comments
 
@@ -962,9 +962,9 @@ fn pdl_reo_fifo1() {
 
}
 

	
 
#[test]
 
fn pdl_reo_fifo1_full() {
 
fn pdl_reo_fifo1full() {
 
    let pdl = b"
 
    primitive fifo1_full(in a, out b) {
 
    primitive fifo1full(in a, out b) {
 
        msg m = create(0);
 
        while(true) synchronous {
 
            if(m == null) {
 
@@ -980,7 +980,7 @@ fn pdl_reo_fifo1_full() {
 
    let mut c = Connector::new(Box::new(DummyLogger), Arc::new(pd), 0);
 
    let [_p0, g0] = c.new_port_pair();
 
    let [p1, g1] = c.new_port_pair();
 
    c.add_component(b"fifo1_full", &[g0, p1]).unwrap();
 
    c.add_component(b"fifo1full", &[g0, p1]).unwrap();
 
    c.connect(None).unwrap();
 
    c.get(g1).unwrap();
 
    c.sync(None).unwrap();
0 comments (0 inline, 0 general)