[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [computer-go] Two languages are best



Since doing hardware design I am convinced that one should implement a
program 2-times in 2 languages. In a high-level-specification language and a
low-level implementation one. In case of my FPGA-programm Hydra the
high-level is C, the low level Verilog. In other hardware-projects Verilog
or VHDL is used for the same task. Both languages are two languages in  one.
With the high-level part one specifies the so called behavioural
specification, with the so called RTL (Register-Transfer-Level) the actual
hardware.
The point of using 2 languages is that one can verify the program. If the
specification and the implementation version give different results,
something has gone wrong. With this method I have found many bugs.
With the high-level specification language one can also try out new ideas
with relative ease. E.g. I never design any FPGA-feature before having it
tested in the C-specification.
I did not know the method before starting hardware-programming. But in
hindsight I would have written also my "normal" chess programs in
"high-level" C and low-level-Assembler. Today I would use C as low-level,
and something like Rugby as high-level.

This method does not prevent conceptual bugs. But it detects most of the
"stupid" bugs. One has also the best of the two worlds. An efficient
implementation language and a ease-of-use prototyping/specification one. In
case of hardware programming the gap in producitivity is so high, that the
additional effort for doing the same thing twice in C is neglible.

A similar concept is used for mission-critical software. In this case two
teams produce the same software or an existing software is used as a
reference/verification testbed.

Note: This 2 language approach does only apply to the core of the
playing-engine.

Best Regards
Chrilly Donninger

_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://www.computer-go.org/mailman/listinfo/computer-go/