19 research outputs found
Orbit of a point in Dynamical Systems
In this paper, we have proved the necessary and sufficient condition for a weakly mixing and topologically mixing function. Some properties of the monoid, periodic points and eventually periodic points are obtained. Some relations between weakly mixing, transitive and topologically mixing functions are obtained. Some results of considerable importance about the orbit of a point and relation with eventually periodic point are proved. Some results of the set theory that play an important role in our studies are included. Some new terms like singly transitive and lately transitive are introduced
Enabling Memory Safety of C Programs using LLMs
Memory safety violations in low-level code, written in languages like C,
continues to remain one of the major sources of software vulnerabilities. One
method of removing such violations by construction is to port C code to a safe
C dialect. Such dialects rely on programmer-supplied annotations to guarantee
safety with minimal runtime overhead. This porting, however, is a manual
process that imposes significant burden on the programmer and, hence, there has
been limited adoption of this technique.
The task of porting not only requires inferring annotations, but may also
need refactoring/rewriting of the code to make it amenable to such annotations.
In this paper, we use Large Language Models (LLMs) towards addressing both
these concerns. We show how to harness LLM capabilities to do complex code
reasoning as well as rewriting of large codebases. We also present a novel
framework for whole-program transformations that leverages lightweight static
analysis to break the transformation into smaller steps that can be carried out
effectively by an LLM. We implement our ideas in a tool called MSA that targets
the CheckedC dialect. We evaluate MSA on several micro-benchmarks, as well as
real-world code ranging up to 20K lines of code. We showcase superior
performance compared to a vanilla LLM baseline, as well as demonstrate
improvement over a state-of-the-art symbolic (non-LLM) technique
Genomic aberrations in normal tissue adjacent to HER2-amplified breast cancers: field cancerization or contaminating tumor cells?
Field cancerization effects as well as isolated tumor cell foci extending well beyond the invasive tumor margin have been described previously to account for local recurrence rates following breast conserving surgery despite adequate surgical margins and breast radiotherapy. To look for evidence of possible tumor cell contamination or field cancerization by genetic effects, a pilot study (Study 1: 12 sample pairs) followed by a verification study (Study 2: 20 sample pairs) were performed on DNA extracted from HER2-positive breast tumors and matching normal adjacent mammary tissue samples excised 1-3 cm beyond the invasive tumor margin. High-resolution molecular inversion probe (MIP) arrays were used to compare genomic copy number variations, including increased HER2 gene copies, between the paired samples; as well, a detailed histologic and immunohistochemical (IHC) re-evaluation of all Study 2 samples was performed blinded to the genomic results to characterize the adjacent normal tissue composition bracketing the DNA-extracted samples. Overall, 14/32 (44 %) sample pairs from both studies produced genome-wide evidence of genetic aberrations including HER2 copy number gains within the adjacent normal tissue samples. The observed single-parental origin of monoallelic HER2 amplicon haplotypes shared by informative tumor-normal pairs, as well as commonly gained loci elsewhere on 17q, suggested the presence of contaminating tumor cells in the genomically aberrant normal samples. Histologic and IHC analyses identified occult 25-200 Ī¼m tumor cell clusters overexpressing HER2 scattered in more than half, but not all, of the genomically aberrant normal samples re-evaluated, but in none of the genomically normal samples. These genomic and microscopic findings support the conclusion that tumor cell contamination rather than genetic field cancerization represents the likeliest cause of local clinical recurrence rates following breast conserving surgery, and mandate caution in assuming the genomic normalcy of histologically benign appearing peritumor breast tissue
Reliable State Machines: A Framework for Programming Reliable Cloud Services
Building reliable applications for the cloud is challenging because of unpredictable failures during a program\u27s execution. This paper presents a programming framework, called Reliable State Machines (RSMs), that offers fault-tolerance by construction. In our framework, an application comprises several (possibly distributed) RSMs that communicate with each other via messages, much in the style of actor-based programming. Each RSM is fault-tolerant by design, thereby offering the illusion of being "always-alive". An RSM is guaranteed to process each input request exactly once, as one would expect in a failure-free environment. The RSM runtime automatically takes care of persisting state and rehydrating it on a failover. We present the core syntax and semantics of RSMs, along with a formal proof of failure-transparency. We provide a .NET implementation of the RSM framework for deploying services to Microsoft Azure. We carry out an extensive performance evaluation on micro-benchmarks to show that one can build high-throughput applications with RSMs. We also present a case study where we rewrite a significant part of a production cloud service using RSMs. The resulting service has simpler code and exhibits production-grade performance
Ranking LLM-Generated Loop Invariants for Program Verification
Synthesizing inductive loop invariants is fundamental to automating program
verification. In this work, we observe that Large Language Models (such as
gpt-3.5 or gpt-4) are capable of synthesizing loop invariants for a class of
programs in a 0-shot setting, yet require several samples to generate the
correct invariants. This can lead to a large number of calls to a program
verifier to establish an invariant. To address this issue, we propose a {\it
re-ranking} approach for the generated results of LLMs. We have designed a
ranker that can distinguish between correct inductive invariants and incorrect
attempts based on the problem definition. The ranker is optimized as a
contrastive ranker. Experimental results demonstrate that this re-ranking
mechanism significantly improves the ranking of correct invariants among the
generated candidates, leading to a notable reduction in the number of calls to
a verifier.Comment: Findings of The 2023 Conference on Empirical Methods in Natural
Language Processing (EMNLP-findings 2023
Finding Inductive Loop Invariants using Large Language Models
Loop invariants are fundamental to reasoning about programs with loops. They
establish properties about a given loop's behavior. When they additionally are
inductive, they become useful for the task of formal verification that seeks to
establish strong mathematical guarantees about program's runtime behavior. The
inductiveness ensures that the invariants can be checked locally without
consulting the entire program, thus are indispensable artifacts in a formal
proof of correctness. Finding inductive loop invariants is an undecidable
problem, and despite a long history of research towards practical solutions, it
remains far from a solved problem. This paper investigates the capabilities of
the Large Language Models (LLMs) in offering a new solution towards this old,
yet important problem. To that end, we first curate a dataset of verification
problems on programs with loops. Next, we design a prompt for exploiting LLMs,
obtaining inductive loop invariants, that are checked for correctness using
sound symbolic tools. Finally, we explore the effectiveness of using an
efficient combination of a symbolic tool and an LLM on our dataset and compare
it against a purely symbolic baseline. Our results demonstrate that LLMs can
help improve the state-of-the-art in automated program verification
Celestial: A Smart Contracts Verification Framework
We present CELESTIAL, a framework for formally
verifying smart contracts written in the Solidity language for
the Ethereum blockchain. CELESTIAL allows programmers to
write expressive functional specifications for their contracts. It
translates the contracts and the specifications to Fā to formally
verify, against an Fā model of the blockchain semantics, that
the contracts meet their specifications. Once the verification
succeeds, CELESTIAL performs an erasure of the specifications to
generate Solidity code for execution on the Ethereum blockchain.
We use CELESTIAL to verify several real-world smart contracts
from different application domains. Our experience shows that
CELESTIAL is a valuable tool for writing high-assurance smart
contracts.21331421