Simple Circuit Description Language - simple functional language to describe circuits with a very basic implementation of a "compiler"
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Circuit.cpp
Circuit.h
LICENSE
Makefile
README
SCDLEvaluator.cpp
SCDLEvaluator.h
SCDLProgram.cpp
SCDLProgram.h
Variable.h
base.scdl
common.h
eval.cpp
gt.scdl
gt.scdl.vars
gt_count.scdl
gt_count.scdl.vars
max.scdl
max.scdl.vars
scdl.pdf

README

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.