Oktober 2005 - Posts

Internetworking and Computer Algebra
22 Oktober 05 03:43 | Christoph Rüegg | 2 comment(s)
Yttrium has always been an interdisciplinary fusion of several different concepts. After ideas from VLSI and VHDL, concepts from communication networks and Internetworking are coming along now, too: Yttrium signals carry "values" which are characterized by structures (classes derived from ValueStructure). Some structurs support converting to other structures if required, but because Yttrium can be extended with arbitrary modules it is neither possible nor attractive to explicitly implement all possible direct conversion routines. Therefore, Yttrium executes (static) distance vector routing to automatically evaluate optimal conversion paths, and thus may still convert indirectly if no direct routines are available. Both lossless (e.g. from IntegerValue to RealValue or ComplexValue) and lossy (e.g. from RealValue to IntegerValue) routines and paths are supported, but are handeled separately - lossless paths are preferred and lossy paths may be suppressed if required. Using this infrastructure, structures defined in external modules behave exactly like those of the included standard library and may be converted in both directions easily. As a matter of fact, modules may even provide additional (or replace existing) conversion routines between existing structures (as long as they're "better" than existing routines).
Filed under: ,
Yttrium Parser: Grammar Preview
11 Oktober 05 11:44 | Christoph Rüegg | with no comments
Like Math.NET Classic, Yttrium will provide a parser to construct a system from an infix string. During the last two days I've begun writing the parser, based on the new more systematic parsing infrastructure introduced in (never released) Symbolics Classic v0.19. Porting to Yttrium has shown to be astonishingly easy and quickly even though the completely different target. I could reuse about 80% of the code directly - looks like for once the modular architecture really made sense. Remember that due to the dynamic and configurable behaviour the grammar is (at least in my opinion) not suitable for EBNF-like parser generators. The Language is not context-free, at least not in the strict textbook sense.

Some samples how the new Yttrium language will look like (most of it is already realized in code and working, but still easy modifiable - feedback is very welcome):

Concurrent signal assignment: (procedural assignments we know from classic imperative languages don't exist):
res <- a + b*c;
projection <- <vec,orthonormalBase[1]>;

Instantiation: (Ports may define multiple outputs)
instantiate + in a,b out c;

Defining new entities and architectures:
define entity Work.Test "test" function in x,c out y;
define architecture Work.TestArch Work.Test { y <- x * c; };
instantiate Work.Test in x->a,c->a*b out res;
res2 <- test(a*b,b);


Signal forwarding to the application: (other operations like signal assignments return signals as well):
res2;
a*sin(b);
derive(a*b,a);

Signal properties: (this part is not fix yet)
assume m is Constant,PositiveInteger;
assume m is not Std.Constant;
assume m remove Std.PositiveInteger;
assume m remove all;


Feedback?
Filed under: ,