01是什么生肖| 什么是气滞| 养狗人容易得什么病| 这个季节吃什么水果| 三月生日是什么星座| 黄山毛峰是什么茶| 久违什么意思| hla一b27阳性是什么意思| 孩子皮肤黑是什么原因| 什么时候母亲节| 高血压一级是什么意思| 2021年是什么生肖| 心率低有什么症状| 小妮子是什么意思| 邕是什么意思| 月经来了不能吃什么东西| 做扩胸运动有什么好处| 毫米后面的单位是什么| 内分泌代谢科是看什么病的| 避火图是什么| 孕晚期羊水多了对宝宝有什么影响| 丁丁历险记的狗是什么品种| 什么时候大阅兵| 用热毛巾敷眼睛有什么好处| 观赏是什么意思| 睾丸扭转是什么导致的| 跑完步喝什么水最好| 1975年属兔五行属什么| 自信是什么| ppi是什么药| 桑葚有什么功效| 阑是什么意思| 小孩突然头疼是什么原因| 闭关什么意思| o是什么元素| 桃子又什么又什么填空| 夏至为什么吃馄饨| 收缩压是什么意思| 安吉白茶属于什么茶类| 自欺欺人是什么生肖| 256排ct能检查什么病| 三不伤害是指什么| 六月初六是什么星座| 梅五行属什么| 早上起来口干口苦口臭是什么原因| 熟地黄是什么| 羽字属于五行属什么| 子宫肌瘤术后吃什么好| 什么名字好听男生| 肿气肿用什么药比较好| 反胃吃什么药| 吃红苋菜有什么好处| 多指是什么遗传方式| 尿糖2个加号是什么意思| 吃什么能降血压| 洋桔梗的花语是什么| 什么叫个人修养| 无花果什么时候成熟| 6月18是什么星座| 韭菜补什么| 12.16是什么星座| 银耳汤有什么功效| 迪赛尼斯属于什么档次| 小姨子是什么关系| 疤痕体质是什么原因| 脚臭是什么原因| 黑鱼吃什么| 燕窝是什么东西做的| 女生下面是什么样的| 两个月没来月经是什么原因| 肠梗阻是什么意思| 小儿便秘吃什么药| 徽音是什么意思| beyond什么意思| 嵌合体是什么意思| 二级烫伤是什么程度| 牛郎叫什么名字| 栉风沐雨是什么意思| 学长是什么意思| 半套什么意思| 看到壁虎是什么征兆| 阳历6月28日是什么星座| 脖子上长小肉疙瘩是什么原因| 尿道感染要吃什么药| 甲状腺肿物是什么意思| 白天不咳嗽晚上咳嗽吃什么药| 东华帝君的真身是什么| 口干口苦口臭是什么原因| 端午节吃什么菜呢| d是什么| 故宫为什么叫故宫| 验血挂什么科| 什么叫排比句| 咳嗽能吃什么水果最好| 女人肝火旺吃什么好| 装模作样是什么生肖| 脱线是什么意思| 生肖蛇和什么生肖相冲| 826是什么意思| 什么是人工智能| 孔雀的尾巴有什么作用| 肝病吃什么药好得快| 治疗狐臭挂什么科| 背疼什么原因| 鸟为什么会飞| 暗网是什么意思| 印比是什么意思| 葡萄都有什么品种| 全脂牛奶和脱脂牛奶有什么区别| 文化底蕴是什么意思| 梦到自己结婚什么意思| browser什么意思| 眼睛无神呆滞什么原因| 备孕需要做什么检查| 胆固醇偏高是什么原因| 蔬菜沙拉都放什么菜| 房颤什么症状| 为什么会闪电| 军师是什么意思| 属虎的适合什么职业| 红对什么| 刮痧的痧是什么东西| 荡气回肠什么意思| cdfi未见明显血流信号是什么意思| 网约车是什么意思| 小便多吃什么药好| oz是什么单位| 卡地亚属于什么档次| 隔离和防晒有什么区别| 碳酸氢钠有什么作用| 小根蒜学名叫什么| 血小板减少是什么原因| 美容师都要学什么| verde是什么颜色| 治妇科炎症用什么药好| 水什么| 震颤是什么症状| 墙头是什么意思| app是什么缩写| 吃灵芝有什么好处| 心颤吃什么药效果好| 什么样的水花| 沙棘对肝脏有什么好处| 胃顶的难受是什么原因| 验血肝功能看什么指标| 琥珀色是什么颜色| 典狱长是什么意思| 三点水一个希读什么| 西游记是什么生肖| 真身是什么意思| 什么油炒菜好吃又健康| 小姨的女儿叫什么| 上环后同房要注意什么| 女人肝火旺吃什么好| 红细胞计数偏高是什么意思| 什么争鸣成语| 臣字五行属什么| 看金鱼是什么梗| 王母娘娘属什么生肖| 什么是色拉油| 广州有什么区| 乌鸡汤放什么补气补血| 市监狱长是什么级别| 路由器坏了有什么症状| 明心见性是什么意思| 什么情况挂全科门诊| 眼睛胀痛是什么原因| 臭虫怕什么东西| 早上起来嘴巴发苦是什么原因| 会诊是什么意思| 什么药膏可以去黑头| azul是什么颜色| 不良人是什么| 女生安全期什么意思| 吃一个海参相当于吃了什么| 飞机上什么不能带| 继发性是什么意思| 招待是什么意思| 叔叔老婆叫什么| 嘴里发甜是什么原因| 梦见死去的亲人又活了是什么意思| 嘴苦嘴臭什么原因| 干咳挂什么科| 血压高压高低压正常是什么原因| 弥月之喜是什么意思| 青青的什么| 鹿土念什么| 萎缩性胃炎不能吃什么食物| 血糖高对身体有什么危害| 支气管炎吃什么好| 每天吃一个西红柿有什么好处| 眼底出血是什么原因| 小粉是什么粉| 男生小便尿道刺痛什么原因| 老年人吃什么好| 11月9日是什么星座| 屁股抽筋疼是什么原因| 碳足迹是什么| 什么时候闰十二月| 梦见鬼是什么预兆| 肛裂涂什么药膏能愈合| 暖气是什么症状| 大祭司是什么意思| 9.11是什么星座| 什么风呼啸| 猫癣传染人什么症状| 小姨的女儿叫什么| 重庆为什么叫雾都| 龋坏是什么意思| study是什么意思| 精炼植物油是什么油| 什么叫压缩性骨折| lauren是什么意思| 子宫痒是什么原因| 阴虚火旺有什么症状| 腿麻是什么病的前兆| 梦见和亲人吵架是什么意思| 朝鲜和韩国什么关系| 2月22是什么星座| 河南有什么美食| 造影检查对身体有什么伤害| 兔唇是什么原因造成的| 什么叫唐氏综合症| 门齿是指什么地方| 二拇指比大拇指长代表什么| 什么口什么舌| 刮宫和流产有什么区别| 带教是什么意思| 马的贵人是什么生肖| 肺部积液吃什么药| 害怕是什么意思| 摩罗丹主要治什么胃病| 1.22是什么星座| 刑警队是干什么的| 头发沙发是什么意思| 蓝柑是什么水果| 安全感是什么意思| 虎眼石五行属什么| 喝什么饮料解酒最快最有效| 胃痛胃胀什么原因引起的| 迪丽热巴是什么族| 白羊座和什么座最配| 爱出汗什么原因| 木字旁的字与什么有关| 一个兹一个子念什么| 3月5日什么星座| 火锅油碟是什么油| 碘酒和碘伏有什么区别| 梦到火是什么意思| 香瓜不能和什么一起吃| 生日蛋糕上写什么字比较有创意| 为什么听力会下降| 什么是结核病| 梦见很多蛇是什么征兆| 心脏检查挂什么科| 康复治疗技术学什么| 咳嗽吐白痰吃什么药| #NAME?| 什么好| hoegaarden是什么啤酒| 睡觉后脑勺出汗多是什么原因| 鸟屎掉手上有什么预兆| 马驹是什么意思| 透明的什么| 百度Jump to content

辍学的猫生 《林中之夜》游侠LMAO汉化补丁下载发布

From Wikipedia, the free encyclopedia
百度 其中一个观点认为,我们只需要对过去、现在和未来给出一个更好的物理定义,那么许多问题就有可能得到解决了。

In computer science, abstract interpretation is a theory of sound approximation of the semantics of computer programs, based on monotonic functions over ordered sets, especially lattices. It can be viewed as a partial execution of a computer program which gains information about its semantics (e.g., control-flow, data-flow) without performing all the calculations.

Its main concrete application is formal static analysis, the automatic extraction of information about the possible executions of computer programs; such analyses have two main usages:

Abstract interpretation was formalized by the French computer scientist working couple Patrick Cousot and Radhia Cousot in the late 1970s.[1][2]

Intuition

[edit]

This section illustrates abstract interpretation by means of real-world, non-computing examples.

Consider the people in a conference room. Assume a unique identifier for each person in the room, like a social security number in the United States. To prove that someone is not present, all one needs to do is see if their social security number is not on the list. Since two different people cannot have the same number, it is possible to prove or disprove the presence of a participant simply by looking up their number.

However it is possible that only the names of attendees were registered. If the name of a person is not found in the list, we may safely conclude that that person was not present; but if it is, we cannot conclude definitely without further inquiries, due to the possibility of homonyms (for example, two people named John Smith). Note that this imprecise information will still be adequate for most purposes, because homonyms are rare in practice. However, in all rigor, we cannot say for sure that somebody was present in the room; all we can say is that they were possibly here. If the person we are looking up is a criminal, we will issue an alarm; but there is of course the possibility of issuing a false alarm. Similar phenomena will occur in the analysis of programs.

If we are only interested in some specific information, say, "was there a person of age in the room?", keeping a list of all names and dates of births is unnecessary. We may safely and without loss of precision restrict ourselves to keeping a list of the participants' ages. If this is already too much to handle, we might keep only the age of the youngest, and oldest person, . If the question is about an age strictly lower than or strictly higher than , then we may safely respond that no such participant was present. Otherwise, we may only be able to say that we do not know.

In the case of computing, concrete, precise information is in general not computable within finite time and memory (see Rice's theorem and the halting problem). Abstraction is used to allow for generalized answers to questions (for example, answering "maybe" to a yes/no question, meaning "yes or no", when we (an algorithm of abstract interpretation) cannot compute the precise answer with certainty); this simplifies the problems, making them amenable to automatic solutions. One crucial requirement is to add enough vagueness so as to make problems manageable while still retaining enough precision for answering the important questions (such as "might the program crash?").

Abstract interpretation of computer programs

[edit]

Given a programming or specification language, abstract interpretation consists of giving several semantics linked by relations of abstraction. A semantics is a mathematical characterization of a possible behavior of the program. The most precise semantics, describing very closely the actual execution of the program, are called the concrete semantics. For instance, the concrete semantics of an imperative programming language may associate to each program the set of execution traces it may produce – an execution trace being a sequence of possible consecutive states of the execution of the program; a state typically consists of the value of the program counter and the memory locations (globals, stack and heap). More abstract semantics are then derived; for instance, one may consider only the set of reachable states in the executions (which amounts to considering the last states in finite traces).

The goal of static analysis is to derive a computable semantic interpretation at some point. For instance, one may choose to represent the state of a program manipulating integer variables by forgetting the actual values of the variables and only keeping their signs (+, ? or 0). For some elementary operations, such as multiplication, such an abstraction does not lose any precision: to get the sign of a product, it is sufficient to know the sign of the operands. For some other operations, the abstraction may lose precision: for instance, it is impossible to know the sign of a sum whose operands are respectively positive and negative.

Sometimes a loss of precision is necessary to make the semantics decidable (see Rice's theorem and the halting problem). In general, there is a compromise to be made between the precision of the analysis and its decidability (computability), or tractability (computational cost).

In practice the abstractions that are defined are tailored to both the program properties one desires to analyze, and to the set of target programs. The first large scale automated analysis of computer programs with abstract interpretation was motivated by the accident that resulted in the destruction of the first flight of the Ariane 5 rocket in 1996.[3]

Formalization

[edit]
Example: abstraction of integer sets (red) to sign sets (green)

Let be an ordered set, called concrete set, and let be another ordered set, called abstract set. These two sets are related to each other by defining total functions that map elements from one to the other.

A function is called an abstraction function if it maps an element in the concrete set to an element in the abstract set . That is, element in is the abstraction of in .

A function is called a concretization function if it maps an element in the abstract set to an element in the concrete set . That is, element in is a concretization of in .

Let , , , and be ordered sets. The concrete semantics is a monotonic function from to . A function from to is said to be a valid abstraction of if, for all in , we have .

Program semantics are generally described using fixed points in the presence of loops or recursive procedures. Suppose that is a complete lattice and let be a monotonic function from into . Then, any such that is an abstraction of the least fixed-point of , which exists, according to the Knaster–Tarski theorem.

The difficulty is now to obtain such an . If is of finite height, or at least verifies the ascending chain condition (all ascending sequences are ultimately stationary), then such an may be obtained as the stationary limit of the ascending sequence defined by induction as follows: (the least element of ) and .

In other cases, it is still possible to obtain such an through a (pair-)widening operator,[4] defined as a binary operator which satisfies the following conditions:

  1. For all and , we have and , and
  2. For any ascending sequence , the sequence defined by and is ultimately stationary. We can then take .

In some cases, it is possible to define abstractions using Galois connections where is from to and is from to . This supposes the existence of best abstractions, which is not necessarily the case. For instance, if we abstract sets of couples of real numbers by enclosing convex polyhedra, there is no optimal abstraction to the disc defined by .

Examples of abstract domains

[edit]

Numerical abstract domains

[edit]

One can assign to each variable available at a given program point an interval . A state assigning the value to variable will be a concretization of these intervals if, for all , we have . From the intervals and for variables and , respectively, one can easily obtain intervals for (namely, ) and for (namely, ); note that these are exact abstractions, since the set of possible outcomes for, say, , is precisely the interval . More complex formulas can be derived for multiplication, division, etc., yielding so-called interval arithmetics.[5]

Let us now consider the following very simple program:

y = x;
z = x - y;
Combination of interval arithmetic (green) and congruence mod 2 on integers (cyan) as abstract domains to analyze a simple piece of C code (red: concrete sets of possible values at runtime). Using the congruence information (0=even, 1=odd), a zero division can be excluded. (Since only one variable is involved, relational vs. non-relational domains is not an issue here.)
A 3-dimensional convex example polyhedron describing the possible values of 3 variables at some program point. Each of the variables may be zero, but all three can't be zero simultaneously. The latter property cannot be described in the interval arithmetics domain.

With reasonable arithmetic types, the result for z should be zero. But if we do interval arithmetic starting from x in [0, 1], one gets z in [?1, +1]. While each of the operations taken individually was exactly abstracted, their composition isn't.

The problem is evident: we did not keep track of the equality relationship between x and y; actually, this domain of intervals does not take into account any relationships between variables, and is thus a non-relational domain. Non-relational domains tend to be fast and simple to implement, but imprecise.

Some examples of relational numerical abstract domains are:

and combinations thereof (such as the reduced product,[2] cf. right picture).

When one chooses an abstract domain, one typically has to strike a balance between keeping fine-grained relationships, and high computational costs.

Machine word abstract domains

[edit]

While high-level languages such as Python or Haskell use unbounded integers by default, lower-level programming languages such as C or assembly language typically operate on finitely-sized machine words, which are more suitably modeled using the integers modulo (where n is the bit width of a machine word). There are several abstract domains suitable for various analyses of such variables.

The bitfield domain treats each bit in a machine word separately, i.e., a word of width n is treated as an array of n abstract values. The abstract values are taken from the set , and the abstraction and concretization functions are given by:[14][15] , , , , , , . Bitwise operations on these abstract values are identical with the corresponding logical operations in some three-valued logics:[16]

NOT(A)
A ?A
0 1
1 0
AND(A, B)
A ∧ B B
0 1
A 0 0 0 0
0
1 0 1
OR(A, B)
A ∨ B B
0 1
A 0 0 1
1
1 1 1 1

Further domains include the signed interval domain and the unsigned interval domain. All three of these domains support forwards and backwards abstract operators for common operations such as addition, shifts, xor, and multiplication. These domains can be combined using the reduced product.[17]

See also

[edit]

References

[edit]
  1. ^ Cousot, Patrick; Cousot, Radhia (1977). "Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints" (PDF). Conference Record of the Fourth ACM Symposium on Principles of Programming Languages, Los Angeles, California, USA, January 1977. ACM Press. pp. 238–252. doi:10.1145/512950.512973. S2CID 207614632.
  2. ^ a b Cousot, Patrick; Cousot, Radhia (1979). "Systematic Design of Program Analysis Frameworks" (PDF). Conference Record of the Sixth Annual ACM Symposium on Principles of Programming Languages, San Antonio, Texas, USA, January 1979. ACM Press. pp. 269–282. doi:10.1145/567752.567778. S2CID 1547466.
  3. ^ Faure, Christèle. "PolySpace Technologies History". Retrieved 3 October 2010.
  4. ^ Cousot, P.; Cousot, R. (August 1992). "Comparing the Galois Connection and Widening / Narrowing Approaches to Abstract Interpretation" (PDF). In Bruynooghe, Maurice; Wirsing, Martin (eds.). Proc. 4th Int. Symp. on Programming Language Implementation and Logic Programming (PLILP). Lecture Notes in Computer Science. Vol. 631. Springer. pp. 269–296. ISBN 978-0-387-55844-8.
  5. ^ Cousot, Patrick; Cousot, Radhia (1976). "Static determination of dynamic properties of programs" (PDF). Proceedings of the Second International Symposium on Programming. Dunod, Paris, France. pp. 106–130.
  6. ^ Granger, Philippe (1989). "Static Analysis of Arithmetical Congruences". International Journal of Computer Mathematics. 30 (3–4): 165–190. doi:10.1080/00207168908803778.
  7. ^ Philippe Granger (1991). "Static Analysis of Linear Congruence Equalities Among Variables of a Program". In Abramsky, S.; Maibaum, T.S.E. (eds.). Proc. Int. J. Conf. on Theory and Practice of Software Development (TAPSOFT). Lecture Notes in Computer Science. Vol. 493. Springer. pp. 169–192.
  8. ^ Cousot, Patrick; Halbwachs, Nicolas (January 1978). "Automatic Discovery of Linear Restraints Among Variables of a Program" (PDF). Conf. Rec. 5th ACM Symp. on Principles of Programming Languages (POPL). pp. 84–97.
  9. ^ Miné, Antoine (2001). "A New Numerical Abstract Domain Based on Difference-Bound Matrices". In Danvy, Olivier; Filinski, Andrzej (eds.). Programs as Data Objects, Second Symposium, (PADO). Lecture Notes in Computer Science. Vol. 2053. Springer. pp. 155–172. arXiv:cs/0703073.
  10. ^ Miné, Antoine (Dec 2004). Weakly Relational Numerical Abstract Domains (PDF) (Ph.D. thesis). Laboratoire d'Informatique de l'école Normale Supérieure.
  11. ^ Antoine Miné (2006). "The Octagon Abstract Domain". Higher Order Symbol. Comput. 19 (1): 31–100. arXiv:cs/0703084. doi:10.1007/s10990-006-8609-1.
  12. ^ Clarisó, Robert; Cortadella, Jordi (2007). "The Octahedron Abstract Domain". Science of Computer Programming. 64: 115–139. doi:10.1016/j.scico.2006.03.009. hdl:10609/109823.
  13. ^ Michael Karr (1976). "Affine Relationships Among Variables of a Program". Acta Informatica. 6 (2): 133–151. doi:10.1007/BF00268497. S2CID 376574.
  14. ^ Miné, Antoine (Jun 2012). "Abstract domains for bit-level machine integer and floating-point operations". WING'12 - 4th International Workshop on Invariant Generation. Manchester, United Kingdom: 16.
  15. ^ Regehr, John; Duongsaa, Usit (Jun 2006). "Deriving abstract transfer functions for analyzing embedded software". Proceedings of the 2006 ACM SIGPLAN/SIGBED conference on Language, compilers, and tool support for embedded systems. LCTES '06. New York, NY, USA: Association for Computing Machinery. pp. 34–43. doi:10.1145/1134650.1134657. ISBN 978-1-59593-362-1. S2CID 13221224.
  16. ^ Reps, T.; Loginov, A.; Sagiv, M. (Jul 2002). "Semantic minimization of 3-valued propositional formulae". Proceedings 17th Annual IEEE Symposium on Logic in Computer Science. pp. 40–51. doi:10.1109/LICS.2002.1029816. ISBN 0-7695-1483-9. S2CID 8451238.
  17. ^ Yoon, Yongho; Lee, Woosuk; Yi, Kwangkeun (2025-08-06). "Inductive Program Synthesis via Iterative Forward-Backward Abstract Interpretation". Proceedings of the ACM on Programming Languages. 7 (PLDI): 174:1657–174:1681. arXiv:2304.10768. doi:10.1145/3591288.
[edit]
Lecture notes
宫颈锥切术是什么意思 什么水果含维生素b 失眠吃什么药效果最好 子宫囊肿是什么原因引起的 大心脏是什么意思
翻白草治什么病 nikon是什么牌子 县长属于什么级别 胃疼胃胀吃什么药 神秘感是什么意思
早餐吃什么好 乙肝表面抗原携带者什么意思 男人结扎了有什么坏处 屋上土是什么意思 独显是什么意思
肺部炎症用什么药最好 纺锤形是什么形状 阴道排气是什么原因 什么叫六亲 宠溺是什么意思
月煞是什么意思bysq.com 什么血型最招蚊子咬hcv9jop8ns1r.cn 胃息肉是什么原因造成的hcv9jop2ns1r.cn 女性生活疼痛什么原因hcv8jop9ns4r.cn kick什么意思hcv8jop5ns3r.cn
忽必烈姓什么hcv9jop7ns4r.cn 甲功三项能查出什么病hcv7jop7ns1r.cn tvb为什么演员都走了hcv8jop2ns6r.cn 大白菜什么时候种tiangongnft.com 排长是什么级别sanhestory.com
梦见长大水是什么意思hcv8jop2ns7r.cn 热鸡蛋滚脸有什么作用hcv7jop5ns4r.cn 心外科是看什么病的hcv9jop4ns2r.cn 吃什么补气hcv9jop3ns9r.cn 30岁属什么hcv9jop6ns4r.cn
脚后跟疼挂什么科hcv7jop6ns9r.cn 牛气冲天是什么生肖zhongyiyatai.com 冷酷是什么意思hcv8jop3ns8r.cn 子宫为什么会长息肉hcv9jop0ns0r.cn 属马的贵人属相是什么hcv8jop1ns7r.cn
百度