Update introductions for feedback

This commit is contained in:
Felicity Chapman
2020-03-02 14:50:52 +00:00
parent 96f37c910b
commit 7a2bb120ec
5 changed files with 9 additions and 9 deletions

View File

@@ -1,7 +1,10 @@
Analyzing control flow in Python
================================
You can write CodeQL queries to explore the control flow graph of a Python program, for example, to discover unreachable code or mutually exclusive blocks of code.
You can write CodeQL queries to explore the control-flow graph of a Python program, for example, to discover unreachable code or mutually exclusive blocks of code.
About analyzing control flow
--------------------------------------
To analyze the control-flow graph of a ``Scope`` we can use the two CodeQL classes ``ControlFlowNode`` and ``BasicBlock``. These classes allow you to ask such questions as "can you reach point A from point B?" or "Is it possible to reach point B *without* going through point A?". To report results we use the class ``AstNode``, which represents a syntactic element and corresponds to the source code - allowing the results of the query to be more easily understood. For more information, see `Control-flow graph <http://en.wikipedia.org/wiki/Control_flow_graph>`__ on Wikipedia.

View File

@@ -1,7 +1,7 @@
Functions in Python
===================
Functions are key building blocks of Python code bases. You can use syntactic classes from the standard CodeQL library to find functions and identify calls to them.
You can use syntactic classes from the standard CodeQL library to find Python functions and identify calls to them.
These examples use the standard CodeQL class `Function <https://help.semmle.com/qldoc/python/semmle/python/Function.qll/type.Function$Function.html>`__. For more information, see ":doc:`Introducing the Python libraries <introduce-libraries-python>`."

View File

@@ -1,12 +1,12 @@
CodeQL library for Python
=========================
This is an overview of the extensive library you use to analyze databases generated from Python code bases. Using this library makes it easier for you to write queries.
When you need to analyze a Python program, you can make use of the large collection of classes in the Python library for CodeQL.
About the CodeQL library for Python
-----------------------------------
The CodeQL library for each programming language uses classes with abstractions and predicates to present data in an object-oriented form.
The CodeQL library for each programming language uses classes with abstractions and predicates to present data in an object-oriented form.
Each CodeQL library is implemented as a set of QL modules, that is, files with the extension ``.qll``. The module ``python.qll`` imports all the core Python library modules, so you can include the complete library by beginning your query with:

View File

@@ -1,10 +1,7 @@
Pointer analysis and type inference in Python
=============================================
At runtime, each Python expression has a value with an associated type. You can learn how an expression behaves at runtime using type-inference classes from the standard CodeQL library.
This topic contains worked examples of how to write queries using the standard CodeQL library classes for Python type inference.
At runtime, each Python expression has a value with an associated type. You can learn how an expression behaves at runtime by using type-inference classes from the standard CodeQL library.
The ``Value`` class
--------------------

View File

@@ -1,7 +1,7 @@
Expressions and statements in Python
====================================
Expressions define a value. Statements represent a command or action. You can explore how they are used in a code base using syntactic classes from the standard CodeQL library.
You can use syntactic classes from the CodeQL library to explore how Python expressions and statements are used in a code base.
Statements
----------