]Link best practices for large systems
Posted: Fri Nov 27, 2020 3:22 pm
I have moved the APEX compiler source code management to git, and am trying to use
]link, so that I can do all editing using vi/vim or other host-standard editor.
Are there any best practices documents or tutorials available for ]link,
and/or for maintaining large, APL-coded-ish systems in, or near, Dyalog APL?
In my case, most of the relevant compiler phase code resides in tree-structured
APL namespaces within the compiler framework. This works quite well, and
provides a clean separation of phases, such as syntax analysis,
static-single-assignment translation, data flow analysis, and code generation.
In particular, ]dbuild does a good job here, and is simple enough to understand
when returning to a project after a long hiatus.
However, some parts of the compiler, such as code generator "fragments",
are maintained in native text files. This is convenient, and it also facilitates
extension of the run-time system by non-APL users.
These code fragments differ for each code generator (SaC, Plural, SISAL);
they reside in git within the folder for the relevant code generator, e.g.,
Plural/fragments/takedrop.frg
This leaves me with a few unanswered questions about tool generation:
1. Generating the compiler as a namespace tree seems reasonable. A workspace
feels old school, particularly when I want to invoke the compiler on, e.g.,
my own BelchFireAnalytics system.
What is the recommended way forward on such tool vs. app systems?
2. Having code fragments, or other host-system files in git is mandatory
for one's sanity. However, it is not clear to me how the equivalent
of a Makefile or dyalogbuild file should be designed to facilitate
similar structure within a system that is intended to be shipped to
users, perhaps without git or the file tree structures that ]dbuild
wants.
What are people doing now, and what are the benefits and costs
of those approaches?
Bob
]link, so that I can do all editing using vi/vim or other host-standard editor.
Are there any best practices documents or tutorials available for ]link,
and/or for maintaining large, APL-coded-ish systems in, or near, Dyalog APL?
In my case, most of the relevant compiler phase code resides in tree-structured
APL namespaces within the compiler framework. This works quite well, and
provides a clean separation of phases, such as syntax analysis,
static-single-assignment translation, data flow analysis, and code generation.
In particular, ]dbuild does a good job here, and is simple enough to understand
when returning to a project after a long hiatus.
However, some parts of the compiler, such as code generator "fragments",
are maintained in native text files. This is convenient, and it also facilitates
extension of the run-time system by non-APL users.
These code fragments differ for each code generator (SaC, Plural, SISAL);
they reside in git within the folder for the relevant code generator, e.g.,
Plural/fragments/takedrop.frg
This leaves me with a few unanswered questions about tool generation:
1. Generating the compiler as a namespace tree seems reasonable. A workspace
feels old school, particularly when I want to invoke the compiler on, e.g.,
my own BelchFireAnalytics system.
What is the recommended way forward on such tool vs. app systems?
2. Having code fragments, or other host-system files in git is mandatory
for one's sanity. However, it is not clear to me how the equivalent
of a Makefile or dyalogbuild file should be designed to facilitate
similar structure within a system that is intended to be shipped to
users, perhaps without git or the file tree structures that ]dbuild
wants.
What are people doing now, and what are the benefits and costs
of those approaches?
Bob