美文网首页Theory
[PLT] 类型图示

[PLT] 类型图示

作者: 何幻 | 来源:发表于2016-03-06 10:44 被阅读40次

    红色区域外:well behaved (type soundness)
    红色区域内:ill behaved

    如果所有程序都是灰的,strongly typed
    否则如果存在红色的程序,weakly typed

    编译时排除红色程序,statically typed
    运行时排除红色程序,dynamically typed

    所有程序都在黄框以外,type safe


    参考:《Type Systems》 Luca Cardelli - Microsoft Research
    Trapped error: An execution error that immediately results in a fault.
    Untrapped error: An execution error that does not immediately result in a fault.
    Forbidden error: The occurrence of one of a predetermined class of execution errors;
    Typically the improper application of an operation to a value, such as not(3).
    Well behaved: A program fragment that will not produce forbidden errors at run time.
    Strongly checked language: A language where no forbidden errors can occur at run time (depending on the definition of forbidden error).
    Weakly checked language: A language that is statically checked but provides no clear guarantee of absence of execution errors.
    Statically checked language: A language where good behavior is determined before execution.
    Dynamically checked language: A language where good behavior is enforced during execution.
    Type safety: The property stating that programs do not cause untrapped errors.
    Explicitly typed language: A typed language where types are part of the syntax.
    Implicitly typed language: A typed language where types are not part of the syntax.

    相关文章

      网友评论

        本文标题:[PLT] 类型图示

        本文链接:https://www.haomeiwen.com/subject/dsjnkttx.html