smucclaw / simala

simala is short for "simplified math lang"; it's yet another possible core language / translation target for L4
2 stars 0 forks source link

Feature request: Getting some clarity, at least in the short term, on whether we should deal with 'unknown's and how / the semantics thereof #6

Closed ym-han closed 1 month ago

ym-han commented 2 months ago

I'll start by summarizing the things I've encountered that may be relevant. These may or may not turn out to be different concepts or different kinds of 'unknown'; I just haven't thought enough about it.

'Unknowns' may come up...

The Oracle IA docs on uncertain: https://documentation.custhelp.com/euf/assets/devdocs/unversioned/IntelligentAdvisor/en/Content/Guides/Use_Intelligent_Advisor/Use_Policy_Modeling/Work_with_rules/Write_rules_logical_operators/CERTAIN_and_UNCERTAIN_operators.htm?Highlight=certain

My questions are:

@mengwong please chime in if you agree or disagree with any of this

kosmikus commented 2 months ago

Just to clarify: my current plan (which isn't necessarily final in any way) is to remove undefined and replace it with unknown and change the handling such that not any occurrence of undefined causes a crash, but that certain operations can still be computed to non-unknown values in the presence of unknown, such as e.g. unknown || true would yield true.

There are many much more ambitious options, but I think this would be an incremental improvement most likely.