octalgo.octalgo.extract_static


Require Import syntax.
Require Import occurrences.
Require Import subs.
Require Import pmatch.
Require Import soundness.
Require Import bSemantics.
Require Import tSemantics.
Require Import static.
Require Import norec_sem.
Require Import rinstance.
Require Import completeness.


Require Import bigop_aux.
Require Import utils.
Require Import finseqs.
Require Import fintrees.

Set Implicit Arguments.

Combining the static analysis and the rule instantiation

Section Transformation.

Definition of dependent substitutions of clauses for a typing

p a program and i an interpretation
Variable p : program.
Variable i : interp.

The variables are not shared across rules
Hypothesis Hvns : vars_not_shared p.
The variables appearing in the head of a clause are a subset of those in the body of the same rule.
Hypothesis Hpsafe : prog_safe p.
Only intensional predicataes are used as head of clauses
Hypothesis Hpsafehds : prog_safe_hds p.
No constant in the head of clauses
Only extensional predicates in the interpretation
Hypothesis Hsafe_edb : safe_edb i.

Variable def : syntax.constant.
Variable df : symtype.
Variable dv : 'I_n.
Variable dga : gatom.
Variable docc : t_occ p.

Variable v : 'I_n.

Definition analysis := analyze_var p (Val def) dv v #|rul_gr_finType|.

Extraction of the substitutions via the static analysis

Adequacy of the transformation