module SOFA { module demos { module protodemo { interface LogInterface { void log(in string number); protocol: log* }; interface WorkInterface { void start(); void doit(); void finish(); protocol: start; doit*; finish }; frame Worker { provides: WorkInterface Work; protocol: ?Work.start ; ?Work.doit* ; ?Work.finish }; frame LoggingWorker { provides: WorkInterface Work; requires: LogInterface Log; protocol: !Log.log; ?Work.start{ !Log.log } ; ?Work.doit{ !Log.log }* ; ?Work.finish{ !Log.log }; !Log.log }; frame Logger { provides: LogInterface Log; protocol: ?Log.log* }; frame Beast { requires: WorkInterface worker; protocol: !worker.start ; !worker.doit ; !worker.doit ; !worker.finish }; }; }; }; architecture CUNI ::SOFA::demos::protodemo::LoggingWorkerBody implements ::SOFA::demos::protodemo::LoggingWorker primitive; architecture CUNI ::SOFA::demos::protodemo::Logger implements ::SOFA::demos::protodemo::Logger primitive; architecture CUNI ::SOFA::demos::protodemo::Beast implements ::SOFA::demos::protodemo::Beast primitive; architecture CUNI ::SOFA::demos::protodemo::LoggingWorker implements ::SOFA::demos::protodemo::Worker { inst ::SOFA::demos::protodemo::LoggingWorker worker; inst ::SOFA::demos::protodemo::Logger logger; bind worker:Log to logger:Log using CSProcCall; delegate Work to worker:Work using CSProcCall; }; system architecture CUNI ::SOFA::demos::protodemo::loggingworker implements ::SOFA::libs::Application { inst ::SOFA::demos::protodemo::Worker worker; inst ::SOFA::demos::protodemo::Beast beast; bind beast:worker to worker:Work using CSProcCall; };