/scdl

Simple Circuit Description Language - simple functional language to describe circuits with a very basic implementation of a "compiler"

Primary LanguageC++MIT LicenseMIT

To compile the library libscdl.a and the program you need libjson. Run make to compile the library and the evaluator program. See the documentation in scdl.pdf for information on the syntax of the SCDL language along with information on the format of an accompanying ".scdl.vars" file. See the two examples included: gt.scdl and its corresponding vars file gt.scdl.vars and gt_count.scdl and its corresponding vars file gt_count.scdl.vars. For example to evaluate gt.scdl, run:

./eval gt.scdl

This prompts you to enter the two inputs (which are unsigned integers) and it prints the output (which is a boolean) that indicates whether the first integer is greater than the second one.

Take a look at gt_count.scdl for a larger example.

If an SCDL file, say x.scdl, is specified as a command line argument to the interpreter, it looks for a JSON-encoded vars file x.scdl.vars. See the documentation and the examples to understand the format of this file.