Ping Pong Model
This week Yingfu started polishing the Ping Pong model, so that it is a great example for teaching students. We also agreed to add some new features into this model, which include the bat's maximum speed, and maximum energy consumption for bat actuator . Yingfu also started implementing Ping Pong model using Java3D, and developing a comparison between the two different approaches(Acumen,Java3D), identifying in the process their advantages and disadvantages.
Monday, January 30, 2012
Bouncing ball in Yampa
As part of his study of AFRP, Adam has been working on how to idiomatically express the bouncing ball simulation in Yampa. While looking for inspiration online, Adam found a very helpful paper by Henrik Nilsson (Functional Automatic Differentiation with Dirac Impulses) which describes two such implementations in detail.
eXtensible MPEG-4 Textual Format
While Anil started reading The MPEG-4 BOOK and the Web Link,he finds an interesting framework which is presented in the chapter 6 called eXtensible MPEG-4 Textual Format, XMT is a framework for concise yet precisely for creation and maintenance of MPEG-4 multimedia content,by human or by automated machine programs. He finds this framework is an ideal way for creation of multimedia content from a machine like an Acumen, XMT uses XML standard as basis for textual representation.He copied the below image from the above given weblink, the image is overview of the MP4 file generated from an XMT framework.
Anil in future planning to figure out does this XMT framework work's out for the Acumen? If yes how could this be achieved?
Test-driven language design
While making a survey of QuickCheck related papers and property-based testing conferences Jan had the idea of test-driven language design. In essence it applies the test driven development process to language design by having the designers express high-level properties of the language as testable properties that then drive the language specification and implementation work. For example, it would be interesting to see how one could apply this idea in developing a formal specification for Acumen and to then checking for compliance of the current implementations.
Tuesday, January 24, 2012
The status of testing in Acumen as it is today
The testing suite for the latest Acumen release uses generator-driven property checks for the parser-pretty printer functionality and unit tests for the interpreter implementations. The reference interpreter unit tests check that differential equations are correctly simulated and the parallel interpreter tests check that both implementations produce equal simulations. As shown by Walid and Corky the test code coverage is fairly complete, in particular for the interpreter codes. Jan is investigating the potential for automatically generating acumen models that may be used to complement the interpreter tests with property-based checks.
Floating in Scala
We continued to work on the numeric type classes in Scala. We have implemented instances of Floating (that includes arithmetic operations, trascendental functions, trigonometric functions and the number Pi) for the Scala type Double, for the constructive reals implemented in Java as distributed by Hans Boehm, for symbolic numbers as described by Lennart Augustsson for Haskell, and for the data type that implements automatic differentiation with towers of derivatives as described by Jerzy Karczmarczuk and Lennart Augustsson for Haskell.
The coming week we plan to parameterize the Acumen interpreter on the type of numbers so that we can compare simulations that use Double with simulations that use constructive reals. Later on we would like to explore in what way we can use automatic differentiation in Acumen.
The coming week we plan to parameterize the Acumen interpreter on the type of numbers so that we can compare simulations that use Double with simulations that use constructive reals. Later on we would like to explore in what way we can use automatic differentiation in Acumen.
Monday, January 23, 2012
First steps in Arrowized FRP
This week Adam started looking at Arrowized FRP by reading The Yampa Arcade by Courtney, Nilsson and Peterson. Initial efforts to apply the framework by implementing a simple bouncing ball simulation proved to be a challenge. Specifically, an attempt at representing the speed and position of the ball as individual signal functions (arrows mapping signals to signals) was unsuccessful. Adam suspects a mutually recursive relation between speed and position led to an infinite loop upon execution. Judging by the patterns presented in The Yampa Arcade, a better approach is to represent the entire state of the simulation as a data type, making this the input and output of a single signal function.
During the coming week, Adam plans to read Functional Reactive Programming, Continued by Courtney, Nilsson and Peterson, in order to get a broader view of the signal function switching combinators provided by Yampa.
During the coming week, Adam plans to read Functional Reactive Programming, Continued by Courtney, Nilsson and Peterson, in order to get a broader view of the signal function switching combinators provided by Yampa.
Tuesday, January 17, 2012
Synthetic Video Encoder
Anil started investigating the possible ways to represent or to encode the 3D simulations generated in Acumen in to a video.On his way, he finds two interesting ways of encoding a synthetic video, the streamed video and a video stored in the memory. He thinks the second one might be the suitable way as the Acumen is a standalone application. He is digging out the The MPEG-4 BOOK and the web link in depth to find out more resources which could help him to find the best possible key to open the closed doors.
Tuesday, January 10, 2012
Parameterizing Programs by Arithmetic
Veronica continues to explore Scala for parameterizing programs over
different implementations of numbers. There is now a better
implementation of the hierarchy of numeric type classes. Also, there
are now instances of these classes with Double, symbolic numbers
(expressions) and differentiable numbers. For Double the operations
are as expected. For symbolic numbers, the operations build more or
less simplified expressions. For differentiables the operations
calculate all derivatives at a given point. The combination of
symbolic numbers and differentiables calculates expressions for the
derivatives. The ideas for doing this are from Lennart Augustsson's
blog on overloading numbers. There is still a lot of place for
improvement and extensions, for example better simplifications for the
symbolic numbers, more examples using derivatives and more numeric
types that instantiate the type classes (the first candidates are the
constructive reals implemented in Java (Boehm and Cartwright))
different implementations of numbers. There is now a better
implementation of the hierarchy of numeric type classes. Also, there
are now instances of these classes with Double, symbolic numbers
(expressions) and differentiable numbers. For Double the operations
are as expected. For symbolic numbers, the operations build more or
less simplified expressions. For differentiables the operations
calculate all derivatives at a given point. The combination of
symbolic numbers and differentiables calculates expressions for the
derivatives. The ideas for doing this are from Lennart Augustsson's
blog on overloading numbers. There is still a lot of place for
improvement and extensions, for example better simplifications for the
symbolic numbers, more examples using derivatives and more numeric
types that instantiate the type classes (the first candidates are the
constructive reals implemented in Java (Boehm and Cartwright))
Tuesday, January 3, 2012
Automatic Differentiation in Scala
Veronica has started to implement automatic differentiation in Scala, following Functional Differentiation of Computer Programs that shows how to do it in Haskell using type classes. A first version uses dual numbers to represent the value of a function and the value of the first derivative at a given point. By overloading the numeric operators and functions, the evaluation of a numeric function, including functions we define in a program, applied to a dual number gets us both results at once. To implement these ideas in Scala we followed Type Classes as Objects and Implicits. The paper shows how to use Scala to implement a hierarchy of type classes that build on previous classes and how to implement parameterized type classes, but it does not show how to combine these two. In our current implementation of dual numbers we combined both in an ad-hoc way that needs to be revised.
Subscribe to:
Posts (Atom)