How would you design a tool to specify deeply nested forms, basically a complex decision tree, eg for medical diagnosis or complex tax stuff etc, where future form elements can dependent on a previously specified one, but statically ie chosen from few option not generated via a function so that all options and branches are known without executing code. The form specification should just be declarative, data. What data structure would you use to represent that form (I think it would basically be a DAG)? What language would you write it in? How would you generate a graphical representation (eg converting to .dot)? How would you generate a fillable form from it?

  • steph@lemmy.clueware.org
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    Your question is a bit vague but it looks to me that what you want is some sort of expert system of inference engine.

    There might be some open source solutions, and there’s always the GNU Prolog language that might suit your needs.

    I suspect that you won’t get a graphviz structure out of it though.