Self-explaining and Self-arguing Software #82446
Replies: 8 comments 51 replies
-
What are the definitions of IExplanation and IJustification? |
Beta Was this translation helpful? Give feedback.
-
This discussion seems to lack an example of what you would use this for. When would you want this? What would it be valuable for? |
Beta Was this translation helpful? Give feedback.
-
I'm not getting at all how anything brought up so far has anything to do with an rpc system. Can you explain how the domains are related? |
Beta Was this translation helpful? Give feedback.
-
So, not to be snarky :-). But it's a bit ironic that a part asking for a system of explanations and justifications to be built, is both lacking in explanations and justifications for why it should be built. For all your discussions there seem to be a complete lack of motivating examples that show an existing problem, how existing solutions are inadequate for it, and how the proposal elegantly addresses that problem. |
Beta Was this translation helpful? Give feedback.
-
I don't see any actual suggestion for what you want changed in the language here @AdamSobieski . |
Beta Was this translation helpful? Give feedback.
-
Moving to runtime as no examples of actual language requests were provided, despite several requests for exactly that. This appears to then be a request for some new API pattern. |
Beta Was this translation helpful? Give feedback.
-
Years go. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Introduction
I would like to present, for discussion, some ideas involving source code transformations which output resultant methods which explain or argue for their provided results.
Following upon the successes of generators (
yield return
) and asynchronous programming (async
/await
), each of these language features involving source-code transformations and introduced keywords with which to make intuitive their utilizations, I present here that self-explaining, self-arguing software algorithms could be enabled by next-generation C# language enhancements.Self-explaining and Self-arguing Software
While it would be intricate to do so, developers could manually design algorithms which construct explanations or arguments for their output return values. Perhaps such methods would return data structures resembling:
or
or
or other data structures to be determined.
While it is non-trivial to formalize “what is an explanation” or “what is an argument or justification”, we can theorize that supporting data structures would likely be recursive, tree-like or graph-like. That is, interfaces like
IExplanation
orIJustification
, as sketched above, would probably make use of those same interfaces for substructures. In these regards, consider that an informal argument has one or more claims, and that these can each be supported and/or opposed by other claims which each, recursively, are interrelated to yet other claims.As it is often the case that routines invoke subroutines, we can envision that explanations or arguments would often be procedurally constructed from explained or argued results returned by subroutines. That is, routines might collect (and potentially analyze) the explained or argued results from subroutines and assemble these into output return values.
While it is possible for developers to manually create such algorithms, it is argued, here, that developers would prefer to use new language features, e.g., keywords and to allow compilers to perform source-code transformations from simpler, more readable source code, into the more intricate self-explaining, self-arguing, source code.
Developer Access to and Utilization of Features
While static and runtime compiler-based transformations are desired for developer convenience, developers should also be able to access and utilize at least some of the functionalities utilized by the compiler and by compiler-generated source code, e.g., for AI-related software components which make explainable or justified decisions, explainable artificial intelligence.
Static Methods
A suite of static methods could be utilized by compiler-generated source code and could be accessed and utilized manually, by developers. For example:
Proxy Types and Methods
Proxy types or methods could be created and specified by compilers and, perhaps, manually by developers.
Remote Procedure Calls
Data structures for self-explaining and self-arguing source code could be utilized by the interfaces of remote procedures or services. As envisioned, algorithms would be able to seamlessly interweave results from local and remote procedures while constructing their outputs.
Open Questions
These ideas are relatively new and there are many open questions including, but not limited to:
ref
orout
parameters; would these, like the return values of methods, be replaced withExplainedResult<>
?[Pure]
or[Deterministic]
?System.Diagnostics
space?Conclusion
Thank you. I am hoping to build on these preliminary ideas with your comments and feedback towards providing a fuller proposal.
Beta Was this translation helpful? Give feedback.
All reactions