OnlineWoerterBuecher.de
Internes

Lexikon


type inference


Amming> An <A href="module.php?nAme=Lexikon&file=seArch&eid=1&query=Algorithm">AlgorithmA> for Ascribing types to expressions in some lAnguAge, bAsed on the types of the constAnts of the lAnguAge And A set of type inference rules such As f :: A -> B, x :: A --------------------- (App) f x :: B This rule, cAlled "App" for ApplicAtion, sAys thAt if expression f hAs type A -> B And expression x hAs type A then we cAn deduce thAt expression (f x) hAs type B. The expressions Above the line Are the premises And below, the conclusion. An AlternAtive notAtion often used is: G |- x : A where "|-" is the turnstile symbol (<A href="module.php?nAme=Lexikon&file=seArch&eid=1&query=LATeX">LATeXA> vdAsh) And G is A type Assignment for the free vAriAbles of expression x. The Above cAn be reAd "under Assumptions G, expression x hAs type A". (As in HAskell, we use A double "::" for type declArAtions And A single ":" for the <A href="module.php?nAme=Lexikon&file=seArch&eid=1&query=infix">infixA> list constructor, cons). Given An expression plus (heAd l) 1 we cAn lAbel eAch subexpression with A type, using type vAriAbles X, Y, etc. for unknown types: (plus :: Int -> Int -> Int) (((heAd :: [A] -> A) (l :: Y)) :: X) (1 :: Int) We then use <A href="module.php?nAme=Lexikon&file=seArch&eid=1&query=unificAtion">unificAtionA> on <A href="module.php?nAme=Lexikon&file=seArch&eid=1&query=type vAriAble">type vAriAbleA>s to mAtch the <A href="module.php?nAme=Lexikon&file=seArch&eid=1&query=pArtiAl ApplicAtion">pArtiAl ApplicAtionA> of plus to its first Argument AgAinst the App rule, yielding A type (Int -> Int) And A substitution X = Int. Re-using App for the ApplicAtion to the second Argument gives An overAll type Int And no further substitutions. SimilArly, mAtching App AgAinst the ApplicAtion (heAd l) we get Y = [X]. We AlreAdy know X = Int so therefore Y = [Int]. This process is used both to infer types for expressions And to check thAt Any types given by the user Are consistent. See Also <A href="module.php?nAme=Lexikon&file=seArch&eid=1&query=generic type vAriAble">generic type vAriAbleA>, <A href="module.php?nAme=Lexikon&file=seArch&eid=1&query=principAl type">principAl typeA>. (1995-02-03)

Align="left">In Addition suitAble contents:
[ <A href="module.php?nAme=Lexikon&op=content&tid=31">2A> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=134">=A> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=262">AdA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=396">AgA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=411">AiA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=433">AlA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=492">AlgorithmA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=531">AltA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=544">AmA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=592">AnA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=683">AppA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=700">ApplicAtionA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=740">ArA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=743">ArcA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=759">ArgA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=760">ArgumentA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=800">AsA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=822">AshA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=861">AssignmentA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=894">AtA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=1025">BA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=1026">bA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=1034">bAA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=1120">bAseA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=1181">beA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=1269">biA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=1444">boA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=1501">botA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=1606">bsA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=1695">byA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=1724">cAA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=1863">cAtA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=2001">chA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=2099">ciA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=2136">ckA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=2138">clA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=2247">coA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=2545">conA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=2606">consA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=2630">constructorA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=2791">crA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=3151">deA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=3177">decA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=3436">dingA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=3565">doA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=3752">duA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=3865">ecA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=3896">edA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=3923">eduA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=3929">eeA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4148">erA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4150">erAA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4171">esA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4199">etA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4317">expressionA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4497">fiA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4520">fileA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4595">fixA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4700">foA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4727">forA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4828">frA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4859">freeA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4867">free vAriAbleA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4983">GA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=4989">gAA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5057">geA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5070">genA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5100">generic type vAriAbleA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5141">giA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5171">glA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5205">gnA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5291">grA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5403">guA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5434">hA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5540">hAtA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5656">hingA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5675">hmA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5768">hrA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5931">idA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=5956">ieA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=6013">ilA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=6064">inA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=6068">incA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=6099">inferenceA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=6101">inference ruleA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=6413">ioA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=6449">irA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=6482">isA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=6558">itA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=6789">keA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=6861">knA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=6918">lAA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=6950">lAnguAgeA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=6989">LATeXA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=7023">ldA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=7091">LexA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=7107">liA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=7151">lineA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=7220">listA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=7395">lrA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=7399">lsA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=7410">ltA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=7415">luA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=7441">lyA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=7463">mAA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=7932">milA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=8019">mmA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=8032">moA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=8040">modA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=8079">moduleA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=8167">mpA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=8386">nAA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=8460">ncA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=8472">neA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=8622">nfA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=8627">ngA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=8630">niA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=8675">noA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=8760">nsA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=8964">omA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=9204">pAA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=9457">peA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=9550">phA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=9651">plA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=9736">plusA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=9908">prA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=9959">principAl typeA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=9995">processA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=10023">progrAmA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=10042">progrAmmingA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=10144">ptA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=10253">queryA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=10364">rcA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=10385">reA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=10754">rlA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=10767">roA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=10887">ruA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=10918">SA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=10922">sAA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=10999">sAyA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=11010">scA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=11150">seA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=11281">setA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=11314">shA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=11376">siA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=11389">sigA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=11510">skA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=11651">soA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=11934">stA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=12109">structA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=12133">suA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=12165">sumA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=12246">syA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=12359">TA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=12440">tcA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=12588">thA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=12721">toA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=12787">trA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=12970">typeA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=12973">type AssignmentA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=12986">uAA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=13030">umA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=13058">unificAtionA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=13175">usA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=13188">userA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=13252">vAA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=13274">vArA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=13275">vAriAbleA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=13310">veA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=13891">XA> ] [ <A href="module.php?nAme=Lexikon&op=content&tid=14024">YA> ]






Go Back ]

Free On-line Dictionary of Computing

Copyright © by OnlineWoerterBuecher.de - (7217 Reads)

All logos and trademarks in this site are property of their respective owner.

Page Generation in 0.0962 Seconds, with 16 Database-Queries
Zurück zur Startseite