Rebrand from FCO to Tock
This commit is contained in:
parent
1932ae534a
commit
2be9b16cc7
|
@ -37,10 +37,10 @@ genTLPChannel TLPError = tell ["err"]
|
|||
|
||||
genTopLevel :: A.Process -> CGen ()
|
||||
genTopLevel p
|
||||
= do tell ["#include <fco_support.h>\n"]
|
||||
= do tell ["#include <tock_support.h>\n"]
|
||||
genProcess p
|
||||
(name, chans) <- tlpInterface
|
||||
tell ["void fco_main (Process *me, Channel *in, Channel *out, Channel *err) {\n"]
|
||||
tell ["void tock_main (Process *me, Channel *in, Channel *out, Channel *err) {\n"]
|
||||
genName name
|
||||
tell [" (me"]
|
||||
sequence_ [tell [", "] >> genTLPChannel c | c <- chans]
|
||||
|
|
|
@ -49,7 +49,7 @@ getOpts argv =
|
|||
case getOpt RequireOrder options argv of
|
||||
(o,n,[] ) -> return (o,n)
|
||||
(_,_,errs) -> error (concat errs ++ usageInfo header options)
|
||||
where header = "Usage: fco [OPTION...] SOURCEFILE"
|
||||
where header = "Usage: tock [OPTION...] SOURCEFILE"
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
targets = fco
|
||||
targets = tock
|
||||
|
||||
all: $(targets)
|
||||
|
||||
|
@ -24,15 +24,15 @@ sources = \
|
|||
Utils.hs
|
||||
|
||||
$(targets): $(sources)
|
||||
ghc -fglasgow-exts -fallow-undecidable-instances -o fco --make Main
|
||||
ghc -fglasgow-exts -fallow-undecidable-instances -o tock --make Main
|
||||
|
||||
CFLAGS = -g -std=gnu99 -Wall `kroc --cflags` `kroc --ccincpath`
|
||||
|
||||
%.fco.c: %.occ fco
|
||||
./fco -v -o $@ $<
|
||||
%.tock.c: %.occ tock
|
||||
./tock -v -o $@ $<
|
||||
indent -kr -pcs $@
|
||||
|
||||
%: %.fco.o fco_support.h kroc-wrapper-c.o kroc-wrapper.occ
|
||||
%: %.tock.o tock_support.h kroc-wrapper-c.o kroc-wrapper.occ
|
||||
kroc -o $@ kroc-wrapper.occ $< kroc-wrapper-c.o -lcif
|
||||
|
||||
cgtests = $(wildcard cgtests/cgtest??.occ)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-- | A generic show implementation that pretty-prints expressions.
|
||||
-- This ought to use a class (like show does), so that it can be extended
|
||||
-- properly without me needing to have FCO-specific cases in here -- see the
|
||||
-- properly without me needing to have Tock-specific cases in here -- see the
|
||||
-- appropriate SYB paper.
|
||||
module PrettyShow (pshow) where
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
To-do list for FCO
|
||||
------------------
|
||||
To-do list for Tock
|
||||
-------------------
|
||||
|
||||
## General
|
||||
|
||||
Tock would be a good name for this (Translator from occam to C from Kent).
|
||||
|
||||
## Data structures
|
||||
|
||||
Think about simplifying the subscript types -- just have a single data type
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
-- | Utility functions that aren't inherently related to FCO -- i.e. things
|
||||
-- | Utility functions that aren't inherently related to Tock -- i.e. things
|
||||
-- that could be put into the standard library.
|
||||
module Utils where
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
/* KRoC wrapper to run FCO-generated CIF program */
|
||||
/* KRoC wrapper to run Tock-generated CIF program */
|
||||
|
||||
#include <cifccsp.h>
|
||||
|
||||
extern void fco_main (Process *me, Channel *in, Channel *out, Channel *err);
|
||||
extern void tock_main (Process *me, Channel *in, Channel *out, Channel *err);
|
||||
|
||||
void _fco_main_init (int *ws) {
|
||||
Process *p = ProcAlloc (fco_main, 65536, 3,
|
||||
void _tock_main_init (int *ws) {
|
||||
Process *p = ProcAlloc (tock_main, 65536, 3,
|
||||
(Channel *) ws[1], (Channel *) ws[2], (Channel *) ws[3]);
|
||||
*((int *) ws[0]) = (int) p;
|
||||
}
|
||||
|
||||
void _fco_main_free (int *ws) {
|
||||
void _tock_main_free (int *ws) {
|
||||
ProcAllocClean ((Process *) ws[0]);
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
-- KRoC wrapper to run FCO-generated CIF program
|
||||
-- KRoC wrapper to run Tock-generated CIF program
|
||||
|
||||
#INCLUDE "cifccsp.inc"
|
||||
|
||||
#PRAGMA EXTERNAL "PROC C.fco.main.init (INT raddr, CHAN BYTE in?, out!, err!) = 0"
|
||||
#PRAGMA EXTERNAL "PROC C.fco.main.free (VAL INT raddr) = 0"
|
||||
#PRAGMA EXTERNAL "PROC C.tock.main.init (INT raddr, CHAN BYTE in?, out!, err!) = 0"
|
||||
#PRAGMA EXTERNAL "PROC C.tock.main.free (VAL INT raddr) = 0"
|
||||
|
||||
PROC kroc.main (CHAN BYTE in?, out!, err!)
|
||||
INT addr:
|
||||
SEQ
|
||||
C.fco.main.init (addr, in?, out!, err!)
|
||||
C.tock.main.init (addr, in?, out!, err!)
|
||||
cifccsp.startprocess (addr)
|
||||
C.fco.main.free (addr)
|
||||
C.tock.main.free (addr)
|
||||
:
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// C99 support definitions for FCO.
|
||||
// C99 support definitions for Tock.
|
||||
// vim:set foldmethod=marker:
|
||||
|
||||
#ifndef FCO_SUPPORT_H
|
||||
#define FCO_SUPPORT_H
|
||||
#ifndef TOCK_SUPPORT_H
|
||||
#define TOCK_SUPPORT_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
Loading…
Reference in New Issue
Block a user