伊拉克是什么人种| 钾离子高有什么危害| 为什么头出汗特别多| 无力感什么意思| 聪明如你什么意思| epa和dha是什么| 有什么好看的古装剧| 四月十八是什么星座| 女士喝什么茶叶对身体好| 暇步士是什么档次品牌| 丁亥日五行属什么| 睡觉开风扇有什么危害| 什么军官可以随身配枪| 护士是什么专业| 骨头疼是什么原因| 流鼻血是什么引起的| 168红包代表什么意思| 经产妇是什么意思| 宝宝肚子疼吃什么药| 胃热吃什么| 便秘吃什么药效果最好| 因公殉职是什么意思| 淼怎么读什么意思| 喜闻乐见什么意思| 软化耳屎的药水叫什么| 什么叫撤退性出血| 配菜是什么意思| 粉尘螨是什么| 牛黄安宫丸什么季节吃| 右边脸疼是什么原因| 主任医师是什么级别| 小儿拉肚子吃什么药好得快| 肚脐眼发炎是什么原因| esp是什么意思| 处变不惊是什么意思| 智力是什么意思| 感激涕零什么意思| 什么是表达方式| 吃什么大便能特别通畅| 什么是前鼻音和后鼻音| 手脱皮用什么药膏| 炎症反应性细胞改变是什么意思| 酒花是什么| 脚气应该挂什么科| pwr是什么意思| 乍一看是什么意思| 寄居蟹用什么水养| 双皮奶是什么| 沥水是什么意思| 双月刊什么意思| 吃菱角有什么好处| 50岁是什么之年| 氨基酸是什么东西| 佛是什么| 农历7月20日是什么星座| 川崎病是什么原因引起的| 什么原因导致有幽门杆菌| 肌肉酸痛挂什么科| 衣原体感染是什么病| 黄飞鸿是什么生肖| 小孩肠胃感冒吃什么药| 脉络膜裂囊肿是什么病| 正团级是什么军衔| 老汉推车是什么意思| 总胆固醇低是什么原因| 争奇斗艳什么意思| 门静脉增宽是什么意思| 11月15日出生是什么星座| 儿童口腔溃疡吃什么药| ufo是什么| 喝什么茶对睡眠有帮助| 出马仙是什么意思| 聚精会神的看是什么词语| 诺如病毒感染吃什么药| 瘿病是什么病| 黄芪什么季节喝最好| 1992年属什么生肖年| 做梦梦见被蛇咬是什么意思| 小孩黄疸是什么原因引起的| 蒸鱼豉油什么时候放| 宝宝咳嗽吃什么药| 额头爱出汗是什么原因| 什么是谈恋爱| 为什么现在不建议输液| 神经梅毒有什么症状| 夏至是什么| 筷子掉地上是什么征兆| 眼睛干涩是什么原因引起的| 同型半胱氨酸偏高吃什么药| 清朝前面是什么朝代| 红眼病有什么症状| 生粉和淀粉有什么区别| 王火火念什么| 变色龙指什么样的人| 冰糖和白砂糖有什么区别| 什么饮料好喝又健康| 右肺纤维灶是什么意思| 什么是全脂牛奶| 感统训练是什么| 梦见火烧房子是什么预兆| 晕厥是什么意思| 睾丸积液是什么原因造成的| 恶搞是什么意思| 月亮为什么会发光| 纳音什么意思| 喝酒伤什么| 红玫瑰花语是什么意思| 小脑萎缩吃什么药好| 11月28是什么星座| 高净值什么意思| 79年属什么| 独一无二指什么生肖| 尿细菌计数高是什么原因| 驾临是什么意思| 儿童割包皮挂什么科| 月经什么颜色的血是正常的| 手掌心痒是什么原因| 1.4是什么星座| 无所不用其极是什么意思| 暗无天日是什么意思| 机械性窒息死亡是什么意思| 有所作为的意思是什么| 摩羯座是什么象| 冰丝和天丝有什么区别| 一字马是什么意思| 什么是强迫症有哪些表现| 口干口苦吃什么药最好| 什么网站可以看毛片| 为什么来月经会有血块| 青霉素过敏可以吃什么消炎药| 直肠腺瘤是什么| 果肉属于什么组织| 排骨汤什么时候放盐最好| 南京有什么玩的| 热疹子是什么症状图片| 耳声发射检查是什么| 肉刺用什么药膏能治好| 什么是好词| 八月十五是什么星座| 10月28号是什么星座| 洋生姜的功效与作用是什么| 心累是什么原因| sds是什么| 好景不长是什么意思| 梦到和男朋友分手是什么征兆| 为什么一直流鼻涕| 白细胞3个加号是什么意思| 一产二产三产分别包括什么| 两脚发热是什么原因| 什么茶对胃好| 打喷嚏流清鼻涕属于什么感冒| 党参泡酒有什么功效| 人乳头病毒是什么意思| 什么是做功| 乳腺癌有什么症状| 球蛋白高是什么原因| 蛇蝎美人是什么意思| 落红的血是什么样子的| 莳是什么意思| 阴平阳秘是什么意思| 什么昆虫最值钱| 2019年出生属什么生肖| dunk是什么意思| 男生做爱什么感觉| 什么样的梦才算是胎梦| 吃什么有饱腹感还减肥| dos是什么| 胆固醇偏高有什么危害| 什么是普惠性幼儿园| 为什么吃西瓜会拉肚子| 法西斯是什么| 八月一号是什么星座| 梦见自己得了绝症预示着什么| 神经性皮炎是什么| 吃什么水果减肥最快| 口腔医学技术是干什么的| 牙齿黄用什么牙膏| 老觉得饿是什么原因| 橙花是什么花| 四点底与什么有关| 七月九号是什么星座| 荨麻疹什么原因引起的| 阳虚水泛是什么症状| 冷漠是什么意思| 鸟字旁与什么有关| 日加个成念什么| 维生素c对身体有什么好处| 生粉和淀粉有什么区别| 天体是什么| 玉米和什么不能一起吃| 乳腺结节吃什么| 绯是什么意思| 肾病综合征是什么病| 急性支气管炎吃什么药| 芡实有什么功效| 酸橙绿是什么颜色| 葫芦挂在家里什么位置好| 小便失禁是什么原因男性| 梦见恐龙是什么意思| 什么是感统失调| 白天不懂夜的黑什么意思| bmi指数是什么意思| 拿什么证明分居两年| 阳起石是什么东西| 20岁属什么的生肖| pcr医学上是什么意思| 贪恋是什么意思| 海带与什么食物相克| 忌动土是什么意思| trace是什么意思| 清洁度三度什么意思| 月经正常颜色是什么色| 齁不住是什么意思| 低血糖什么症状有哪些| 脚肿吃什么药消肿| 梦见好多猪是什么意思| 南方有什么生肖| 元旦送老师什么礼物| 什么锅好| save什么意思| 梦见小牛犊是什么预兆| 正觉是什么意思| 晚上看到黄鼠狼什么预兆| 外交部发言人什么级别| 鸟进屋有什么预兆| 移植后可以吃什么水果| 噗什么意思| 堪堪是什么意思| 艾滋病潜伏期有什么症状| 吃什么不胖反而瘦| 大长今是什么意思| 扭转乾坤是什么意思| 动车与高铁有什么区别| 经常便秘吃什么调理| 裂帛是什么意思| 舌头发热是什么原因| 深圳少年宫有什么好玩的| 官方旗舰店是什么意思| 怀孕去医院检查挂什么科| 被隐翅虫咬了用什么药| 为什么老做梦| 嘿是什么意思| 舌头有齿痕吃什么药| 为什么手淫很快就射| 什么是原则性问题| 王玉是什么字| acer是什么牌子的电脑| 打完除皱针注意事项有什么| 逝去是什么意思| 早起眼皮肿是什么原因引起的| 河字五行属什么| 蜜饯是什么| 庆生是什么意思| 健忘是什么意思| 菟丝子有什么功效| 肠澼是什么意思| 522是什么意思| 什么的鞋子| 猫翘尾巴是什么意思| 男人更年期吃什么药| 少了一个肾有什么影响| 吃什么提高免疫力最快| 印泥用什么能洗掉| 子宫肌瘤做什么检查能查出来| 百度

勇于奋斗 在创新创业大潮中闯出一片天

百度 眼看葡萄牙就要在主场吞下失利苦果,此时,还是C罗站了出来。

Type inference, sometimes called type reconstruction,[1]:?320? refers to the automatic detection of the type of an expression in a formal language. These include programming languages and mathematical type systems, but also natural languages in some branches of computer science and linguistics.

Nontechnical explanation

edit

In a typed language, a term's type determines the ways it can and cannot be used in that language. For example, consider the English language and terms that could fill in the blank in the phrase "sing _." The term "a song" is of singable type, so it could be placed in the blank to form a meaningful phrase: "sing a song." On the other hand, the term "a friend" does not have the singable type, so "sing a friend" is nonsense. At best it might be metaphor; bending type rules is a feature of poetic language.

A term's type can also affect the interpretation of operations involving that term. For instance, "a song" is of composable type, so we interpret it as the thing created in the phrase "write a song". On the other hand, "a friend" is of recipient type, so we interpret it as the addressee in the phrase "write a friend". In normal language, we would be surprised if "write a song" meant addressing a letter to a song or "write a friend" meant drafting a friend on paper.

Terms with different types can even refer to materially the same thing. For example, we would interpret "to hang up the clothes line" as putting it into use, but "to hang up the leash" as putting it away, even though, in context, both "clothes line" and "leash" might refer the same rope, just at different times.

Typings are often used to prevent an object from being considered too generally. For instance, if the type system treats all numbers as the same, then a programmer who accidentally writes code where 4 is supposed to mean "4 seconds" but is interpreted as "4 meters" would have no warning of their mistake until it caused problems at runtime. By incorporating units into the type system, these mistakes can be detected much earlier. As another example, Russell's paradox arises when anything can be a set element and any predicate can define a set, but more careful typing gives several ways to resolve the paradox. In fact, Russell's paradox sparked early versions of type theory.

There are several ways that a term can get its type:

  • The type might be provided from somewhere outside the passage. For instance, if a speaker refers to "a song" in English, they generally do not have to tell the listener that "a song" is singable and composable; that information is part of their shared background knowledge.
  • The type can be declared explicitly. For example, a programmer might write a statement like delay: seconds := 4 in their code, where the colon is the conventional mathematical symbol to mark a term with its type. That is, this statement is not only setting delay to the value 4, but the delay: seconds part also indicates that delay's type is an amount of time in seconds.
  • The type can be inferred from context. For example, in the phrase "I bought it for a song", we can observe that trying to give the term "a song" types like "singable" and "composable" would lead to nonsense, whereas the type "amount of currency" works out. Therefore, without having to be told, we conclude that "song" here must mean "little to nothing", as in the English idiom "for a song", not "a piece of music, usually with lyrics".

Especially in programming languages, there may not be much shared background knowledge available to the computer. In manifestly typed languages, this means that most types have to be declared explicitly. Type inference aims to alleviate this burden, freeing the author from declaring types that the computer should be able to deduce from context.

Type-checking vs. type-inference

edit

In a typing, an expression E is opposed to a type T, formally written as E : T. Usually a typing only makes sense within some context, which is omitted here.

In this setting, the following questions are of particular interest:

  1. E : T? In this case, both an expression E and a type T are given. Now, is E really a T? This scenario is known as type-checking.
  2. E : _? Here, only the expression is known. If there is a way to derive a type for E, then we have accomplished type inference.
  3. _ : T? The other way round. Given only a type, is there any expression for it or does the type have no values? Is there any example of a T? This is known as type inhabitation.

For the simply typed lambda calculus, all three questions are decidable. The situation is not as comfortable when more expressive types are allowed.

Types in programming languages

edit

Types are a feature present in some strongly statically typed languages. It is often characteristic of functional programming languages in general. Some languages that include type inference include C23,[2] C++11,[3] C# (starting with version 3.0), Chapel, Clean, Crystal, D, Dart,[4] F#,[5] FreeBASIC, Go, Haskell, Java (starting with version 10), Julia,[6] Kotlin,[7] ML, Nim, OCaml, Opa, Q#, RPython, Rust,[8] Scala,[9] Swift,[10] TypeScript,[11] Vala,[12] Zig, and Visual Basic[13] (starting with version 9.0). The majority of them use a simple form of type inference; the Hindley–Milner type system can provide more complete type inference. The ability to infer types automatically makes many programming tasks easier, leaving the programmer free to omit type annotations while still permitting type checking.

In some programming languages, all values have a data type explicitly declared at compile time, limiting the values a particular expression can take on at run-time. Increasingly, just-in-time compilation blurs the distinction between run time and compile time. However, historically, if the type of a value is known only at run-time, these languages are dynamically typed. In other languages, the type of an expression is known only at compile time; these languages are statically typed. In most statically typed languages, the input and output types of functions and local variables ordinarily must be explicitly provided by type annotations. For example, in ANSI C:

int add_one(int x) {
    int result; /* declare integer result */

    result = x + 1;
    return result;
}

The signature of this function definition, int add_one(int x), declares that add_one is a function that takes one argument, an integer, and returns an integer. int result; declares that the local variable result is an integer. In a hypothetical language supporting type inference, the code might be written like this instead:

add_one(x) {
    var result;  /* inferred-type variable result */
    var result2; /* inferred-type variable result #2 */

    result = x + 1;
    result2 = x + 1.0;  /* this line won't work (in the proposed language) */
    return result;
}

This is identical to how code is written in the language Dart, except that it is subject to some added constraints as described below. It would be possible to infer the types of all the variables at compile time. In the example above, the compiler would infer that result and x have type integer since the constant 1 is type integer, and hence that add_one is a function int -> int. The variable result2 isn't used in a legal manner, so it wouldn't have a type.

In the imaginary language in which the last example is written, the compiler would assume that, in the absence of information to the contrary, + takes two integers and returns one integer. (This is how it works in, for example, OCaml.) From this, the type inferencer can infer that the type of x + 1 is an integer, which means result is an integer and thus the return value of add_one is an integer. Similarly, since + requires both of its arguments be of the same type, x must be an integer, and thus, add_one accepts one integer as an argument.

However, in the subsequent line, result2 is calculated by adding a decimal 1.0 with floating-point arithmetic, causing a conflict in the use of x for both integer and floating-point expressions. The correct type-inference algorithm for such a situation has been known since 1958 and has been known to be correct since 1982. It revisits the prior inferences and uses the most general type from the outset: in this case floating-point. This can however have detrimental implications, for instance using a floating-point from the outset can introduce precision issues that would have not been there with an integer type.

Frequently, however, degenerate type-inference algorithms are used that cannot backtrack and instead generate an error message in such a situation. This behavior may be preferable as type inference may not always be neutral algorithmically, as illustrated by the prior floating-point precision issue.

An algorithm of intermediate generality implicitly declares result2 as a floating-point variable, and the addition implicitly converts x to a floating point. This can be correct if the calling contexts never supply a floating point argument. Such a situation shows the difference between type inference, which does not involve type conversion, and implicit type conversion, which forces data to a different data type, often without restrictions.

Finally, a significant downside of complex type-inference algorithm is that the resulting type inference resolution is not going to be obvious to humans (notably because of the backtracking), which can be detrimental as code is primarily intended to be comprehensible to humans.

The recent emergence of just-in-time compilation allows for hybrid approaches where the type of arguments supplied by the various calling context is known at compile time, and can generate a large number of compiled versions of the same function. Each compiled version can then be optimized for a different set of types. For instance, JIT compilation allows there to be at least two compiled versions of add_one:

A version that accepts an integer input and uses implicit type conversion.
A version that accepts a floating-point number as input and uses floating point instructions throughout.

Technical description

edit

Type inference is the ability to automatically deduce, either partially or fully, the type of an expression at compile time. The compiler is often able to infer the type of a variable or the type signature of a function, without explicit type annotations having been given. In many cases, it is possible to omit type annotations from a program completely if the type inference system is robust enough, or the program or language is simple enough.

To obtain the information required to infer the type of an expression, the compiler either gathers this information as an aggregate and subsequent reduction of the type annotations given for its subexpressions, or through an implicit understanding of the type of various atomic values (e.g. true : Bool; 42 : Integer; 3.14159 : Real; etc.). It is through recognition of the eventual reduction of expressions to implicitly typed atomic values that the compiler for a type inferring language is able to compile a program completely without type annotations.

In complex forms of higher-order programming and polymorphism, it is not always possible for the compiler to infer as much, and type annotations are occasionally necessary for disambiguation. For instance, type inference with polymorphic recursion is known to be undecidable. Furthermore, explicit type annotations can be used to optimize code by forcing the compiler to use a more specific (faster/smaller) type than it had inferred.[14]

Some methods for type inference are based on constraint satisfaction[15] or satisfiability modulo theories.[16]

High-Level Example

edit

As an example, the Haskell function map applies a function to each element of a list, and may be defined as:

map f [] = []
map f (first:rest) = f first : map f rest

(Recall that : in Haskell denotes cons, structuring a head element and a list tail into a bigger list or destructuring a nonempty list into its head element and its tail. It does not denote "of type" as in mathematics and elsewhere in this article; in Haskell that "of type" operator is written :: instead.)

Type inference on the map function proceeds as follows. map is a function of two arguments, so its type is constrained to be of the form a -> b -> c. In Haskell, the patterns [] and (first:rest) always match lists, so the second argument must be a list type: b = [d] for some type d. Its first argument f is applied to the argument first, which must have type d, corresponding with the type in the list argument, so f :: d -> e (:: means "is of type") for some type e. The return value of map f, finally, is a list of whatever f produces, so [e].

Putting the parts together leads to map :: (d -> e) -> [d] -> [e]. Nothing is special about the type variables, so it can be relabeled as

map :: (a -> b) -> [a] -> [b]

It turns out that this is also the most general type, since no further constraints apply. As the inferred type of map is parametrically polymorphic, the type of the arguments and results of f are not inferred, but left as type variables, and so map can be applied to functions and lists of various types, as long as the actual types match in each invocation.

Detailed Example

edit

The algorithms used by programs like compilers are equivalent to the informally structured reasoning above, but a bit more verbose and methodical. The exact details depend on the inference algorithm chosen (see the following section for the best-known algorithm), but the example below gives the general idea. We again begin with the definition of map:

map f [] = []
map f (first:rest) = f first : map f rest

(Again, remember that the : here is the Haskell list constructor, not the "of type" operator, which Haskell instead spells ::.)

First, we make fresh type variables for each individual term:

  • α shall denote the type of map that we want to infer.
  • β shall denote the type of f in the first equation.
  • [γ] shall denote the type of [] on the left side of the first equation.
  • [δ] shall denote the type of [] on the right side of the first equation.
  • ε shall denote the type of f in the second equation.
  • ζ -> [ζ] -> [ζ] shall denote the type of : on the left side of the first equation. (This pattern is known from its definition.)
  • η shall denote the type of first.
  • θ shall denote the type of rest.
  • ι -> [ι] -> [ι] shall denote the type of : on the right side of the first equation.

Then we make fresh type variables for subexpressions built from these terms, constraining the type of the function being invoked accordingly:

  • κ shall denote the type of map f []. We conclude that α ~ β -> [γ] -> κ where the "similar" symbol ~ means "unifies with"; we are saying that α, the type of map, must be compatible with the type of a function taking a β and a list of γs and returning a κ.
  • λ shall denote the type of (first:rest). We conclude that ζ -> [ζ] -> [ζ] ~ η -> θ -> λ.
  • μ shall denote the type of map f (first:rest). We conclude that α ~ ε -> λ -> μ.
  • ν shall denote the type of f first. We conclude that ε ~ η -> ν.
  • ξ shall denote the type of map f rest. We conclude that α ~ ε -> θ -> ξ.
  • ο shall denote the type of f first : map f rest. We conclude that ι -> [ι] -> [ι] ~ ν -> ξ -> ο.

We also constrain the left and right sides of each equation to unify with each other: κ ~ [δ] and μ ~ ο. Altogether the system of unifications to solve is:

α ~ β -> [γ] -> κ
ζ -> [ζ] -> [ζ] ~ η -> θ -> λ
α ~ ε -> λ -> μ
ε ~ η -> ν
α ~ ε -> θ -> ξ
ι -> [ι] -> [ι] ~ ν -> ξ -> ο
κ ~ [δ]
μ ~ ο

Then we substitute until no further variables can be eliminated. The exact order is immaterial; if the code type-checks, any order will lead to the same final form. Let us begin by substituting ο for μ and [δ] for κ:

α ~ β -> [γ] -> [δ]
ζ -> [ζ] -> [ζ] ~ η -> θ -> λ
α ~ ε -> λ -> ο
ε ~ η -> ν
α ~ ε -> θ -> ξ
ι -> [ι] -> [ι] ~ ν -> ξ -> ο

Substituting ζ for η, [ζ] for θ and λ, ι for ν, and [ι] for ξ and ο, all possible because a type constructor like · -> · is invertible in its arguments:

α ~ β -> [γ] -> [δ]
α ~ ε -> [ζ] -> [ι]
ε ~ ζ -> ι

Substituting ζ -> ι for ε and β -> [γ] -> [δ] for α, keeping the second constraint around so that we can recover α at the end:

α ~ (ζ -> ι) -> [ζ] -> [ι]
β -> [γ] -> [δ] ~ (ζ -> ι) -> [ζ] -> [ι]

And, finally, substituting (ζ -> ι) for β as well as ζ for γ and ι for δ because a type constructor like [·] is invertible eliminates all the variables specific to the second constraint:

α ~ (ζ -> ι) -> [ζ] -> [ι]

No more substitutions are possible, and relabeling gives us map :: (a -> b) -> [a] -> [b], the same as we found without going into these details.

Hindley–Milner type inference algorithm

edit

The algorithm first used to perform type inference is now informally termed the Hindley–Milner algorithm, although the algorithm should properly be attributed to Damas and Milner.[17] It is also traditionally called type reconstruction.[1]:?320? If a term is well-typed in accordance with Hindley–Milner typing rules, then the rules generate a principal typing for the term. The process of discovering this principal typing is the process of "reconstruction".

The origin of this algorithm is the type inference algorithm for the simply typed lambda calculus that was devised by Haskell Curry and Robert Feys in 1958.[citation needed] In 1969 J. Roger Hindley extended this work and proved that their algorithm always inferred the most general type. In 1978 Robin Milner,[18] independently of Hindley's work, provided an equivalent algorithm, Algorithm W. In 1982 Luis Damas[17] finally proved that Milner's algorithm is complete and extended it to support systems with polymorphic references.

Side-effects of using the most general type

edit

By design, type inference will infer the most general type appropriate. However, many languages, especially older programming languages, have slightly unsound type systems, where using a more general types may not always be algorithmically neutral. Typical cases include:

  • Floating-point types being considered as generalizations of integer types. Actually, floating-point arithmetic has different precision and wrapping issues than integers do.
  • Variant/dynamic types being considered as generalizations of other types in cases where this affects the selection of operator overloads. For example, the + operator may add integers but may concatenate variants as strings, even if those variants hold integers.

Type inference for natural languages

edit

Type inference algorithms have been used to analyze natural languages as well as programming languages.[19][20][21] Type inference algorithms are also used in some grammar induction[22][23] and constraint-based grammar systems for natural languages.[24]

References

edit
  1. ^ a b Benjamin C. Pierce (2002). Types and Programming Languages. MIT Press. ISBN 978-0-262-16209-8.
  2. ^ "WG14-N3007 : Type inference for object definitions". open-std.org. 2025-08-07. Archived from the original on December 24, 2022.
  3. ^ "Placeholder type specifiers (since C++11) - cppreference.com". en.cppreference.com. Retrieved 2025-08-07.
  4. ^ "The Dart type system". dart.dev. Retrieved 2025-08-07.
  5. ^ cartermp. "Type Inference - F#". docs.microsoft.com. Retrieved 2025-08-07.
  6. ^ "Inference · The Julia Language". docs.julialang.org. Retrieved 2025-08-07.
  7. ^ "Kotlin language specification". kotlinlang.org. Retrieved 2025-08-07.
  8. ^ "Statements - The Rust Reference". doc.rust-lang.org. Retrieved 2025-08-07.
  9. ^ "Type Inference". Scala Documentation. Retrieved 2025-08-07.
  10. ^ "The Basics — The Swift Programming Language (Swift 5.5)". docs.swift.org. Retrieved 2025-08-07.
  11. ^ "Documentation - Type Inference". www.typescriptlang.org. Retrieved 2025-08-07.
  12. ^ "Projects/Vala/Tutorial - GNOME Wiki!". wiki.gnome.org. Retrieved 2025-08-07.
  13. ^ KathleenDollard. "Local Type Inference - Visual Basic". docs.microsoft.com. Retrieved 2025-08-07.
  14. ^ Bryan O'Sullivan; Don Stewart; John Goerzen (2008). "Chapter 25. Profiling and optimization". Real World Haskell. O'Reilly.
  15. ^ Talpin, Jean-Pierre, and Pierre Jouvelot. "Polymorphic type, region and effect inference." Journal of functional programming 2.3 (1992): 245-271.
  16. ^ Hassan, Mostafa; Urban, Caterina; Eilers, Marco; Müller, Peter (2018). "MaxSMT-Based Type Inference for Python 3". Computer Aided Verification. Lecture Notes in Computer Science. Vol. 10982. pp. 12–19. doi:10.1007/978-3-319-96142-2_2. ISBN 978-3-319-96141-5.
  17. ^ a b Damas, Luis; Milner, Robin (1982), "Principal type-schemes for functional programs", POPL '82: Proceedings of the 9th ACM SIGPLAN-SIGACT symposium on principles of programming languages (PDF), ACM, pp. 207–212
  18. ^ Milner, Robin (1978), "A Theory of Type Polymorphism in Programming", Journal of Computer and System Sciences, 17 (3): 348–375, doi:10.1016/0022-0000(78)90014-4, hdl:20.500.11820/d16745d7-f113-44f0-a7a3-687c2b709f66
  19. ^ Center, Artificia? Intelligence. Parsing and type inference for natural and computer languages Archived 2025-08-07 at the Wayback Machine. Diss. Stanford University, 1989.
  20. ^ Emele, Martin C., and Rémi Zajac. "Typed unification grammars Archived 2025-08-07 at the Wayback Machine." Proceedings of the 13th conference on Computational linguistics-Volume 3. Association for Computational Linguistics, 1990.
  21. ^ Pareschi, Remo. "Type-driven natural language analysis." (1988).
  22. ^ Fisher, Kathleen, et al. "Fisher, Kathleen, et al. "From dirt to shovels: fully automatic tool generation from ad hoc data." ACM SIGPLAN Notices. Vol. 43. No. 1. ACM, 2008." ACM SIGPLAN Notices. Vol. 43. No. 1. ACM, 2008.
  23. ^ Lappin, Shalom; Shieber, Stuart M. (2007). "Machine learning theory and practice as a source of insight into universal grammar" (PDF). Journal of Linguistics. 43 (2): 393–427. doi:10.1017/s0022226707004628. S2CID 215762538.
  24. ^ Stuart M. Shieber (1992). Constraint-based Grammar Formalisms: Parsing and Type Inference for Natural and Computer Languages. MIT Press. ISBN 978-0-262-19324-5.
edit
计划生育什么时候开始的 strange什么意思 肉苁蓉有什么功效 阮小五的绰号是什么 钙化是什么意思
半元音是什么意思 扌字旁的字和什么有关 胸口有痣代表什么意思 血尿是什么原因引起的男性 摩登女郎是什么意思
腹泻恶心想吐是什么原因 根是什么生肖 稠是什么意思 女性绝经有什么征兆 日值上朔是什么意思
男生说gg是什么意思 恳请是什么意思 淋症是什么意思 眼睛流泪用什么药 液基薄层细胞检测是什么
cos是什么意思啊hcv8jop9ns5r.cn 医者仁心什么意思hcv9jop1ns5r.cn 心脏突然剧烈跳动是什么原因hcv8jop9ns9r.cn 血脂高什么意思hcv7jop6ns2r.cn 择偶标准是什么意思hcv8jop7ns3r.cn
明星经纪人是干什么的hcv9jop4ns1r.cn 体检生化项目查什么hcv8jop8ns2r.cn 雍是什么意思hcv9jop1ns3r.cn 喝什么茶去火hcv9jop0ns7r.cn 好运连绵是什么意思cl108k.com
性冷淡吃什么药最好hcv9jop3ns4r.cn 01年是什么年hcv9jop0ns0r.cn 向内求什么意思hcv8jop5ns6r.cn 雨花石是什么石头imcecn.com 铁皮石斛能治什么病hcv8jop3ns4r.cn
寄大件用什么物流便宜hcv7jop4ns6r.cn ll是什么意思hcv8jop1ns7r.cn 羽下面隹什么字hcv9jop7ns2r.cn 用什么可以解开所有的谜hcv9jop3ns4r.cn 智齿痛吃什么药wuhaiwuya.com
百度