活性变量分析

Live variable analysis

In compiler theory, live variable analysis(or simply livenesss analysis) is a classic data-flow analysis performed by compilers to calculate for each program point the variables that may be potentially read before their next write, that is, the variables that are live at the exit from each program point.

stated simply: a variable is live if it holds a value that may be needed in the future.

Example:

The set of live variables at line L3 is {b,c} because both are used in the multiplication, and thereby the call to f and assignment to a. But the set of live variables at line L1 is only {b} since variable c is updated in L2. The value of variable a is never used. Note that f may be stateful, so the never-live assignment to a can be eliminated, but there is insufficient information to rule on the entirely of L3.

Expression in terms of dataflow equations

Liveness analysis is a "backwards may" analysis. The analysis is done in a backwards order, and the dataflow confluence operator is set union. In other words, if applying liveness analysis to a function with a particular number of logical branches within it, the analysis is performed starting from the end of the function working towards the beginning(hence "backwards"), and a variable is considered live if any of the branches moving forward within the function might potentially(hence "may") need the variable's current value. This is in contrast to a "backwards must" analysis which would instead enforces this condition on all branches moving forwards.

The dataflow equations used for a given basic block s and exiting block f in live variable analysis are the following:

GEN[s]: The set of variables that are used in s before any assignment..

KILL[s]: The set of variables that are assigned a value in s(in many books, KILL(s) is also defined as the set of variables assigned a value in s before any use, but this does not change the solution of the dataflow equation):

The in-state of a block is the set of variables that are live at the start of the bock. Its out-state is the set of variables that are live at the end of if. The out-state is the union of the in-states of the block's sucessors. The transfer function of a statement is applied by making the variables that are writtern dead, then making the variables that are read live.

Second example

The in-state of b3 only contains b and d, since c has been writtern. The out-state of b1 is the union of the in-state of b2 and b3. The definition of c in b2 can be removed, since c is not live immediately after the statement.

Solving the data flow equations starts with initializing all in-state and out-states to the empty set. The work list is initialized by inserting the exit point(b3) in the work list(typical for backward flow). Its computed in-state differs from the previous one, so its predecessors b1 and b2 are inserted and the process continues. The progress is summarized in the table below.

Note that b1 was entered in the list before b2, which forced processing b1 twich(b1 was re-entered as processor of b2). Inserting b2 before b1 would have allowed earlier completion.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据文件“Molecular_Descriptor.xlsx”和“ERα_activity.xlsx”提供的数据,针对1974个化合物的729个分子描述符进行变量选择,根据变量对生物活性影响的重要性进行排序,并给出前20个对生物活性最具有显著影响的分子描述符(即变量),并请详细说明分子描述符筛选过程及其合理性。 问题2. 请结合问题1,选择不超过20个分子描述符变量,构建化合物对ERα生物活性的定量预测模型,请叙述建模过程。然后使用构建的预测模型,对文件“ERα_activity.xlsx”的test表中的50个化合物进行IC50值和对应的pIC50值预测,并将结果分别填入“ERα_activity.xlsx”的test表中的IC50_nM列及对应的pIC50列。 问题3. 请利用文件“Molecular_Descriptor.xlsx”提供的729个分子描述符,针对文件“ADMET.xlsx”中提供的1974个化合物的ADMET数据,从五个指标(Caco-2、CYP3A4、hERG、HOB、MN)中任选2个,分别构建其分类预测模型,并简要叙述建模过程。然后使用所构建的2个分类预测模型,对文件“ADMET.xlsx”的test表中的50个化合物进行相应的预测,并将结果填入“ADMET.xlsx”的test表中对应的Caco-2、CYP3A4、hERG、HOB、MN列。 问题4(选做). 寻找并阐述化合物的哪些分子描述符,以及这些分子描述符在什么取值或者处于什么取值范围时,能够使化合物对抑制ERα具有更好的生物活性,同时具有更好的ADMET性质(给定的五个ADMET性质中,至少三个性质较好)。
06-12

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值