From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 46906BC6B for ; Wed, 10 Oct 2007 12:31:40 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAIZGDEfZDAsinmdsb2JhbACOSAIBAQcEBhEY X-IronPort-AV: E=Sophos;i="4.21,253,1188770400"; d="scan'208";a="4303626" Received: from smtp003.mail.ukl.yahoo.com ([217.12.11.34]) by mail3-smtp-sop.national.inria.fr with SMTP; 10 Oct 2007 12:31:39 +0200 Received: (qmail 92249 invoked from network); 10 Oct 2007 10:31:39 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.fr; h=Received:X-YMail-OSG:In-Reply-To:References:Mime-Version:Content-Type:Message-Id:Cc:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer; b=cf5W6Wk2JE3Bx8nnZ4fZ6hmrm+kZMAyOZGM1wLmucKQkQO7RutglKnsEWjydlH0U8W9vFpuj2O5O+/uUx0vwdc1w8h+ZHeTg1FxI2Ksaol+v6GONgVmm6u0Izu8qggDtvOTJmXI1Y/FdtSziIoviU8FWHa67eoTu6/kP/yubkFc= ; Received: from unknown (HELO ?192.168.0.10?) (vincent.aravantinos@82.229.199.66 with plain) by smtp003.mail.ukl.yahoo.com with SMTP; 10 Oct 2007 10:31:38 -0000 X-YMail-OSG: ReefBmAVM1kLF4mzRyqiCU24ua3arHKzz9mMXdKFtGR0aJ1SoTbkLUgyJ1r2bVPONb5XZieLog-- In-Reply-To: <470CA488.1070804@inescporto.pt> References: <470C8199.4080708@inescporto.pt> <1192005274.6285.4.camel@rosella.wigram> <470CA488.1070804@inescporto.pt> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <3EDA3D93-DE9A-4336-B65E-03593A3B9723@yahoo.fr> Cc: caml-list@yquem.inria.fr Content-Transfer-Encoding: quoted-printable From: Vincent Aravantinos Subject: Re: [Caml-list] Functional design for a basic simulation pipe. Date: Wed, 10 Oct 2007 12:31:34 +0200 To: Hugo Ferreira X-Mailer: Apple Mail (2.752.2) X-Spam: no; 0.00; caml-list:01 termination:01 data:02 data:02 exp:02 exp:02 functional:02 functional:02 output:02 output:02 programming:03 let:03 let:03 experiments:03 outputs:04 Le 10 oct. 07 =E0 12:08, Hugo Ferreira a =E9crit : > Apologies for being so obtuse but I cannot to see how this solves my > problem. Please note that I am not well versed in functional =20 > programming > so that what I am asking may not be possible. Lets say I have a small > pipe of 3 actions: > > let exp =3D a |> b |> c > > a: requires the input of a state and outputs an event > b: requires input of a state and the event generated at that state and > outputs processed data > c: consumes n number elements of processed data and stops when it > requires no more such data > > Note that "c" will "pull in" for example 10 states and check for > termination, "b" will therefore need "pull in" 10 events. Each time it > pulls in an event it generates a state. This last state must be made > available to "a" so that it may generate its next event. > > The issue here is how can I implement this so that I can flexibly > configure experiments by "constructing" a chain of actions but =20 > still be > able to pass back the state to one of those actions. Something like: > > let exp =3D a |> b (output 1 back to a) |> c Just to be sure I understood well, here is a diagram: --> a --> b -+-------------------------------------------------> output1 | +--state1-> a --> b -+----------------------------> =20 output2 | +-state2-> a --> b -+--------> =20 output3 | ... -> =20 outputn | | | V c Do you agree with this ? (n beeing a variable of course...) Shall c also take the states ? (I believe in good drawings to help finding an answer...)=