G06F8/437

Language interoperability to automate code analysis

Language interoperability between source code programs not compatible with an interprocedural static code analyzer is achieved through language-independent representations of the programs. The source code programs are transformed into respective intermediate language instructions from which a language-independent control flow graph and a language-independent type environment is created. A program compatible with the interprocedural static code analyzer is generated from the language-independent control flow graph and the language-independent type environment in order to utilize the interprocedural static code analyzer to detect memory safety faults.

REDUCING COMPILER TYPE CHECK COSTS THROUGH THREAD SPECULATION AND HARDWARE TRANSACTIONAL MEMORY
20220326921 · 2022-10-13 ·

Systems, apparatuses and methods may provide for technology that generates a first compiler output based on input code that includes dynamically typed variable information and generates a second compiler output based on the input code, wherein the second compiler output includes type check code to verify one or more type inferences associated with the first compiler output. The technology may also execute the first compiler output and the second compiler output in parallel via different threads.

METHOD FOR IMPLEMENTING COMPILED EMBEDDED PYTHON
20230075927 · 2023-03-09 ·

Provided is a method for implementing compiled embedded Python. The method comprises: traversing an abstract syntax tree of Python source code to obtain semantic information about a program and generating corresponding C++ code according to said semantic information (S1); performing type annotation of the Python source code and thus generating C++ variable definitions and function definitions (S2); using a translator to translate into C++ source files the Python source code processed in the steps described above (S3); storing said C++ source files together with embedded chip-related files to form a file package, and compiling and linking said file package and generating an ASCII text file (S4). The method implements a source code translator on the basis of type annotations and static analysis, and integrates the translator into an embedded platform, enabling the editing, compiling, linking, and programming of Python source files.

DATA FLOW RETYPING FOR FUNCTIONAL PROGRAMMING LANGUAGES
20230105235 · 2023-04-06 · ·

The type system of a functional programming language, such as DataWeave and/or the like, may be extended to add valuable semantic information to data types (e.g., attributes of data that inform a compiler/interpreter how the data should be used, etc.) that is automatically generated and/or hidden from a developer/programmer. For example, the type system may be configured for flow typing, based on a graph of type dependencies between expressions, without modifying an existing implementation, except at places where extra information can be obtained. Different parts of the type system implementation may be modified, for example, based on one or more injected retyper nodes, to provide more and better type inference.

Function summarization via type inference
11620119 · 2023-04-04 · ·

A system and method for function summarization. In some embodiments, the method includes: identifying a basic function called by a first function, the first function having a signature; determining a first type, the first type being a type of an argument of the basic function or a type of a return value of the basic function; and propagating the first type, to determine a first portion of the signature of the first function.

SYSTEMS AND METHODS FOR HANDLING MACRO COMPATIBILITY FOR DOCUMENTS AT A STORAGE SYSTEM

A document to be stored on a network-based storage system is identified. The document includes one or more macros in a first programming language. An object referenced by a function defined by a macro of the one or more macros is identified. The function is converted into one or more sets of operations represented in a second programming language. Each set of operations corresponds to one of one or more candidate object types associated with the object. At least one of the one or more sets of operations is to be performed with respect to the object responsive to indication of a corresponding candidate object type for the object during execution of the macro. The document including the one or more sets of operations represented in the second programming language is stored on the network-based storage system.

Dynamically-imposed field and method type restrictions for managed execution environments

A data structure (e.g., field, method parameter, or method return value) is defined by a descriptor to be of a particular type, which imposes a first set of restrictions on values assumable by the data structure. Separately, the data structure is associated with a type restriction that defines a second set of restrictions that further restricts the values assumable by the data structure. The descriptor and type restriction are encoded separately in a program binary. Responsive to identifying a value for the data structure that (a) is not forbidden by the first set of restrictions defined the descriptor and (b) is forbidden by the second set of restrictions defined by the type restriction, a runtime environment may perform a restrictive operation, such as: blocking storage of the value to a field; blocking passing of the value to a method parameter; or blocking return of the value from a method.

Method, apparatus, and computer program for specializing serializer

To provide a method, apparatus, and computer program for performing type inference of serialization for each generation site and specializing a serializer for each generation site. A type of serialization is inferred for each generation site of compiling a query, and a serializer is specialized for each generation site based on the inferred type and a type that is actually used. A data value is serialized using the specialized serializer for each generation site. The inference is executed while transcribing identification information assigned to each generation site to a type as an annotation, and the inferred type and the type used in serialization are recursively compared.

Method and device of protecting a first software application to generate a protected software application

Protection of a first software application to be executed on an execution platform by adding at least one check module to the software application, wherein the check module, when being executed, checks at least a part of the code of the protected software application loaded in the memory and carries out a predefined tamper response in case the check module detects that the checked code was changed or ensures that the protected software application continues to function correctly in case the check module detects that the checked code was not changed; selecting a first code region of the first software application, said first code region provides a first functionality when being executed; amending the selected first code region of the first software application such that an amended first code region is generated to provide the protected software application; wherein the amended first code region, when being executed, still provides the first functionality but carries out an access to at least a part of the code of a protected software application loaded in the memory for providing the first functionality.

Implementing optional specialization when executing code

A compiler is capable of compiling instructions that do or do not supply specialization information for a generic type. The generic type is compiled into an unspecialized type. If specialization information was supplied, the unspecialized type is adorned with information indicating type restrictions for application programming interface (API) points associated with the unspecialized type, which becomes a specialized type. A runtime environment is capable of executing calls to a same API point that do or do not indicate a specialized type, and is capable of executing calls to a same API point of objects of an unspecialized type or of objects of a specialized type. When the call to an API point indicates a specialized type, and the specialized type matches that of the object (if the API point belongs to an object), then a runtime environment may perform optimized accesses based on type restrictions derived from the specialized type.