((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/signal-diagram" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.") (tags "eggs") (toc)) (section 2 "signal-diagram" (section 3 "Description" (p (tt "signal-diagram") " implements functional reactive combinators that are used to build signal flow functions out of pure functions.") (p (tt "signal-diagram") " is inspired by functional reactive libraries such as " (link "http://www.haskell.org/haskellwiki/Yampa" "Yampa") " and " (link "http://perso.eleves.bretagne.ens-cachan.fr/~dagand/opis/" "Opis") ".") (p (tt "signal-diagram") " provides a set of combinators to construct signal functions, which are functions operating on continuous time varying values. Every signal function has named input and output signals.") (p (tt "signal-diagram") " can generate executable code from a signal function definition in Scheme, Standard ML, and GNU Octave.") (section 4 "Pure signal functions and functional expressions") (section 4 "Basic combinators" (def (sig (procedure "(IDENTITY f)" (id IDENTITY))) (p "Constructs a signal function that copies its input to the ouput.")) (def (sig (procedure "(PURE f)" (id PURE))) (p "Constructs a signal function with no side effects.")) (def (sig (procedure "(RELATION  r f)" (id RELATION))) (p "Defines the relation " (tt "r") " within the signal function " (tt "f") ".")) (def (sig (procedure "(UNION f g)" (id UNION))) (p "Constructs a signal function whose input is the union of the inputs of signal functions " (tt "f") " and " (tt "g") ", and whose output is the union of the outputs of " (tt "f") " and " (tt "g") ".")) (def (sig (procedure "(SEQUENCE f g)" (id SEQUENCE))) (p "Constructs a signal function that feeds its input to signal function " (tt "f") ", then takes the resulting output and feeds it to " (tt "g") ", along with any additional inputs required by " (tt "g") ".")) (def (sig (procedure "(PIPE f g)" (id PIPE))) (p "Constructs a signal function that feeds its input to signal function " (tt "f") ", then takes the resulting output and feeds it to " (tt "g") ", without any any additional inputs.")) (def (sig (procedure "(SENSE  ss f)" (id SENSE))) (p "Constructs a signal function that selects only the signals enumerated in " (tt "ss") " from its input, and feeds the result to the signal function " (tt "f") ".")) (def (sig (procedure "(ACTUATE ss f)" (id ACTUATE))) (p "Renames the outputs of " (tt "f") " to the names specified in " (tt "ss") ".")) (def (sig (procedure "(RTRANSITION f g ef eg s)" (id RTRANSITION))) (p "Recurrent transition: constructs a signal function that behaves like " (tt "f") " until the boolean signal specified by " (tt "ef") " is true, when the signal function is switched to behave like " (tt "g") ". If the boolean signal " (tt "eg") " becomes true, the signal function is switched back to " (tt "f") ". " (tt "s") " is the name of the state variable that indicates the current state: if false, the state is " (tt "f") ", otherwise the state is " (tt "g") ".")) (def (sig (procedure "(TRANSITION f g ef e)" (id TRANSITION))) (p "Singularly occurring transition: constructs a signal function that behaves like " (tt "f") " until the boolean signal specified by " (tt "ef") " is true, when the signal function is switched to behave like " (tt "g") ". " (tt "s") " is the name of the state variable that indicates the current state: if false, the state is " (tt "f") ", otherwise the state is " (tt "g") ".")) (def (sig (procedure "(TRANSIENT f g ef)" (id TRANSIENT))) (p "Singularly occurring transition: constructs a signal function that behaves like " (tt "f") " until the boolean signal specified by " (tt "ef") " is true, when the signal function is switched to behave like " (tt "g") " for (one invocation), and is then immediately switched back to " (tt "f") ".")) (def (sig (procedure "(ON f ef)" (id ON))) (p "Constructs a signal function that behaves like " (tt "f") " only when the boolean signal specified by " (tt "ef") " is true, otherwise copies the input to the output.")) (def (sig (procedure "(INTEGRAL i d f)" (id INTEGRAL))) (p "One step numerical integration on the pure function " (tt "f") " given independent variable " (tt "i") " and dependent variable " (tt "d") ".")) (def (sig (procedure "(INTEGRALH i d h f)" (id INTEGRALH))) (p "One step numerical integration on the pure function " (tt "f") " given independent variable " (tt "i") ", dependent variable " (tt "d") ", and step " (tt "h") "."))) (section 4 "Combinators for systems of equations" (p "The following combinators are provided by library " (tt "signal-diagram-dynamics") ":") (def (sig (procedure "ASSIGN eqn ..." (id ASSIGN)))) (def (sig (procedure "ODE eqn ..." (id ODE)))) (def (sig (procedure "DAE eqn ..." (id DAE))))) (section 4 "Code generation procedures" (def (sig (procedure "codegen/Octave" (id codegen/Octave)))) (def (sig (procedure "codegen/scheme" (id codegen/scheme)))) (def (sig (procedure "codegen/ML" (id codegen/ML)))))) (section 3 "Requires" (ul (li (int-link "datatype")) (li (int-link "flsim")))) (section 3 "Version History" (ul (li "3.4 Added ON combinator") (li "2.8 Adjustments to signal flow equations for actuate and union combinators") (li "2.7 Added dyn-vector as a dependency in the meta file [thanks to Mario]") (li "2.5 Bug fixes in relations handling in make-dae-system") (li "2.3 Using make egg instead of setup-api for make macro") (li "2.1 Added events procedure; better support for LSODE solver in Octave") (li "2.0 Added state variable to the transition combinators") (li "1.6 Improvements to the integrator interface") (li "1.4 Exporting make-... procedures from " (tt "signal-diagram-dynamics") " library") (li "1.3 Moved RK library to flsim library") (li "1.2 Install RK library files in Chicken shared directory") (li "1.0 Initial release"))) (section 3 "License" (pre " Copyright 2010-2014 Ivan Raikov\n\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful, but\n WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n General Public License for more details.\n\n A full copy of the GPL license can be found at\n <http://www.gnu.org/licenses/>.\n"))))