Generate all the Things! Visit our website to see all of the currently generated artifacts.
For well understood domains, building software ought to be a matter of engineering, based on solid scientific foundations. The ultimate test of "well understood" is being able to teach the domain language to a computer. Drasil is a framework for generating all of the software artifacts for (well understood) research software, from the natural knowledge base of the domain.
We take advantage of the inherent duplication of knowledge present in software artifacts (code, specification, tests, etc). More precisely, we capture the information present in software artifacts so that the particular view of that information in the artifacts can be reproduced by Drasil. For example, the equation F = ma
will look different when rendered in documentation and in Java or Python, although it will mean the same thing. In this way, we obtain traceability: we know the exact relationship between information in the specification document and in the code and, furthermore, we know that they are coherent by construction.
Drasil is based on a combination of the following ideas:
To better understand the requirements for Drasil, we follow an example-driven approach, based on a set of case studies. This is akin to test-driven engineering but at the system level. The currently generated examples serve as a good introduction to what we mean.
We wrote a position paper detailing our original ideas - but this is getting somewhat obsolete now. You can also take a look at a poster. For more information on the details of Drasil, please see the Drasil Wiki. A collection of Drasil-related papers can be found here. To contribute to this project, visit the Contributor's Guide.
If you are on Windows, we recommend you use Cygwin. If you already have Git Bash installed, you can use that instead; you will just need to download util-linux-ng, which includes various system utilities (one of our scripts uses rev
), and add its bin/ to your PATH. make
is required as well and can be installed following these steps; on MacOS, you may need to install XCode to get that. Most Linux installs have it by default. You may also need to install git.
stack setup
while in ./code/
cd
to change working directory, pwd
to print your current working directorymake
command to build Drasil and run all examples.
make help
for a list of available commands.For more information, please visit the New Workspace Setup Wiki.
Simply run: make argument
to build and run the corresponding example, where argument
is detailed below:
Argument | Example |
---|---|
gamephysics_diff | 2D Rigid Body Physics Library |
swhs_diff | Solar Water Heating System with Phase Change Material |
glassbr_diff | Glass-BR |
hghc_diff | HGHC Toy Example |
ssp_diff | Slope Stability Analysis |
swhsnopcm_diff | Minimal SWHS Example, with PCM Removed |
projectile_diff | Projectile Motion Analysis |
pdcontroller_diff | Proportional Derivative Controller |
dblpend_diff | Double Pendulum |
sglpend_diff | Single Pendulum |
For more commands related to Drasil, use make help
or check out the Makefile documentation.
Please note that if make
has been used, the Software Requirements Specification (SRS) documents are already generated automatically and can be found in build
.
Automated testing can be done on these examples.
After building, you can run the examples by using stack exec NAME
where NAME is detailed below:
NAME | Example |
---|---|
gamephysics | 2D Rigid Body Physics Library |
swhs | Solar Water Heating System with PCM (SWHS) |
glassbr | Glass-BR |
hghc | HGHC toy example |
ssp | Slope Stability Analysis (SSP) |
swhsnopcm | SWHS without PCM (SWHSNoPCM) |
projectile | Projectile motion analysis |
pdcontroller | Proportional Derivative Controller |
dblpend | Double Pendulum |
sglpend | Single Pendulum |
This runs the examples manually from the .stack-work folder after building, and the generated docs will appear in this folder (i.e. in the SRS folders). Due to this placement, these generated versions will not be subject to automated tests. The tex files are generated, but they are not automatically compiled. To compile the tex files, use the generated Makefile (in the same folder as the tex file).
You can run make docs
from the ./code/ folder to build the documentation. Note: this process can take about 10-12 minutes (MacOS estimate).
See the README in ./code/ for more information.
Please use our provided CITATION.cff
file for our preferred citation
information. GitHub provides an export of it in BibTeX and APA if needed.
Please note that we only add to our CITATION.cff
/preferred citation file on a
consensual basis. If you would like your name added, please submit a PR with
your information added to the CITATION.cff
file.
code
doc
notes
Papers
People
Presentations
WindowsFix
chcp 65001
. This is to fix an issue with unicode characters. ONLY affects Windows machines..gitattributes
.gitignore
CITATION.cff
LICENSE
README.md