Skip to Content

Internships, PhDs and PostDocs

Regional Logic

Kind: 
Ph.D.
Supervisor: 
Jean-Pierre Jouannaud, Bow-Yaw Wang
Location: 
Tsinghua University, FIT building, room 3-603
Background: 

A Master in Computer Science, with specialisation in formal methods

Expertise: 

OCaml and Coq programming

Bibliography: 
  • A. Banerjee, D. A. Naumann, and S. Rosenberg, "Regional logic for local reasoning about global invariants," in ECOOP '08: Proceedings of the 22nd European conference on Object-Oriented Programming. Berlin, Heidelberg: Springer-Verlag, 2008, pp. 387-411. [Online]. Available: http://dx.doi.org/10.1007/978-3-540-70592-5_17
Proving non-functional code correct requires in particular a memory model in which pointers, aliasing, etc can be expressed and an assertion language in which to express properties of a given code with respect to the memory model. Separation logic is such a assertion language which is widely used for that purpose, for example in the FRAMA-C environment dedicated at the proof of C programs. Regional Logic is a recent improvent of separation logic which improves its expressivity, in particular with respect to modularity. The subject is to write a certified Caml code for deciding propositions in regional logic in order to be later integrated to the FRAMA-C environment for proving C-programs. It can be a PhD or part of a PhD depending on the time spent and the student's familiarity with the subject.

Certification of PLCs

Kind: 
Postdoc
Supervisor: 
Frederic Blanqui
Location: 
Tsinghua University, FORMES Project, FIT building, room 3-603
Background: 

PhD in Formal methods

Expertise: 

Expertise as a Coq programmer is required

Bibliography: 

Programmable Logic Controlers (PLCs) are embedded systems widely used in the industry. PLCs are usely specifyed using a language combining various high-level (possibly graphical) notations for automata, guards, timers, etc. Such languages used by engineers are IL and LD. There are others. The subject comes in two parts:

  1. Develop a certified compiler from a to-be-well-chosen notation for PLCs (named PLCN in the sequel) into CLight, for which there exists already a certified compiler to both ARM and PowerPC machine code. By composition, this will yield a certified compiler from PLCN to ARM or PowerPC code.

  2. Instrument PLCN with Hoare-like annotations that express the functional properties of a particular PLC, and compile these annotations from PLCN to CLight, so as to be able to carry out source code proofs for PLCN via the use of the FRAMA-C environment in which proofs of CLight programs can be carried out.

  3. Repeat the operation from the most popular industrial languages for PLCs (IL and LD -for ladder diagrams) to PLCN if necessary.

As a result, we shall obtain certified PLCs at the machine code level for both ARM and PowerPC.

Certified simulator engines for ARM and PowerPC

Kind: 
Ph.D.
Supervisor: 
Frederic Blanqui, Jean-Francois Monin, Vania Jolobof
Location: 
Tsinghua University, Formes Project, FIT building, 3-603
Background: 

Master in Computer Science, specialisation in Formal methods

Expertise: 

C, OCaml, Coq. A good knowledge of type theory and compilatio techniques would be appreciated.

Bibliography: 
  • The INRIA project COMPCERT: http://compcert.inria.fr/
  • A.C.J Fox. Formal specification and verification of ARM6. In David Basin and Burkhart Woff, editors, TPHOLs ’03, volume 2758 of LNCS, pages 25-40. Springer-Verlag, 2003.

A simulator for embedded systems is based on a kernel which implements the runtime of a model of the CPU (ARM, PowerPC or MIPS) on which the embedded system is built. Given a machine language program for the considered CPU, this runtime loads a data structure representing the instructions in the program, and execute them on the model of the CPU, each instruction being represented by a particular piece of code. C is probably the best language to express a CPU model both easily and efficiently. We are especialy interested in the simulation of ARM and PowerPC machine code. Our goal is to develop a simulator, SIMSOC, which kernel and CPU model are all certified in Coq for both ARM and PowerPC.

This project is quite innovative: no certified simulator exists on the market and we are not aware of any similar project. When completed, we shall have at our disposal a certified simulator for both ARM and PowerPC. For practical use, the kernel will have to be complemented with input outputs generating traces at run-time for the user executing a particular binary code on the simulator.

Given an abstract processor model, the simulator’s kernel is made of three main components: a reader-loader of the bit machine code described in the ELF standard; a decoder of each machine instruction; an engine made of a set of C functions interpreting the machine instructions w.r.t. the processor model. We shall assume an abstract processor model.

The reader-loader transforms the input string into a data structure representing the machine code stored in the memory model from some given location specified in the string. The reader-loader needs to decode each instruction present in the input string: PowerPC, MIPS. This task is achieved by the decoder. Decoding a sequence of bits representing an intruction of the machine language is actually a cascade of two switches in practice, the first identifying the instruction class, the second the particular instruction in the class. As a consequence, a Caml decoder can be generated from a description of the syntatic format of the instructions.

Task 1: write a certified Caml reader-loader.
Task 2: write a certified Caml decoder-generator taking as input a description of the machine instructions syntax.

The same idea can be used to generate the C code associated with each binary instruction. The instructions of the machine language are based on a few basic operations, and all instructions in a given class are very similar to each other. This should allow to generate these functions -at least most of them- by a CamL program taking as input an SOS description of the meaning of the instructions of the machine language.

Task 3: write a certified Caml engine generator taking as input an SOS description of the machine instructions semantics. This assumes an SOS based language to specify the meaning of ARM/PowerPC instruction machine instructions.

Certified concrete models for ARM and PowerPC

Kind: 
Ph.D.
Supervisor: 
Frederic Blanqui, Vania Joloboff, Jean-Francois Monin
Location: 
Tsinghua University, FORMES Project, FIT building, room 3-603
Background: 

Master in Computer Science, specialisation in Formal methods

Expertise: 

The C language. The OCaml language. The Coq proof assistant. Some knowledge of type theory and compilation techniques would be appreciated.

Bibliography: 
  • http://hal.inria.fr/lab/formes/
  • A.C.J Fox. Formal specification and verification of ARM6. In David Basin and Burkhart Wolff, editors, TPHOLs ’03, volume 2758 of LNCS, pages 25-40. Springer-Verlag, 2003.

A simulator for embedded systems is based on a kernel which implements the runtime of a model of the CPU (ARM, PowerPC or MIPS) on which the embedded system is built. Given a machine language program for the considered CPU, this runtime loads a data structure representing the instructions in the program, and execute them on the model of the CPU, each instruction being represented by a particular piece of code. C is probably the best language to express a CPU model both easily and efficiently. We are especialy interested in the simulation of ARM and PowerPC machine code. Our goal is to develop a simulator, SIMSOC, which kernel and CPU model are all certified in Coq for both ARM and PowerPC.

This project is quite innovative: no certified simulator exists on the market and we are not aware of any similar project. When completed, we shall have at our disposal a certified simulator for both ARM and PowerPC. For practical use, the kernel will have to be complemented with input outputs generating traces at run-time for the user executing a particular binary code on the simulator.

For each of ARM and PowerPC, we want both an abstract and a concrete C model, the concrete model being an implementation of the abstract model.

A processor model is made of a bunch of registers, a (duplicated) status register, a program counter, a stack pointer, and a memory with possibly a cache mechanism. An abstract processor model for ARM has been designed by a group in Cambridge, UK. The concrete C processor model we are interested in is that of SIMSOC, which exists for both ARM and PowerPC.

The tasks are:

  1. Starting from the Cambridg's abstract model for ARM, describe an abstract processor model for ARM fullfilling our needs.
  2. Show that the concrete SIMSOC model for ARM is a sound implementation of the abstract model for ARM.
  3. Describe an abstract processor model for PowerPC, and show that the concrete SIMSOC model for PowerPC is a sound implementation of the abstract model for PowerPC.

We shall assume the correctness of the instruction set (of ARM, PowerPC) implemented in C.

Network Protocol Design to drive networked simulations

Kind: 
Internship
Supervisor: 
Vania Joloboff
Location: 
Tsinghua University, FORMES Project, Beijing, China
Background: 

We have developed an embedded system simulator. This simulator requires powerful simulation machines whereas the users are running on off-the-shelf PCs. It is necessary for users to be able to start simulation sessions on remote machines, control these simulations, and receive their outputs, which can be large amount of data, on their PC, for further analysis.

Expertise: 
  • Network protocols, TCP/IP, network programming.
  • C++ or C programming with concurrent threads.

No background in computer simulation is required, but basic knowledge of computer architecture is a plus.

The goal of the internship is to design a network protocol for the communication between a graphical user interface running on a PC and a simulator running on a remote machine.

This network protocol must:

  • support bi-directional communications.
  • support multiplexing of control flows on the communication channel. It may be that the simulator has multiple components that can be controlled individually.
  • be evolutive such that future versions of the protocol can include new features while existing applications continue to run using the old version.

The student must first specify the protocol, as a TCP/IP based protocol, then implement it as a library in C or C++ (the student can choose). The library shall be tested with unit test programs to ensure proper function and check for potential regressions in the future.

The student will need to communicate with other team members who implement the man machine interface and the simulator, and write a documentation in english on how to use the library.

This is at least a 5 months project, preferably 6 months.

Simulation of defective hardware

Kind: 
Internship
Kind: 
Ph.D.
Supervisor: 
Vania Joloboff
Location: 
Tsinghua University, FIT building, Beijing
Background: 

Embedded systems must often provide quality of service that require resilience to hardware defects. For example some applications should not hang or stop because some hardware component is not working properly. It is quite difficult in reality to construct defective hardware to test such conditions, and it is easier to design simulation models that intentionally simulate defective hardware.

Expertise: 
  • Background in computer architecture and simulation.
  • Experience in TCP/IP socket programming to connect the simulator to the external control interface.

The goal of the project is to introduce into the simulator developed in the FORMES project the possibility to simulate inconsistent hardware. This means that the simulation models can dynamically change behavior during a simulation session, based on external input. The objective is to enhance the existing simulator based on SystemC and TLM with the possibility to define variable behavior hardware models such that simulation scripts can modify the parameters during simulation sessions and the results can be analyzed.

This project has two aspects, which could be two internships.

Exploiting Parallelism in Simulation

Kind: 
Internship
Supervisor: 
Vania Joloboff
Location: 
Tsinghua University, FIT building, Beijing
Background: 

Hardware components making up a hardware platforms are inherently parallel. However, in most simulators, the hardware components are simulated serially, using some scheduling algorithm, such as the SystemC scheduler. This is becoming a bottleneck to simulate the multi-core or many-core platforms that are emerging. Moreover, this technique does not take advantage of the multi-processor computers widely available now.

Expertise: 
  • Background in computer architecture and simulation.
  • Experience in concurrent programming and scheduling.
  • Knowledge of C++ or Java necessary.
  • Knowledge of SystemC is preferred.

The goal of the project is to investigate into the simulator developed in the FORMES project the possibility to simulate hardware components using parallell simultaneous simulation models to run on multi-processor simulation machines. This means that either the current scheduler must be extended to support parallell components, or alternatively that a new framework should be developed inherently supporting concurrency of simulation models. Both options are open in this preliminary phase.

Embedded Linux on Simulated Hardware

Kind: 
Internship
Supervisor: 
Vania Joloboff
Location: 
Tsinghua University, FIT building, Beijing
Background: 

The FORMES project develops an embedded system hardware simulator. In order to run applications, most of time, an operating system is required. A typical operating system is Embedded Linux, with many examples illustrated at LinuxDevices web site.

The goal of the project is to run Embedded Linux on top of the simulator. The work consists in porting the Embedded Linux kernel for the ARM architecture onto the ARM simulator of the project. The result should be a demonstrator running a sample application on Linux running on simulated hardware.

Certification of program termination

Supervisor: 
Frédéric Blanqui
Location: 
Tsinghua University, FIT building, Beijing
Background: 

Termination is an important property of programs. For a given program, it may even be necessary to establish its termination in order to prove its correctness. For this undecidable problem, many criteria and tools have been developed over the last years. But these become more and more complex and difficult to verify. To recover the confidence one can expect from such tools, it is necessary to certify their results. The CoLoR project aims at providing tools for certifying the results of automated provers.

Many powerful termination criteria have been developed for rewrite rules based programs. Rewriting is a fundamental notion that is also of practical interest since programs in other programming paradigms can be encoded by using rewrite systems. Currently, CoLoR can handle rewrite systems only. We propose various subjects to extend CoLoR with other important termination techniques and to other programming paradigms. Find more details here.

Computability Path Ordering

Kind: 
Internship
Supervisor: 
Jean-Pierre Jouannaud, Frédéric Blanqui
Location: 
Tsinghua University, FIT building, Beijing
Background: 

The Computability Path Ordering is a well-founded ordering on typed lambda-terms that captures the essence of Girard’s “candidates of reducibility” method. The ordering extends to terms a well-founded basic ordering on the function or type symbols used. A companion ordering applies to beta-eta-equivalences classes of terms, in order to show termination of higher-order rules operating on abstract syntax trees. Both are implemented in Prolog, and the implementations are available from Rubio’s web page.

Bibliography: 
  • Jouannaud and Rubio. Polymorphic Recursive Path Orderings. JACM 54(1):1–48, 2007.
  • Blanqui, Jouannaud and Rubio. The Computability Path Ordering: the End of a Quest. CSL’08, LNCS.

The problem is to develop a platform for certifying termination of higher-order rewrite relations based on the above method, or on variants using comparisons of interpretations of the base symbols, as done for first-order termination. This work should be part of the CoLoR platform. Generalizations are welcome: by including interpretations, or modulo associativity and commutativity.

Membership equational logic

Supervisor: 
Jean-Pierre Jounnaud, Pierre-Yves Strub
Location: 
Tsinghua University, FIT building, Beijing
Background: 

Membership equational logic is a Horn clause logic built with the equality predicate and (possibly infinitely many) membership predicates, one for each declared sort s. Each sort is defined by a set of (free) constructors which must be declared with their respective input sorts and output sort. A sort s’ can be defined to be a subsort of another sort s, which is a particular membership predicate definition of the form x:s if x:s’. Defined Function symbols or predicates must be declared with their respective input sorts and output sort, and be total on these input sorts. It has been remarked by Comon that membership equational logic signatures are indeed bottom-up tree automata.

Bibliography: 
  • Meseguer. Membership Algebra as a Logical Framework for Equational Specification, Workshop ADT, 1998. Bouhoula, J.-P. Jouannaud, J. Meseguer, Specification and Proof in Membership Equational Logic, TCS 236[1,2], 2000.
  • Blanqui, Jouannaud, Strub, Building Decision Procedures in the Calcul. of Ind. Constructions, LNCS 4646.

Define a translation of membership equational logic to the Calculus of Inductive Constructions, in which sorts from equational logic are translated to inductive types. Note that some defined symbols like tail on lists are total on a subsort (of lists): since subsorts do not exist in the Calculus of Inductive Constructions, they must take in the translation a proof that the input is non-empty as a new argument. Define and implement a decision procedure with certificates for confluent and terminating specifications in MEL. Further, define Higher-Order Membership Equational Logic so as to retain the nice properties of this logic: existence of an initial algebra, efficient execution schema, etc.

Theory of bit vectors

Supervisor: 
Jean-Pierre Jouannaud
Location: 
Tsinghua University, FIT building, Beijing
Background: 

The theory of bit vectors is a widely accepted low-level abstraction for modern hardware. This theory is a challenge for at least two reasons: because no polynomial algorithm is known for deciding the theory for fixed-length vectors, and because little is known about its variable length version.

Bibliography: 
  • Bezem, Nieuwenhuis, Rodriguez-Carbonell. Exponential behaviour of the Butkovic-Zimmermann algorithm for solving two-sided linear systems in max-algebra, Discrete Maths, 2008.

Studying the theory of bit vectors in Coq is an interesting project since Coq dependent types should allow carrying out a formal study of the variable length version of the theory.