什么邮票最值钱| 心脏跳得快是什么原因| 欧巴桑是什么意思| 细菌性前列腺炎吃什么药| 瘦肉精是什么| 异口同声什么意思| 蒸馏水是什么| 707是什么意思| 思维什么意思| 火召是什么字| 香油吃多了有什么害处| 碘伏和碘酒有什么区别| 为什么女生会来月经| eo是什么意思| 股票里xd是什么意思| 心率不齐是什么原因| 卤米松软膏主治什么| 鸦片鱼又叫什么鱼| 为什么低血糖| 菱形脸适合什么刘海| 为什么眼睛会疼| 蜱虫是什么样子的| 89年什么命| 痛风忌口不能吃什么东西| 奶粉可以做什么美食| 头部紧绷感是什么原因| 子宫后倾位是什么意思| 冷幽默是什么意思| 石榴石五行属什么| 肾病吃什么水果好| 孕晚期头晕是什么原因| 猫眼是什么| 每个月月经都提前是什么原因| 薄荷不能和什么一起吃| 内啡肽是什么| 喝啤酒尿多是什么原因| 心里发慌什么原因| 明朝北京叫什么| 白玉兰奖是什么级别的| 护士一般什么学历| 阴阳双补用什么药最佳| 24小时动态脑电图能查出什么| 被蜱虫咬了挂什么科| 什么样的沙滩| 吃什么可以补黄体酮| 炖牛腩放什么调料| 喝醉酒是什么感觉| 什么的波涛| 卵巢在什么位置示意图| 掉头发是什么原因女性| 蜻蜓喜欢吃什么| 茶叶蛋用什么茶叶| 分辨率dpi是什么意思| 子宫肌瘤吃什么中药可以消除掉| 玫瑰糠疹什么原因引起的| 什么人什么己| 十万个为什么儿童版| 舌苔白厚有齿痕是什么原因| 荞头是什么| 出国要办什么证件| 穿什么衣服显白| 梦见骑自行车是什么意思| 来月经前胸胀痛什么原因| 菖蒲是什么| 爱新觉罗是什么旗| 脱头发严重是什么原因引起的| 什么人不建议吃海参| 人乳头瘤病毒39型阳性是什么意思| 人为什么会变| 凤梨和菠萝有什么区别| 肺炎咳嗽吃什么药| 结膜囊在眼睛什么位置| 01年属蛇的是什么命| 什么草药治肿瘤最佳| 鳜鱼是什么鱼| 生物学父亲是什么意思| 择日不如撞日什么意思| 什么是省控线| 愿君多采撷是什么意思| 上海的特产是什么| 第二个手指叫什么| 尿毒症有些什么症状| 脉数是什么意思| 日加华读什么| 肝脏纤维化是什么意思| 塞屁股的退烧药叫什么| 吃什么可以偷偷流产| 沙中土是什么生肖| 孝服是什么意思| 耳膜破了有什么症状| 什么像什么似的造句| 牛杂是什么| 什么球身上长毛| 心脏不好的人吃什么好| 股藓要用什么药膏效果最好| 藏在我回忆里的那个人什么歌| 打生长激素有什么副作用| 肠道菌群失调吃什么药| 为什么眼睛有红血丝| 怀孕吃什么| 医院什么时候上班| 炒房是什么意思| 月经不调去医院挂什么科| 雌二醇低吃什么补得快| 家贼是什么生肖| 梅花表属于什么档次| 9月12是什么星座| 川普是什么意思| 男人吃香菜有什么好处| 异次元是什么意思| 会诊是什么意思| 2021年五行属什么| 一日无书下一句是什么| 防冻液红色和绿色有什么区别| 水鸭是什么鸭| 脚抽筋是什么原因| 中位生存期什么意思| 怀孕两个月出血是什么原因| 94年的属什么| 尿胆红素高是什么原因| 六味地黄丸什么牌子好| 独一味是什么药| 阑尾炎检查什么项目| 高考都考什么| 吓着了有什么症状| 方寸之地什么意思| 胎动频繁到什么程度说明缺氧| 来姨妈能吃什么水果| 五味子有什么作用| 舌头有裂痕是什么原因| 蛇瓜是什么| 青年节是什么生肖| 什么有成什么| 黄花是什么花| 乙肝五项一五阳性什么意思| 宫寒是什么原因引起的| 干什么挣钱最快| abs是什么意思| 车顶放饮料是什么意思| 英雄难过美人关是什么意思| 极差是什么| 唐玄宗为什么叫唐明皇| 健脾去湿吃什么药| 元朝是什么民族| 唾液酸是什么| 海鸥手表是什么档次| 山药和淮山有什么区别| 弱碱性水是什么水| 转氨酶异常有什么症状| 真实的印度是什么样的| 属相是什么| 跳舞有什么好处| 血管明显是什么原因| orf是什么意思| 衣食父母什么意思| sunglasses什么意思| 体温偏高的人说明什么| 望尘莫及什么意思| 男人尿频是什么原因| 水为什么是透明的| 九月初十是什么星座| 总胆红素高是什么病| 呕血是什么意思| 蟋蟀吃什么食物| 东北是什么气候| 月例是什么意思| 艾叶泡水喝有什么功效| 支气管炎吃什么药好得快| 社保卡是什么样的图片| 啊囊死给什么意思| 血热吃什么药好得快| 桃李满天下什么意思| 雪碧喝多了有什么危害| 受精卵着床是什么意思| 医保和农村合作医疗有什么区别| 铁蛋白高吃什么药能降下来| 吃什么对大脑记忆力好| 长期喝奶粉有什么好处| 放化疗后吃什么恢复快| 待字闺中是什么意思| 为什么月经会推迟| 狗狗细小是什么症状| 动则气喘是什么原因| 九月十三是什么星座| 女人鼻子大代表什么| 桂花是什么季节开的| 什么样的人不适合吃人参| 导管是什么| 腹痛拉肚子吃什么药| 独显是什么意思| 二月十七是什么星座| 台风什么时候到福建| 贪吃的动物是什么生肖| 包皮龟头炎吃什么药| 双龙什么| 禅心是什么意思| 肝不好吃什么水果| 挥霍是什么意思| 孤是什么意思| 老鼠是什么意思| 铁扇公主是什么生肖| poscer是什么牌子的手表| 哀鸿遍野是什么意思| 什么程度要做肾穿刺| 玉米吃了有什么好处| 1972年属什么生肖| 为什么医院开的钙都是碳酸钙| 大逆不道什么意思| 糖尿病能吃什么| 乳腺癌长在什么位置| 裳能组什么词| 护照类型p是什么意思| 脆生生是什么意思| 指桑骂槐是什么生肖| joola是什么牌子| 厅堂是什么意思| 体检吃早餐有什么影响| 什么龙戏珠| 患难见真情是什么意思| 什么能什么力| 蜜袋鼯吃什么| 都有什么瓜| 手信是什么意思| 莲藕是荷花的什么部位| 解尿支原体是什么| 树脂是什么材料| 甘少一横是什么字| 一个三点水一个令念什么| 甲状腺结节是什么原因引起的| 息肉样病变是什么意思| 尿隐血弱阳性什么意思| 4月26日是什么星座| 答非所问是什么意思| 膝盖疼做什么检查最好| 72年属什么生肖属相| mrmrs是什么牌子| 黑咖啡什么时候喝| 爱心是什么意思| 宫颈那囊什么意思| wink是什么意思| 一动就大汗淋漓是什么原因| 什么什么之什么| 滔滔不绝的绝是什么意思| 升结肠管状腺瘤是什么意思| 软开是什么| 脂膜炎是什么病| 肠易激综合症什么症状| nf是什么单位| 苦涩是什么意思| 四肢发麻是什么原因| 什么时间量血压最准| 拔牙吃什么消炎药好| 肺看什么科室| 二氧化碳结合力是什么| 吸入甲醛会有什么症状| 蛆长什么样子| sle是什么病| 中药什么时候喝效果最好| sapphire手表什么牌子| 拜土地公时要念什么好| igg抗体阳性是什么意思| alt什么意思| 脾胃科主要看什么| 爰是什么意思| 百度Jump to content

春季踏青正當時!春遊七大事項請注意

From Wikipedia, the free encyclopedia
Logtalk
ParadigmLogic programming, object-oriented programming, prototype-based programming
Designed byPaulo Moura
First appeared1998; 27 years ago (1998)
Stable release
3.66.0 / 30 May 2023; 2 years ago (2025-08-04)
OSCross-platform
LicenseArtistic License 2.0 (2.x) / Apache License 2.0 (3.01.x)
Websitelogtalk.org
Influenced by
Prolog, Smalltalk, Objective-C
百度 因此他认为,过去几年尽管逆全球化思潮蔓延、保护主义抬头,但中国始终坚定支持多边体制。

Logtalk is an object-oriented logic programming language that extends and leverages the Prolog language with a feature set suitable for programming in the large.[1] It provides support for encapsulation and data hiding, separation of concerns and enhanced code reuse.[1] Logtalk uses standard Prolog syntax with the addition of a few operators and directives.

The Logtalk language implementation is distributed under an open source license and can run using a Prolog implementation (compliant with official and de facto standards)[1] as the back-end compiler.

Features

[edit]

Logtalk aims to bring together the advantages of object-oriented programming and logic programming.[1] Object-orientation emphasizes developing discrete, reusable units of software, while logic programming emphasizes representing the knowledge of each object in a declarative way.

As an object-oriented programming language, Logtalk's major features include support for both classes (with optional metaclasses) and prototypes, parametric objects,[2] protocols (interfaces), categories (components, aspects, hot patching), multiple inheritance, public/protected/private inheritance, event-driven programming, high-level multi-threading programming,[3] reflection, and automatic generation of documentation.

For Prolog programmers, Logtalk provides wide portability, featuring predicate namespaces (supporting both static and dynamic objects), public/protected/private object predicates, coinductive predicates, separation between interface and implementation, simple and intuitive meta-predicate semantics, lambda expressions, definite clause grammars, term-expansion mechanism, and conditional compilation. It also provides a module system based on de facto standard core module functionality (internally, modules are compiled as prototypes).

Examples

[edit]

Logtalk's syntax is based on Prolog:

?- write('Hello world'), nl.
Hello world
true.

Defining an object:

:- object(my_first_object).

    :- initialization((write('Hello world'), nl)).

    :- public(p1/0).
    p1 :- write('This is a public predicate'), nl.

    :- private(p2/0).
    p2 :- write('This is a private predicate'), nl.

:- end_object.

Using the object, assuming is saved in a my_first_object.lgt file:

?- logtalk_load(my_first_object).
Hello world
true.

?- my_first_object::p1.
This is a public predicate
true.

Trying to access the private predicate gives an error:

?- my_first_object::p2.
ERROR: error(permission_error(access, private_predicate, p2), my_first_object::p2, user)

Anonymous functions

[edit]

Logtalk uses the following syntax for anonymous predicates (lambda expressions):

{FreeVar1, FreeVar2, ...}/[LambdaParameter1, LambdaParameter2, ...]>>Goal

A simple example with no free variables and using a list mapping predicate is:

| ?- meta::map([X,Y]>>(Y is 2*X), [1,2,3], Ys).
Ys = [2,4,6]
yes

Currying is also supported. The above example can be written as:

| ?- meta::map([X]>>([Y]>>(Y is 2*X)), [1,2,3], Ys).
Ys = [2,4,6]
yes

Prolog back-end compatibility

[edit]

Supported back-end Prolog compilers include B-Prolog, Ciao Prolog, CxProlog, ECLiPSe, GNU Prolog, JIProlog, Quintus Prolog, Scryer Prolog, SICStus Prolog, SWI-Prolog, Tau Prolog, Trealla Prolog, XSB, and YAP.[4] Logtalk allows use of back-end Prolog compiler libraries from within object and categories.

Developer tools

[edit]

Logtalk features on-line help, a documenting tool (that can generate PDF and HTML files), an entity diagram generator tool, a built-in debugger (based on an extended version of the traditional Procedure Box model found on most Prolog compilers), a unit test framework with code coverage analysis, and is also compatible with selected back-end Prolog profilers and graphical tracers.[5]

Applications

[edit]

Logtalk has been used to process STEP data models used to exchange product manufacturing information.[6] It has also been used to implement a reasoning system that allows preference reasoning and constraint solving.[7]

See also

[edit]

References

[edit]
  1. ^ a b c d Paulo Moura (2003). Logtalk: Design of an Object-Oriented Logic Programming Language. PhD thesis. Universidade da Beira Interior
  2. ^ Moura, Paulo (2011). Programming Patterns for Logtalk Parametric Objects. Applications of Declarative Programming and Knowledge Management. Lecture Notes in Computer Science. Vol. 6547. doi:10.1007/978-3-642-20589-7_4. ISBN 978-3-642-20588-0.
  3. ^ Practical Aspects of Declarative Languages. Lecture Notes in Computer Science. Vol. 4902. 2008. doi:10.1007/978-3-540-77442-6. ISBN 978-3-540-77441-9.
  4. ^ "Logtalk compatibility". Logtalk.org. 2025-08-04. Retrieved 2025-08-04.
  5. ^ "Developer Tools – LogtalkDotOrg/logtalk3 Wiki – GitHub". Github.com. 2025-08-04. Retrieved 2025-08-04.
  6. ^ Logic Programming. Lecture Notes in Computer Science. Vol. 4079. 2006. doi:10.1007/11799573. ISBN 978-3-540-36635-5.
  7. ^ Victor No?l; Antonis Kakas (2009). Gorgias-C: Extending Argumentation with Constraint Solving (PDF). Logic Programming and Nonmonotonic Reasoning. Lecture Notes in Computer Science. Vol. 5753. pp. 535–541.
[edit]
  • Official website
  • Logtalking blog
  • From Plain Prolog to Logtalk Objects: Effective Code Encapsulation and Reuse (Invited Talk). Paulo Moura. Proceedings of the 25th International Conference on Logic Programming (ICLP), July 2009. LNCS 5649. Springer-Verlag Berlin Heidelberg". (Slides)
氨基酸是什么东西 见多识广什么意思 有口臭是什么原因 减肥为什么会口臭 前列腺钙化有什么影响
什么是重生 唇周围长痘痘是什么原因 财星是什么意思 什么水果营养价值最高 大饼是什么意思
付诸东流是什么意思 梦见自己得了绝症预示着什么 包皮炎吃什么消炎药 新生儿喝什么奶粉好 逃出生天什么意思
一切有为法是什么意思 孕期血糖高可以吃什么水果 什么叫热射病 子宫肌瘤什么症状 舌头鱼又叫什么鱼
乳房上长黑色的斑点是什么原因hcv9jop1ns0r.cn bcc是什么意思hcv8jop8ns5r.cn 下午茶一般吃什么hcv8jop3ns1r.cn 绝经后子宫内膜增厚是什么原因hcv8jop8ns8r.cn 肺有问题会出现什么症状hcv9jop3ns1r.cn
宝宝咳嗽挂什么科baiqunet.com 阳虚吃什么药hcv9jop6ns4r.cn 张姓为什么出不了皇帝hcv9jop0ns1r.cn 长智齿意味着什么hcv7jop9ns8r.cn 梦见挖土豆是什么意思hcv9jop0ns4r.cn
皮肤有白点是什么原因hcv7jop6ns3r.cn 睚眦什么意思hcv8jop7ns5r.cn 斑秃是什么原因造成的hcv8jop4ns6r.cn 什么是工作fenrenren.com 北京为什么叫北平gysmod.com
spv是什么hcv8jop7ns3r.cn 医生代表什么生肖hcv9jop2ns9r.cn 梦见吃排骨是什么意思hcv9jop5ns6r.cn 芳华什么意思hcv8jop5ns8r.cn 回族不能吃什么hcv8jop6ns2r.cn
百度