<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>NotionNext BLOG</title>
        <link>https://rroscha.vercel.app//</link>
        <description>这是一个由NotionNext生成的站点</description>
        <lastBuildDate>Tue, 28 Feb 2023 10:35:57 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en-US</language>
        <copyright>All rights reserved 2023, Rroscha</copyright>
        <item>
            <title><![CDATA[What is ChatGPT?]]></title>
            <link>https://rroscha.vercel.app//article/32141a15-af6d-4b32-9cfd-b1f4ea18fbb4</link>
            <guid>32141a15-af6d-4b32-9cfd-b1f4ea18fbb4</guid>
            <pubDate>Mon, 27 Feb 2023 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="container" class="max-w-5xl font-medium mx-auto undefined"><main class="notion light-mode notion-page notion-block-32141a15af6d4b329cfdb1f4ea18fbb4"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-cf427c48a1e74e749a424d298de7b000" data-id="cf427c48a1e74e749a424d298de7b000"><span><div id="cf427c48a1e74e749a424d298de7b000" class="notion-header-anchor"></div><a class="notion-hash-link" href="#cf427c48a1e74e749a424d298de7b000" title="ChatGPT: The AI-Powered Chatbot Revolutionizing Conversations"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">ChatGPT: The AI-Powered Chatbot Revolutionizing Conversations</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-fa86f78d78df4a11831eadcd18d0dc4c" data-id="fa86f78d78df4a11831eadcd18d0dc4c"><span><div id="fa86f78d78df4a11831eadcd18d0dc4c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#fa86f78d78df4a11831eadcd18d0dc4c" title="Introduction"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Introduction</span></span></h3><div class="notion-text notion-block-3fbbfe76b1714dd980b4945ac3c3b2c5">Chatbots are now a ubiquitous presence in our daily lives, from customer service to medical consultations, and even as virtual assistants. With the rise of artificial intelligence, chatbots have evolved from simple rule-based systems to sophisticated conversational agents that can understand, interpret, and respond to natural language queries. Enter ChatGPT, an AI-powered chatbot that is transforming the way we interact with machines.</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-ad499ff7e23d48558db1c64462513a73" data-id="ad499ff7e23d48558db1c64462513a73"><span><div id="ad499ff7e23d48558db1c64462513a73" class="notion-header-anchor"></div><a class="notion-hash-link" href="#ad499ff7e23d48558db1c64462513a73" title="What is ChatGPT?"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">What is ChatGPT?</span></span></h3><div class="notion-text notion-block-a17702a1bb0a4dd0a0168f91f3db84ed">ChatGPT is an open-source conversational agent developed by OpenAI, a research organization dedicated to advancing artificial intelligence in a safe and beneficial way. The chatbot is powered by GPT (Generative Pretrained Transformer) technology, a state-of-the-art language model trained on massive amounts of text data to generate human-like responses to various prompts. ChatGPT taps into a vast knowledge base that allows it to answer a wide range of questions, from factual queries to philosophical musings, with accuracy and nuance.</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-10a0465ec2ce49aaa9515573f8f70f83" data-id="10a0465ec2ce49aaa9515573f8f70f83"><span><div id="10a0465ec2ce49aaa9515573f8f70f83" class="notion-header-anchor"></div><a class="notion-hash-link" href="#10a0465ec2ce49aaa9515573f8f70f83" title="How does ChatGPT work?"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">How does ChatGPT work?</span></span></h3><div class="notion-text notion-block-959ed86cedaf4832ba4eb4cab9d7027d">ChatGPT uses a machine learning algorithm to analyze the input it receives from users and generate a response based on its training data. The chatbot has been trained on a massive corpus of text data, including books, articles, and web pages, which enables it to understand and respond to natural language input. ChatGPT employs a technique called transfer learning, which involves fine-tuning the pre-trained model on a smaller dataset to adapt it to a particular domain or task. This approach makes ChatGPT highly flexible and adaptable to different contexts and user needs.</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-9c91fc84699a4ce7ae1fb15a7cac32e5" data-id="9c91fc84699a4ce7ae1fb15a7cac32e5"><span><div id="9c91fc84699a4ce7ae1fb15a7cac32e5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#9c91fc84699a4ce7ae1fb15a7cac32e5" title="Benefits of ChatGPT"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Benefits of ChatGPT</span></span></h3><div class="notion-text notion-block-fd68d9774c6e4bbfbfeba1dd0d16c72e">ChatGPT offers several benefits over traditional chatbots and human assistants alike. Firstly, it provides 24/7 availability, enabling users to get answers to their queries at any time of day or night. Secondly, ChatGPT is highly scalable, as it can handle multiple conversations simultaneously without slowing down or compromising accuracy. Finally, ChatGPT is free and open-source, which means that anyone can use it, modify it, and contribute to its development.</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-fe7b6c720f2c4595aa97b9fab6879249" data-id="fe7b6c720f2c4595aa97b9fab6879249"><span><div id="fe7b6c720f2c4595aa97b9fab6879249" class="notion-header-anchor"></div><a class="notion-hash-link" href="#fe7b6c720f2c4595aa97b9fab6879249" title="Conclusion"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Conclusion</span></span></h3><div class="notion-text notion-block-58b8907c82684e6b806fe00c51cca1ba">ChatGPT is a game-changing technology that is revolutionizing the way we interact with machines. By leveraging the power of AI and machine learning, ChatGPT is able to understand, interpret, and respond to natural language queries with accuracy and nuance. As the technology continues to evolve, we can expect to see more advanced and sophisticated chatbots emerge, making our lives easier, more efficient, and more enjoyable.</div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Program Dependence Graph (PDG)]]></title>
            <link>https://rroscha.vercel.app//article/71f248ac-bfac-4f96-8618-ce674db1df2f</link>
            <guid>71f248ac-bfac-4f96-8618-ce674db1df2f</guid>
            <pubDate>Mon, 27 Feb 2023 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="container" class="max-w-5xl font-medium mx-auto undefined"><main class="notion light-mode notion-page notion-block-71f248acbfac4f968618ce674db1df2f"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-a08afe63d1ed4f7fa07f4bf14bfec959" data-id="a08afe63d1ed4f7fa07f4bf14bfec959"><span><div id="a08afe63d1ed4f7fa07f4bf14bfec959" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a08afe63d1ed4f7fa07f4bf14bfec959" title="Introduction"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Introduction</span></span></h2><div class="notion-text notion-block-0aea6411edfc4d7688c7008e5e806198">A Program Dependence Graph (PDG) is a representation of the dependencies between various statements in a program. It can be used to analyze the behavior of a program and identify potential optimizations or bugs. The nodes in a PDG represent statements in the program, and edges represent dependencies between the statements. A dependency can be either a data dependency or a control dependency. Data dependence graphs have provided some optimizing compilers with an explicit representation of the definition-use relationships implicitly present in a source program. A control flow graph has been the usual representation for the control flow relationships of a program; the control conditions on which an operation depends can be derived from such a graph. An undesirable property of a control flow graph, however, is a fixed sequencing of operations that need not hold. </div><div class="notion-text notion-block-85da99d0cda54e9cb0919cac91bc76bd"><b>Informal definition: </b>The program dependence graph explicitly represents both the essential data relationships, as present in the data dependence graph, and the essential control relationships, without the unnecessary sequencing present in the control flow graph. These dependence relationships determine the necessary sequencing between operations, exposing potential parallelism.</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-dae3cf6ce08c42fc88e95bd244045e7b" data-id="dae3cf6ce08c42fc88e95bd244045e7b"><span><div id="dae3cf6ce08c42fc88e95bd244045e7b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#dae3cf6ce08c42fc88e95bd244045e7b" title="Terminology"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Terminology</span></span></h2><div class="notion-text notion-block-15763e48c06e468292428df0005e6f79">A directed graph G = (N, E) is a finite set of nodes N together with a set E of ordered pairs of nodes called edges. If (n, m) is an edge, then n is a predecessor of m and m is a successor of n.</div><div class="notion-text notion-block-325d57cc760a429581ab3214f3f4819c">A graph G&#x27; = (N&#x27;, E&#x27;) is a subgraph of G if N&#x27; is contained in N and E&#x27; is contained in E.</div><div class="notion-text notion-block-18d99314e5324b4f92c83b8a61d3e317">A path from n to m in G is a finite sequence of nodes <code class="notion-inline-code"><b>u = n, u1, u2, ..., uk = m</b></code> such that <code class="notion-inline-code"><b>(n, u1), (u1, u2), ..., (uk-1, m)</b></code> are edges in E.</div><div class="notion-text notion-block-beb8a511109f4e0688a26293c1d27e4a">The reverse graph of a graph G = (N, E) is a graph (N, E&#x27;), where E&#x27; consists of edges <code class="notion-inline-code"><b>(n, m)</b></code> such that <code class="notion-inline-code"><b>(m, n)</b></code> is in E.</div><div class="notion-text notion-block-3dc82a22e1c14370b1915818d9f29875">A strongly connected region of a graph G is a subgraph of G in which there is a path from every node to every other node.</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2ce296184aa44685b8285c248816225d"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3.us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F69d5e6ab-0756-48ce-908f-15db49cdc904%2FUntitled.png%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3DAKIAT73L2G45EIPT3X45%252F20230228%252Fus-west-2%252Fs3%252Faws4_request%26X-Amz-Date%3D20230228T103557Z%26X-Amz-Expires%3D86400%26X-Amz-Signature%3D73a347aa8cdac43fecab31fa2c2304fe4610f7c6c64aa6c5be2cc3ae9f27d336%26X-Amz-SignedHeaders%3Dhost%26x-id%3DGetObject?table=block&amp;id=2ce29618-4aa4-4685-b828-5c248816225d" alt="notion image" loading="lazy" decoding="async"/></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3f7b4ff2a40f4bdc8b6905536b2a6512" data-id="3f7b4ff2a40f4bdc8b6905536b2a6512"><span><div id="3f7b4ff2a40f4bdc8b6905536b2a6512" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3f7b4ff2a40f4bdc8b6905536b2a6512" title="Program Dependence Graph"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Program Dependence Graph</span></span></h2><div class="notion-text notion-block-f466de545cc14460ae9839b32f085d95">The Program Dependence Graph (PDG) is a graph-based representation of a computer program that captures the dependencies among program statements and data values. In a PDG, the program is represented as a graph, with each node in the graph representing a statement or a predicate expression (or operators and operands) in the program. The edges in the graph are used to represent the dependencies between these nodes.<div class="notion-text-children"><ul class="notion-list notion-list-disc notion-block-f859586ba518440985ad51782fd001fd"><li>A predicate expression usually contains one or more boolean operators (such as AND, OR, NOT), comparison operators (such as ==, &gt;, &lt;, &gt;=, &lt;=), or logical expressions (such as if-then-else statements). The result of evaluating a predicate expression is a boolean value, either true or false. Predicate expressions are often used in programming languages to control the flow of execution in programs. For example, in an <code class="notion-inline-code"><b>if</b></code><b> </b>statement, the condition is a predicate expression that determines whether or not the code inside the <code class="notion-inline-code"><b>if</b></code> block should be executed. Predicate expressions are also used in loops, switch statements, and other control structures to determine when and how many times to execute certain code blocks.</li></ul><ul class="notion-list notion-list-disc notion-block-14f2f94d43d74c4dbf8fc6cd0e5e5695"><li>In mathematics, a predicate is either a <em>relation or the boolean-valued function</em> that amounts to the characteristic function or the indicator function of such a relation.</li><ul class="notion-list notion-list-disc notion-block-14f2f94d43d74c4dbf8fc6cd0e5e5695"><div class="notion-text notion-block-563477f5a24f49b296c4a17b68a70fd5">A function P: X→ {true, false} is called a predicate on X. When P is a predicate on X, we sometimes say P is a property of X.</div></ul></ul><ul class="notion-list notion-list-disc notion-block-02846c1904fe4e1498bcaaa053ef875a"><li>For instance, in the sentence, &quot;Mike is eating&quot;, we have the subject, &#x27;Mike&#x27;, and the predicate, &#x27;is eating&#x27;. In the context of computer science, we aren&#x27;t interested in stating a fact, but rather, in testing a true/false condition for the purpose of deciding whether to do something.</li><ul class="notion-list notion-list-disc notion-block-02846c1904fe4e1498bcaaa053ef875a"><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-cpp">Person mike;

if (!mike.isEating())
    feedPerson(mike);</code></pre><div class="notion-text notion-block-a3b84eaeef4a42a5815c24da6f157f0d">The <code class="notion-inline-code">isEating()</code> member of <code class="notion-inline-code">mike</code> (an instance of <code class="notion-inline-code">Person</code>) is a predicate. It returns <code class="notion-inline-code">true</code> or <code class="notion-inline-code">false</code> for the assertion that the <code class="notion-inline-code">person</code> (<code class="notion-inline-code">mike</code> in this case) is eating. The predicate is being used to decide whether or not to feed the person.</div></ul></ul></div></div><div class="notion-text notion-block-648f7f72440d4f05be607f812ef41e0e">The edges in the PDG represent both data and control dependencies. Data dependencies indicate that a node depends on the value produced by another node in the program. For example, if statement <code class="notion-inline-code"><b>S1</b></code> reads a variable <code class="notion-inline-code"><b>x</b></code> and statement <code class="notion-inline-code"><b>S2</b></code> writes to <code class="notion-inline-code"><b>x</b></code>, there is a data dependency from <code class="notion-inline-code"><b>S2</b></code> to <code class="notion-inline-code"><b>S1</b></code>. Control dependencies, on the other hand, indicate that the execution of a node depends on the outcome of another node&#x27;s execution. For example, if statement <code class="notion-inline-code"><b>S1</b></code> is an <code class="notion-inline-code"><b>if</b></code> statement and statement <code class="notion-inline-code"><b>S2</b></code> is inside the <code class="notion-inline-code"><b>if</b></code> block, there is a control dependency from <code class="notion-inline-code"><b>S1</b></code> to <code class="notion-inline-code"><b>S2</b></code>.</div><div class="notion-text notion-block-256c9cb007aa4756919be5c2aa3dd383">The set of all dependences for a program may be viewed as inducing a partial ordering on the statements and predicates in the program that must be followed to preserve the semantics of the original program.</div><div class="notion-text notion-block-b81414b76d0041feab40166fe7e98cbe">Dependences arise as the result of two separate effects. </div><div class="notion-text notion-block-ab7e66cc9e7a420fbe4c3756fcf019c8">— First, a dependence exists between two statements whenever a variable appearing in one statement may have an incorrect value if the two statements are reversed. For example (data dependence), </div><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-cpp">x = 5
y = x + 3</code></pre><div class="notion-text notion-block-76845cbdac904f549981afbaf6ba7c6f">In this code, the second statement (<code class="notion-inline-code"><b>y = x + 3</b></code>) depends on the first statement (<code class="notion-inline-code"><b>x = 5</b></code>), because it uses the value of <code class="notion-inline-code"><b>x</b></code> to compute the value of <code class="notion-inline-code"><b>y</b></code>. If we were to reverse the order of the statements, like this:</div><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-cpp">y = x + 3
x = 5</code></pre><div class="notion-text notion-block-0209703831e54c4ea9aaf6bf1d145a58">Then the value of <code class="notion-inline-code"><b>y</b></code><b> </b>would be incorrect, because <code class="notion-inline-code"><b>x</b></code> would not yet have been assigned the value of <code class="notion-inline-code"><b>5 </b></code>when the second statement is executed. So in this case, the two statements are dependent on each other, and must be executed in the correct order for the program to work correctly.</div><div class="notion-text notion-block-2301928e0d104528a034503001be6837">— Second, a dependence exists between a statement and the predicate whose value immediately controls the execution of the statement (control dependence),</div><div class="notion-text notion-block-794bb5676cbb409eb91c5c709e598291">This means that if the value of the predicate changes, then the execution of the statement may also change.</div><div class="notion-text notion-block-f531fa084cb441e8ada193327b58eed5">For example, consider the following code:</div><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-cpp">if x &lt; 5:
    y = 2*x
else:
    y = x/2</code></pre><div class="notion-text notion-block-645dd6046bd044979ceba61b4d0e01d2">In this code, there is a dependence between the <code class="notion-inline-code"><b>if</b></code> statement and the predicate <code class="notion-inline-code"><b>x &lt; 5</b></code>. The value of the predicate controls which branch of the <code class="notion-inline-code"><b>if</b></code> statement is executed. If the value of <code class="notion-inline-code"><b>x</b></code> is less than 5, then the first branch (<code class="notion-inline-code"><b>y = 2*x</b></code>) is executed, and if it is greater than or equal to 5, then the second branch (<code class="notion-inline-code"><b>y = x/2</b></code>) is executed.</div><div class="notion-text notion-block-db385f5de53d4944a9ea27e002141e71">So in this case, there is a dependence between the statement and the predicate that controls its execution. If the value of <code class="notion-inline-code"><b>x</b></code> changes, then the value of the predicate may also change, which in turn may cause the execution of the statement to change.</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-9510fd793a5748beb293007363277d49" data-id="9510fd793a5748beb293007363277d49"><span><div id="9510fd793a5748beb293007363277d49" class="notion-header-anchor"></div><a class="notion-hash-link" href="#9510fd793a5748beb293007363277d49" title="Control Dependence"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Control Dependence</span></span></h3><div class="notion-text notion-block-12b6aed8d5f14bc6a77ecc905ba7a28d"><b>Methodology:</b> CFG → CDG (Control Dependence Graph)</div><div class="notion-text notion-block-1254874a79564ad6bb1aac39ab1b775d"><b>Def.</b> A node V is post-dominated by a node W in G if every directed path from V to STOP (not including V) contains W.<div class="notion-text-children"><ul class="notion-list notion-list-disc notion-block-1487cfb135fb448a983980bc13c970ab"><li>In a directed graph G, &quot;post-dominance&quot; refers to a relationship between nodes where one node (W) &quot;post-dominates&quot; another node (V) if every directed path from V to the end of the program (called STOP) contains W, and W is not equal to V.</li><ul class="notion-list notion-list-disc notion-block-1487cfb135fb448a983980bc13c970ab"><div class="notion-text notion-block-e99bf86fac0f4ef18dd854a1be7906ef">In other words, if we start at node V and follow any path in the graph that doesn&#x27;t include V, we will eventually reach STOP, and at some point along that path, we will encounter node W. This means that node W has control over the execution of node V, because any path that leads to the end of the program must go through W.</div><div class="notion-text notion-block-9c0e9a25341e457d8ec5498aa505faca">Post-dominance is a useful concept in program analysis and optimization, as it can help identify parts of a program that are not affected by changes made in other parts of the program. For example, if a node W post-dominates a node V, we know that any change to the code in node V will not affect the behavior of the code in node W, because W will always be executed after V.</div></ul></ul></div></div><div class="notion-text notion-block-1a5c149ad9e34754b89e668924996e97"><b>Def.</b> Let G be a control flow graph. Let X and Y be nodes in G. Y is control dependent on X iff <span class="notion-inline-underscore">(1) there exists a directed path P from X to Y with any Z in P (excluding X and Y) post-dominated by Y</span> and <span class="notion-inline-underscore">(2) X is not post-dominated by Y</span>.</div><div class="notion-text notion-block-8c4251b92a6d408fbf82bd9da6b9ce29">If Y is control dependent on X then X must have two exits. Following one of the exits from X always results in Y being executed, while taking the other exit may result in Y not being executed.</div><div class="notion-text notion-block-9f11b5fad72c493bb5d56b4ba1b457f4">(1) → 1: There exists a directed path P from node X to node Y such that any node z in P (excluding X and Y) is post-dominated by node Y. In other words, any node along the path P, other than X and Y, is controlled by Y.</div><div class="notion-text notion-block-fa1048322159486ba0729f72c3c3e4ab">(2) → 2: Nothing I can tell.</div><div class="notion-text notion-block-5a60fdf0ca6c49ac972fda3c03e920c0">Condition 1 of the definition of control dependence can be satisfied by a path consisting of a single edge. This means that if there is a direct edge from node X to node Y in the control flow graph G, and no other nodes are between X and Y, then Y is control dependent on X.</div><div class="notion-text notion-block-3a37c8d3278e46cabc5b41e88ca3555e">Condition 2 of the definition is always satisfied when X and Y are the same node. This allows loops to be correctly accommodated by the definition, because a node can be control dependent on itself if it contains a loop.</div><div class="notion-text notion-block-b029d180843c4c3b83221f3359e75418">Note that the transitive closure of the definition corresponds to the notion of the range of a branch. <div class="notion-text-children"><ul class="notion-list notion-list-disc notion-block-44031aa67df048d9a857a7ac39710d14"><li>The range of the branch that starts at node x is the set of all nodes that can be reached from node x by following a path that satisfies the conditions of control dependence (direct case), namely that all nodes in the path (excluding the start and end nodes) are post-dominated by the end node y.</li></ul></div></div><div class="notion-text notion-block-30942eed4fd449afb8223bc1431991b4">When applied to a loop in the control flow graph, the definition of control dependence determines a <b>strongly connected region (SCR)</b> of control dependences, <b>whose nodes consist of predicates that determine an exit from the loop</b>. The <b><span class="notion-red">other nodes</span></b> in the control flow graph loop <span class="notion-red"><b>not in the SCR</b></span> of control dependences lie on <b><span class="notion-red">some path (one end of a </span></b><span class="notion-teal"><b>dependence</b></span> <b><span class="notion-red">edge)</span></b> of control dependence edges <span class="notion-purple"><b>from a node in the SCR</b></span>. (without the statement sequence in code, compared to CFG)</div><div class="notion-text notion-block-d36cfe381e494abcb27b76e4af964822">Example:</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-273330af018a455990d8282bcc0d4c33"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3.us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F1ac07af7-31b1-4996-9d80-493b6a093d7a%2FUntitled.png%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3DAKIAT73L2G45EIPT3X45%252F20230228%252Fus-west-2%252Fs3%252Faws4_request%26X-Amz-Date%3D20230228T103557Z%26X-Amz-Expires%3D86400%26X-Amz-Signature%3D8dd4f4fc9f73220f61b0978012aa0114cfa50c130ff793151c371a8af4d143cc%26X-Amz-SignedHeaders%3Dhost%26x-id%3DGetObject?table=block&amp;id=273330af-018a-4559-90d8-282bcc0d4c33" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-40bcfa1822eb4b91bb4508d342e0adb2">Where <em>Region Nodes R1</em> to <em>R6</em> are used to explicitly show the control dependences for auxiliary understanding. So, you can remove them all (e.g., remove R3. Then we need to connect 1 to 3 and 1 to 6. 1 → 2 means 2 is control dependent on 1).</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-9de8ce3372064a0eb3bec6f1070e49c2" data-id="9de8ce3372064a0eb3bec6f1070e49c2"><span><div id="9de8ce3372064a0eb3bec6f1070e49c2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#9de8ce3372064a0eb3bec6f1070e49c2" title="Determining Control Dependence"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Determining Control Dependence</span></span></h4><div class="notion-text notion-block-832ddf2257e443018c3fb8dfcb3fc78d">TBD.</div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NLP-Related]]></title>
            <link>https://rroscha.vercel.app//article/18499f9e-64b9-44d2-815b-c519b87aeaa1</link>
            <guid>18499f9e-64b9-44d2-815b-c519b87aeaa1</guid>
            <pubDate>Sun, 19 Feb 2023 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="container" class="max-w-5xl font-medium mx-auto undefined"><main class="notion light-mode notion-page notion-block-18499f9e64b944d2815bc519b87aeaa1"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-68e1bf1aa0c748bdb8c19e61904ffcc4" data-id="68e1bf1aa0c748bdb8c19e61904ffcc4"><span><div id="68e1bf1aa0c748bdb8c19e61904ffcc4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#68e1bf1aa0c748bdb8c19e61904ffcc4" title="Some NLP-related knowledge"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Some NLP-related knowledge</span></span></h2><ol start="1" class="notion-list notion-list-numbered notion-block-95c216f37f464ec8bbd384282e5bf7f4"><li><b><b>BPE Algorithm: </b></b></li><ol class="notion-list notion-list-numbered notion-block-95c216f37f464ec8bbd384282e5bf7f4"><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-5ce478ed934541648ef4fd810840a3bb" href="https://leimao.github.io/blog/Byte-Pair-Encoding/"><div><div class="notion-bookmark-title">Byte Pair Encoding</div><div class="notion-bookmark-description">Common Tokenization Method for Natural Language Processing</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://leimao.github.io/images/favicon/android-chrome-512x512.png" alt="Byte Pair Encoding" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://leimao.github.io/blog/Byte-Pair-Encoding/</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://leimao.github.io/images/favicon/android-chrome-512x512.png" alt="Byte Pair Encoding" loading="lazy" decoding="async"/></div></a></div></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3cda83883ee84a2fb9d650c4d744fcdd"><li>…</li></ol><div class="notion-blank notion-block-70eac6b0c53f4f08b132640a1295c305"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Malware-Related]]></title>
            <link>https://rroscha.vercel.app//article/29b948fd-bedc-471b-a418-db00ea31ea36</link>
            <guid>29b948fd-bedc-471b-a418-db00ea31ea36</guid>
            <pubDate>Tue, 06 Dec 2022 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="container" class="max-w-5xl font-medium mx-auto undefined"><main class="notion light-mode notion-page notion-block-29b948fdbedc471ba418db00ea31ea36"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3a3dc86ce3764d448a438c653294a469" data-id="3a3dc86ce3764d448a438c653294a469"><span><div id="3a3dc86ce3764d448a438c653294a469" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3a3dc86ce3764d448a438c653294a469" title="Android Malware Detection Notes"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Android Malware Detection Notes</span></span></h2><ol start="1" class="notion-list notion-list-numbered notion-block-65e588ccd1d74537babc9e012c87e33d"><li>Android covert malware: In particular, a malicious sample is considered as a covert malware must meet the following two conditions: 1) Nodes in the malicious part occupy a small part (e.g., 2%) of all nodes in the entire call graph; and 2) The normal part and the malicious part are highly correlated. </li><ol class="notion-list notion-list-numbered notion-block-65e588ccd1d74537babc9e012c87e33d"><blockquote class="notion-quote notion-block-d8a37663b6d64cb99d32bc5e2a4d7cac"><div>Wu, Y., Zou, D., Yang, W., Li, X., &amp; Jin, H. (2021, July). HomDroid: detecting Android covert malware by social-network homophily analysis. In <em>Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis </em>(pp. 216-229).</div></blockquote></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-6fe3eb16a4d04823bc1d4e5d73860336"></ol></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mini Review for MalScan]]></title>
            <link>https://rroscha.vercel.app//article/0692176c-2f85-43f2-99a1-2f247908e349</link>
            <guid>0692176c-2f85-43f2-99a1-2f247908e349</guid>
            <pubDate>Mon, 24 Oct 2022 00:00:00 GMT</pubDate>
            <description><![CDATA[Summary of MalScan]]></description>
            <content:encoded><![CDATA[<div id="container" class="max-w-5xl font-medium mx-auto undefined"><main class="notion light-mode notion-page notion-block-0692176c2f8543f299a12f247908e349"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-a880c7ce7a614120a9ac98cdcdb0b933" data-id="a880c7ce7a614120a9ac98cdcdb0b933"><span><div id="a880c7ce7a614120a9ac98cdcdb0b933" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a880c7ce7a614120a9ac98cdcdb0b933" title="Mini Review over “MalScan: Fast market-wide mobile malware scanning by social-network centrality analysis”"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Mini Review over “MalScan: Fast market-wide mobile malware scanning by social-network centrality analysis”</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-d7eeaf8641e546a98b5961a623515f87" data-id="d7eeaf8641e546a98b5961a623515f87"><span><div id="d7eeaf8641e546a98b5961a623515f87" class="notion-header-anchor"></div><a class="notion-hash-link" href="#d7eeaf8641e546a98b5961a623515f87" title="I Research Introduction"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">I Research Introduction</span></span></h3><div class="notion-text notion-block-51bbe4f01a444969a0399dd55542869c">Android devices and Android application grow explosively in several Android markets, so as to Android malware. Millions of apps have been installed by end users all around the world from various app markets (Google Play, AppChina and so on). Due to the limitation of current scanning process, more and more malware has appeared in these markets. Thus, stopping the spread of malware mainly depends on new automatically scanning process (new lightweight Android Malware Detection) for these app markets. Therefore, the new scanning method must be able to adapt the explosive growth of Android application and provide high enough detection performance for avoiding or alleviating the first escaping of Android malware.</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-b18a818e1d43441392493a52198a8393" data-id="b18a818e1d43441392493a52198a8393"><span><div id="b18a818e1d43441392493a52198a8393" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b18a818e1d43441392493a52198a8393" title="II SOTA"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">II SOTA</span></span></h3><div class="notion-text notion-block-6fec5e0e2abb49cebafac736ca8fe858">DL-based detection has gradually become the most effective detection methods due to that there is a large amount of data available, but its high time consumption causes it difficult to be deployed on for Android markets scanning. Although ML-based detection methods have less detection performance than DL-based methods, effective behavior modeling is able to alleviate the performance gap between ML-based methods and DL-based methods. Existing app malware detection methods extract static program features for behavior modeling, including android components, stings, permissions, APIs, graphs and so on. Where graph-based methods are considered as the most effective since graphs contain program semantics. Moreover, further extracting the attributes in graphs for modeling app behaviors is efficient and effective for next step of malware detection.</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-10285c05719c40a486e3464b0fdc8c3d" data-id="10285c05719c40a486e3464b0fdc8c3d"><span><div id="10285c05719c40a486e3464b0fdc8c3d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#10285c05719c40a486e3464b0fdc8c3d" title="III Methodology"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">III Methodology</span></span></h3><div class="notion-text notion-block-e9c9c8a78c9f42018f4a920983fb0382">To address the mentioned above problem, this paper proposes a new method, based on call graph, called MalSan. MalScan leverages app call graph. Each node in call graph is a method and each directed edge represents call relationship. MalScan utilizes five kinds of centralities of sensitive API methods for constructing app feature vector respectively, representing app behaviors. Then use machine learning model techniques for training detection or classification model, for example, 1-Nearest Neighbor, 3-Nearest Neighbor, Random Forest, and so on. The basic idea of MalScan is impressive, since the process of extracting features captures both local and global semantic information.
    The result shows that MalScan outperforms than other graph-based methods. Facing apps in different time periods (training and testing use the same period apps), MalScan achieves every accuracy higher than 95% with all centralities. In the scenario of Android app evolution and adversarial attack, MalScan performs good robustness against these two cases. Moreover, MalScan is about 200 times faster than the SOTA method, which makes it able to complete the task of fast scanning app markets.</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-87727c3ff7d34352bd95a174a8bfccfd" data-id="87727c3ff7d34352bd95a174a8bfccfd"><span><div id="87727c3ff7d34352bd95a174a8bfccfd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#87727c3ff7d34352bd95a174a8bfccfd" title="IV Conclusion"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">IV Conclusion</span></span></h3><div class="notion-text notion-block-9910bad6e43c4288b47028ee30081626">MalScan is a lightweight Android malware detection method based on call graph, extracting centralities of sensitive API methods. It achieves high detection performance and robustness. Moreover, its runtime overhead is quite low than other SOTA methods. Due to extracting information from call graph, MalScan is liable to suffer from structural attack, which modifying the call relationship between methods. One way to alleviate this kind of attack is to append some adversarial samples into training set for retraining detection model. Another method is enhancing API representation, combining function related API methods together to generalize semantic information. These two methods are able to alleviate the escaping of adversarial samples generated by structural attack, but still cannot counter the attack.</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-cfa79bb7a2ea42dda25666289e9f89a7" data-id="cfa79bb7a2ea42dda25666289e9f89a7"><span><div id="cfa79bb7a2ea42dda25666289e9f89a7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#cfa79bb7a2ea42dda25666289e9f89a7" title="Reference"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Reference</span></span></h3><ol start="1" class="notion-list notion-list-numbered notion-block-4f756ebe6ff74ffeb93dab12835ff257"><li>Yueming Wu, Xiaodi Li, Deqing Zou, Wei Yang, Xin Zhang, &amp; Hai Jin (2019). MalScan: Fast market-wide mobile malware scanning by social-network centrality analysis Automated software engineering.</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-0c3d6a35e6ad43819ffffeb77ccc2b95"><li>Enrico Mariconti, Lucky Onwuzurike, Panagiotis Andriotis, Emiliano De Cristofaro, Gordon J. Ross, &amp; Gianluca Stringhini (2016). MaMaDroid: Detecting Android Malware by Building Markov Chains of Behavioral Models network and distributed system security symposium.</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2fc0c5c0aba54127a72dba258dfd3bb8"><li>Kaifa Zhao, Hao Zhou, Yulin Zhu, Xian Zhan, Kai Zhou, Jianfeng Li, Le Yu, Wei Yuan, &amp; Xiapu Luo (2021). Structural Attack against Graph Based Android Malware Detection computer and communications security.</li></ol><div class="notion-blank notion-block-cc36de583ba542838db29b6fa6806ec8"> </div></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>