照见五蕴皆空什么意思| 海绵体充血不足吃什么药| 咳嗽有白痰吃什么药最好| 内痔是什么样的图片| 大便不成型吃什么药| 关节炎吃什么药| 淋巴结节挂什么科| 睡醒嘴苦是什么原因| 右脚浮肿预示着什么| sb是什么元素符号| 胃嗳气是什么原因| 女人梦见鱼是什么意思| 女主是什么意思| 粟米是什么米| 经常吐是什么原因| 夏天煲什么汤最好| 什么的绿毯| 脚癣用什么药最好| 小蛮腰是什么意思| 呼吸短促是什么原因| 肛门瘙痒是什么问题| 250什么意思| 黄油是什么意思| 一月来两次月经是什么原因| 梦见下牙掉了是什么征兆| 转念是什么意思| 男人性功能不行是什么原因| ceo是什么意思| 脸上长毛什么原因| 西瓜跟什么不能一起吃| 什么是汗疱疹| 毛豆炒什么好吃| 枫叶是什么颜色| 店招是什么意思| 肾的主要功能是什么| 什么是前列腺增生| 肺部肿瘤3cm什么期| 未央什么意思| 牙齿掉了一小块是什么原因| 绿豆和什么食物相克| qn医学上是什么意思| 萎缩性胃炎伴糜烂吃什么药| 骨裂吃什么药| 年金是什么意思| 白莲子和红莲子有什么区别| 断桥是什么意思| 押韵是什么意思| 血稠是什么原因造成的| 肝功能异常是什么意思| 小限是什么意思| 青岛啤酒节是什么时候| 阳气是什么意思| 整装是什么意思| 煎牛排用什么锅最好| 上海特产是什么| 颠三倒四是什么意思| 朔字五行属什么| 颈动脉斑块做什么检查| 食道癌有什么症状| 草字头加全念什么| 尿液有白色絮状物是什么原因| 腹部包块是什么样子的| 冬虫夏草有什么作用| 吃什么补叶酸最快| 吃什么能增肥最快| 做腹腔镜手术后需要注意什么| 海澜之家属于什么档次| 晚上适合吃什么| 凤尾菜又叫什么菜| 什么贝壳| 蓬头垢面是什么意思| 面试是什么意思| 多发性硬化是什么病| 天气一热身上就痒是什么原因| 痰湿吃什么中成药| 金光是什么生肖| 降钙素原高是什么原因| 副区长什么级别| 孕早期胎停有什么症状或征兆吗| 做妇科检查前需要注意什么| 咳嗽完想吐是什么原因| 女人是什么| 十玉九裂是什么意思| 营养性贫血是什么意思| 猪跟什么生肖配对最好| 2028什么年| 甜字五行属什么| 适得其反是什么意思| 刚感染艾滋病什么症状| 骨折挂什么科| 胃炎是什么原因引起的| 什么地蹲着| 肝脏b超能检查出什么| 脂肪肝中医叫什么名字| 丝苗米是什么米| 四大名著是什么| 动脉抽血为什么这么疼| 脚肿了是什么原因| 再生纤维素纤维是什么| 泡脚什么时候最佳时间| 减肥期间早餐应该吃什么| 胃寒吃什么药好| 松鼠是什么生肖| 血压低吃什么补血| 晚上十二点是什么时辰| 十二指肠溃疡是什么症状| 文火是什么火| 什么叫五音不全| 什么的城楼| 鼻子上长红疙瘩是什么原因| 圆滑是什么意思| 白交念什么| 几天不大便是什么原因| 植物神经紊乱用什么药| 什么样的红点是白血病| 彩礼什么时候给女方| 大麦茶有什么功效与作用| 袋鼠属于什么类动物| ns是什么意思| 中国四大发明是什么| 尿胆原是什么| 丙子日是什么意思| 吃葡萄有什么好处| oppo是什么牌子| 智齿拔了有什么影响| 粘连是什么意思| 粉饼是干什么用的| 中药学专业学什么| 什么是主观什么是客观| 白头发是缺什么维生素| 11月21日什么星座| 传媒公司主要做什么| 迁单是什么意思| dl是什么| 快车和专车有什么区别| aids是什么意思| 哺乳期上火了吃什么降火最快| hpv亚型是什么意思| 良代表什么生肖| nba常规赛什么时候开始| 胃窦糜烂是什么意思严重吗| 梦见盖房子什么意思| 岁月匆匆是什么意思| 寂是什么意思| 蚯蚓是什么动物| 铀是什么| 月底是什么时候| 什么食物降胆固醇最好| 盆腔积液吃什么药好| 手信是什么东西| 头疼挂什么科室| 左耳长痣代表什么| 肺部感染吃什么药效果好| 梦见自己掉头发是什么征兆| 亚临床甲亢是什么意思| 甲减对胎儿有什么影响| 骨密度低吃什么药最快| 四物汤什么时候喝最好| 非即食是什么意思| 悉如外人的悉是什么意思| 嘴巴长疱疹是什么原因| 梦见鞋丢了是什么意思| 吹空调咳嗽是什么原因| 急性肠胃炎可以吃什么| 冰粉是什么| 贫血查什么| 单亲家庭是指什么| 尿酸高的人吃什么食物好| 脂肪肝轻度是什么意思| 阴虚火旺吃什么食物好| 干什么呢| 羽毛球拍磅数是什么意思| 为什么叫老鸨| 河虾最爱吃什么食物| 什么助听器| 缺钾最忌讳吃什么| 二刷是什么意思| 银子发黄是什么原因| 雏凤是什么意思| tvb是什么意思| 1968属什么生肖| 25羟基维生素d是什么| 什么叫室性早搏| 塞浦路斯说什么语言| 摩羯女和什么星座最配| 浅棕色是什么颜色| 咳嗽有痰吃什么药好得最快最有效| 小m是什么意思| 粉饼是干什么用的| 糗事是什么意思| 美容美体是干什么的| 射精出血吃什么药最好| 秦始皇为什么焚书坑儒| 酵素是什么| 乙肝25阳性什么意思| 驱除鞑虏是什么意思| 食道肿瘤有什么症状| 菠菜和豆腐为什么不能一起吃| 米非司酮片是什么药| 什么食物含钾高| 眼睛老是流眼泪是什么原因| 泽泻是什么| 人为什么会变| 素鸡是什么做的| 什么药去湿气最好最快| hpv16有什么症状| 盗墓笔记讲了什么| au750是什么金属| 日本为什么要侵略中国| 吃什么补叶酸最快| 月经量少发黑是什么原因| 蟒袍是什么人穿的| 2010年属什么生肖| 血肌酐高是什么原因| 文定之喜是什么意思| 猫吐了吃什么药| ec50是什么意思| silence是什么意思| 相手蟹吃什么| 从商是什么意思| 背后长痘痘是什么原因| 淋症是什么意思| hcg翻倍慢是什么原因| tm是什么意思| 心绞痛吃什么药好| 阑是什么意思| 血糖高吃什么可以降下来| 抑郁看病看什么科| 中药木香的功效与作用是什么| 维生素c什么时候吃最好| 不想吃饭吃什么药| 番茄和西红柿有什么区别| 什么是假性自闭症| 水可以加什么偏旁| bug什么意思| 孕妇拉肚子可以吃什么药| 上分是什么意思| 手串18颗代表什么意思| 手心发烧是什么原因| 押韵是什么意思| 徒木立信是什么意思| 男性硬下疳是什么样子| 黄桃不能和什么一起吃| 卤水点豆腐的卤水是什么| g750是什么金| 彼此彼此什么意思| 为什么夏天越来越热| 过午不食什么意思| 合拢是什么意思| 毛囊炎什么症状| 云南简称是什么| 下一年是什么生肖| 肺纤维化有什么症状| 手麻木什么原因| 一直腹泻是什么原因| 耻骨疼是什么原因| 吃什么东西可以除湿气| 秀才相当于什么学历| 坐地能吸土是什么意思| 晚上总是睡不着觉是什么原因| 蓝色妖姬代表什么含义| 哀转久绝的绝什么意思| 巨蟹座是什么性格| 摩尔每升是什么单位| 百度Jump to content

穿越火线:枪战王者-大头爆破大乱斗怎么玩…

From Wikipedia, the free encyclopedia
百度 把蓝图变为现实,将改革进行到底,“幸福都是奋斗出来的。

Clean
Paradigmfunctional
Designed bySoftware Technology Research Group of Radboud University Nijmegen
First appeared1987; 38 years ago (1987)
Stable release
3.1 / 5 January 2022; 3 years ago (2025-08-06)
Typing disciplinestrong, static, dynamic
OSCross-platform
LicenseSimplified BSD[1]
Filename extensions.icl, .dcl, .abc
Websiteclean.cs.ru.nl
Influenced by
Lean, Miranda, Haskell
Influenced
Haskell, Idris[2]

Clean is a general-purpose purely functional programming language. Originally called the Concurrent Clean System[3] or the Clean System,[4][5] it has been developed by a group of researchers from the Radboud University in Nijmegen since 1987.[6][7] Although development of the language has slowed, some researchers are still working in the language.[8] In 2018, a spin-off company was founded that uses Clean.[9]

Features

[edit]

Clean shares many properties and syntax with a younger sibling language, Haskell: referential transparency, list comprehension, guards, garbage collection, higher order functions, currying, and lazy evaluation. However, Clean deals with mutable state and input/output (I/O) through a uniqueness type system, in contrast to Haskell's use of monads. The compiler takes advantage of the uniqueness type system to generate more efficient code, because it knows that at any point during the execution of the program, only one reference can exist to a value with a unique type. Therefore, a unique value can be changed in place.[10]

An integrated development environment (IDE) for Microsoft Windows is included in the Clean distribution.

Examples

[edit]

Hello world:

 Start = "Hello, world!"

Factorial:

fac :: Int -> Int
fac 0 = 1
fac n = n * fac (n-1)

Start = fac 10
fac :: Int -> Int
fac n = prod [1..n] // The product of the numbers 1 to n

Start = fac 10

Fibonacci sequence:

fib :: Int -> Int
fib 0 = 1
fib 1 = 1
fib n = fib (n - 2) + fib (n - 1)

Start = fib 7
fibs :: Int Int -> [Int]
fibs x_2 x_1 = [x_2:fibs x_1 (x_2 + x_1)]

fib :: Int -> Int
fib n = (fibs 1 1) !! n

Start = fib 7

Infix operator:

(^) infixr 8 :: Int Int -> Int
(^) x 0 = 1
(^) x n = x * x ^ (n-1)

The type declaration states that the function is a right associative infix operator with priority 8: this states that x*x^(n-1) is equivalent to x*(x^(n-1)) as opposed to (x*x)^(n-1). This operator is pre-defined in StdEnv, the Clean standard library.

How Clean works

[edit]

Computing is based on graph rewriting and reduction. Constants such as numbers are graphs and functions are graph rewriting formulas. This, combined with compiling to native code, makes Clean programs which use high abstraction run relatively fast according to The Computer Language Benchmarks Game.[11] A 2008 benchmark showed that Clean native code performs similarly to the Glasgow Haskell Compiler (GHC), depending on the benchmark.[12]

Compiling

[edit]

Compilation of Clean to machine code is performed as follows:

  1. Source files (.icl) and definition files (.dcl) are translated into Core Clean, a basic variant of Clean, by the compiler frontend written in Clean.
  2. Core clean is converted into Clean's platform-independent intermediate language (.abc), by the compiler backend written in Clean and C.
  3. Intermediate ABC code is converted to object code (.o) by the code generator written in C.
  4. Object code is linked with other files in the module and the runtime system and converted into a normal executable using the system linker (when available) or a dedicated linker written in Clean on Windows.

Earlier versions of the Clean compiler were written completely in C, thus avoiding bootstrapping issues.

The ABC machine

[edit]

The ABC code mentioned above is an intermediate representation for an abstract machine. Because machine code generation for ABC code is relatively straightforward, it is easy to support new architectures. The ABC machine is an imperative abstract graph rewriting machine.[13] It consists of a graph store to hold the Clean graph that is being rewritten and three stacks:

  • The A(rgument)-stack holds arguments that refer to nodes in the graph store.
  • The B(asic value)-stack holds basic values (integers, characters, reals, etc.). Although these values could be nodes in the graph store, a separate stack is used for efficiency.
  • The C(ontrol)-stack holds return addresses for flow control.

The runtime system, which is linked into every executable, builds a Start node in the graph store and pushes it on the A-stack. It then begins printing it, evaluating it as needed.

Running Clean in the browser

[edit]

Although Clean is typically used to generate native executables, several projects have enabled applications in web browsers. The now abandoned SAPL project compiled Core Clean to JavaScript and did not use ABC code. Since 2019, an interpreter for ABC code, written in WebAssembly, is used instead.[14][15]

Platforms

[edit]

Clean is available for Microsoft Windows (IA-32 and X86-64), macOS (X86-64), and Linux (IA-32, X86-64, and AArch64).[citation needed]

Some libraries are not available on all platforms, like ObjectIO which is only available on Windows. Also the feature to write dynamics to files is only available on Windows.[citation needed]

The availability of Clean per platform varies with each version:[16][17]

Version Date Linux macOS Oracle Solaris Windows Miscellaneous
IA-32 x86-64 AArch64 Motorola 68040 PowerPC x86-64 SPARC IA-32 x86-64
3.1 5 January 2022 Yes Yes Yes No No Yes No Yes Yes
3.0 2 October 2018 Yes Yes No No No Yes No Yes Yes
2.4 23 December 2011 Yes Yes No No No Yes No Yes Yes
2.3 22 December 2010 Yes Yes No No No No No Yes Yes
2.2 19 December 2006 Yes Yes No No Yes No Yes Yes Yes
2.1.1 31 May 2005 Yes No No No Yes No Yes Yes No
2.1.0 31 October 2003 Yes No No No Yes No Yes Yes No
2.0.2 12 December 2002 Yes No No No Yes No Yes Yes No
2.0.1 4 July 2002 Yes No No No Yes No Yes Yes No
2.0 21 December 2001 No No No No No No No Yes No
1.3.3 13 September 2000 Yes No No No Yes No Yes Yes No
1.3.2 1 July 1999 No No No Yes Yes No Yes Yes No
1.3.1 January 1999 Yes No No No Yes No Yes Yes No
1.3 22 May 1998 Yes No No No Yes No Yes Yes No
1.2.4 June 1997 No No No Yes Yes No No Yes No
1.2.3 May 1997 No No No Yes Yes No No Yes No
1.2 13 January 1997 No No No Yes Yes No No No No
1.1.3 October 1996 No No No No No No Yes No No OS/2 (i80386)
1.1.2 September 1996 Yes No No No No No Yes No No SunOS 4 (SPARC)
1.1 March 1996 Yes No No Yes No No No No No
1.0.2 September 1995 Yes No No Yes No No Yes No No OS/2 (i80386); SunOS 4 (SPARC)
1.0 May 1995 No No No Yes No No No No No OS/2 (i80386)
0.8.4 11 May 1993 Yes No No Yes No No No No No Experimental T800 transputer release
0.8.3 26 February 1993 No No No Yes No No No No No
0.8.1 19 October 1992 No No No Yes No No No No No
0.8 13 July 1992 No No No Yes No No No No No OS/2 (i80386); SunOS 3–4 (SPARC)
0.7 May 1991 No No No Yes No No No No No SunOS 3–4 (SPARC)

Comparison to Haskell

[edit]

The syntax of Clean is very similar to that of Haskell, with some notable differences. In general, Haskell has introduced more syntactic sugar than Clean:[10]

Haskell Clean Remarks
[ x | x <- [1..10] , isOdd x]
[ x \\ x <- [1..10] | isOdd x]
list comprehension
x:xs
[x:xs]
cons operator
data Tree a
  = Empty
  | Node (Tree a) a (Tree a)
:: Tree a
  = Empty
  | Node (Tree a) a (Tree a)
algebraic data type
(Eq a, Eq b) => ...
... | Eq a & Eq b
class assertions and contexts
fun t@(Node l x r) = ...
fun t=:(Node l x r) = ...
as-patterns
if x > 10 then 10 else x
if (x > 10) 10 x
if

References

[edit]
  1. ^ "Download Clean". Clean. Retrieved 23 July 2019.
  2. ^ "Idris - Uniqueness Types". Retrieved 20 November 2018.
  3. ^ "Clean 0.7: Readme". Archived from the original on 24 May 2019.
  4. ^ "Clean 1.0: Readme". Archived from the original on 5 May 2019.
  5. ^ "Clean 1.3: Readme". Archived from the original on 27 April 2019.
  6. ^ "Radboud University Nijmegen: Department of Software Science: Software".
  7. ^ "FAQ". Clean. Retrieved 26 November 2021.
  8. ^ "Publications". Clean. Retrieved 26 November 2021.
  9. ^ "Home". TOP Software Technology. Retrieved 26 November 2021.
  10. ^ a b "FTP link" (PDF). ftp.cs.ru.nl (FTP).[dead ftp link] (To view documents see Help:FTP)
  11. ^ "Which programming languages are fastest?". Computer Language Benchmarks Game. Archived from the original on 28 June 2011.{{cite web}}: CS1 maint: bot: original URL status unknown (link)
  12. ^ Jansen, Jan Martin; Koopman, Pieter; Plasmeijer, Rinus (2008). "From Interpretation to Compilation" (PDF). FTP server (FTP). Retrieved 21 May 2016.[dead ftp link] (To view documents see Help:FTP)
  13. ^ Koopman, Pieter (10 December 1990). Functional Programs as Executable Specifications (PhD). Katholieke Universiteit Nijmegen. p. 35. ISBN 90-9003689-X.
  14. ^ "Clean and iTasks / ABC Interpreter · GitLab". Clean and iTasks on GitLab. Retrieved 13 April 2023.
  15. ^ Staps, Camil; van Groningen, John; Plasmeijer, Rinus (15 July 2021). "Lazy interworking of compiled and interpreted code for sandboxing and distributed systems". Proceedings of the 31st Symposium on Implementation and Application of Functional Languages. pp. 1–12. doi:10.1145/3412932.3412941. ISBN 9781450375627. S2CID 202751977.
  16. ^ "Release history". Clean. Retrieved 7 January 2022.
  17. ^ "Index of /Clean". Retrieved 7 January 2022.
[edit]
4月22日是什么星座 梦见跟别人打架是什么意思 蹲着有什么好处 轻医美是什么 细菌感染吃什么药
上海市长什么级别 一月19日是什么星座 什么叫钝痛 送女朋友什么礼物好 皇太极叫什么名字
茯苓什么味道 归是什么意思 女人吃什么 adp是什么意思 什么是肝脏纤维化
病逝是什么意思 补血吃什么药最快最好 李白字什么号什么 月经什么颜色的血是正常的 梦见活人死了是什么意思
气管炎挂什么科imcecn.com 梦见新房子是什么意思hcv8jop9ns9r.cn 证候是什么意思hcv8jop1ns2r.cn 外阴白斑是什么引起的hcv8jop6ns6r.cn 孟母三迁告诉我们什么道理dajiketang.com
什么是格林巴利综合症jasonfriends.com 轻轻地什么hcv7jop4ns6r.cn 孩子不愿意吃饭是什么原因hcv9jop4ns1r.cn 嘴巴下面长痘痘是什么原因引起的hcv9jop5ns2r.cn 受控是什么意思qingzhougame.com
来例假吃什么水果hcv9jop1ns1r.cn 梦见死人了是什么意思hcv7jop6ns9r.cn 氰化钾是什么hcv7jop5ns5r.cn 元辰是什么意思hcv9jop4ns4r.cn 村支部书记是什么级别hcv8jop9ns9r.cn
2025是什么生肖年hcv7jop5ns4r.cn 膝盖积液有什么症状hcv8jop0ns1r.cn few是什么意思hcv8jop2ns0r.cn 华西医院院长什么级别hcv7jop6ns5r.cn 为什么拼音beikeqingting.com
百度