TaPAS  0.2
Typedefs | Enumerations | Functions
alambic.h File Reference

Alambic API. More...

#include <genepi/genepi.h>
#include <armoise/armoise.h>

Go to the source code of this file.

Typedefs

typedef struct
armoise_normalized_predicate_st 
armoise_normalized_predicate
 Abstract type of a normalized ARMOISE predicate. More...
 

Enumerations

enum  alambic_error {
  ALAMBIC_NO_ERROR = 0,
  ALAMBIC_REAL_NOT_SUPPORTED,
  ALAMBIC_POSI_NOT_SUPPORTED,
  ALAMBIC_INT_NOT_SUPPORTED,
  ALAMBIC_INVALID_MUL_DIMENSIONS,
  ALAMBIC_INVALID_MUL_CARDINALITY,
  ALAMBIC_INVALID_MUL_FACTOR,
  ALAMBIC_INVALID_DIV_DIMENSIONS,
  ALAMBIC_INVALID_DIV_CARDINALITY,
  ALAMBIC_INVALID_MOD_DIMENSIONS,
  ALAMBIC_INVALID_MOD_CARDINALITY
}
 Error code returned by Alambic functions. More...
 

Functions

armoise_normalized_predicatealambic_normalize_predicate (armoise_context *parent, const armoise_predicate *P, alambic_error *p_err)
 Normalize the armoise predicate P. More...
 
ccl_treealambic_normalize_predicate_tree (armoise_context *parent, const ccl_tree *t, alambic_error *p_err)
 Normalize the predicates stored in the tree t. More...
 
genepi_setalambic_compute_predicate (genepi_solver *solver, const armoise_normalized_predicate *P, alambic_error *p_error)
 Computes the solutions of the normalized predicate P. More...
 

Detailed Description

Alambic API.

Definition in file alambic.h.

Typedef Documentation

typedef struct armoise_normalized_predicate_st armoise_normalized_predicate

Abstract type of a normalized ARMOISE predicate.

See Also
alambic_normalize_predicate

Definition at line 92 of file alambic.h.

Enumeration Type Documentation

Error code returned by Alambic functions.

Enumerator
ALAMBIC_NO_ERROR 

The operation terminates without error.

ALAMBIC_REAL_NOT_SUPPORTED 

The Genepi solver does not support variables taken their value in real numbers.

ALAMBIC_POSI_NOT_SUPPORTED 

The Genepi solver does not support variables taken their value in positive real numbers.

ALAMBIC_INT_NOT_SUPPORTED 

The Genepi solver does not support variables taken their value in integers.

ALAMBIC_INVALID_MUL_DIMENSIONS 

The formula specifies a multiplication of two relations with arities > 1.

ALAMBIC_INVALID_MUL_CARDINALITY 

The formula specifies a multiplication of two infinite relations.

ALAMBIC_INVALID_MUL_FACTOR 

A non-linear factor is found.

ALAMBIC_INVALID_DIV_DIMENSIONS 

The formula specifies a division of two relations with arities > 1.

ALAMBIC_INVALID_DIV_CARDINALITY 

The formula specifies a division of two infinite relations.

ALAMBIC_INVALID_MOD_DIMENSIONS 

The formula specifies a modulo between two relations with arities > 1.

ALAMBIC_INVALID_MOD_CARDINALITY 

The formula specifies a division of two infinite relations.

Definition at line 45 of file alambic.h.

Function Documentation

genepi_set* alambic_compute_predicate ( genepi_solver solver,
const armoise_normalized_predicate P,
alambic_error p_error 
)

Computes the solutions of the normalized predicate P.

Parameters
solverthe Genepi solver
Pa normalized predicate
p_erroraddress where an error status should be stored
Returns
  • the genepi_set encoding the elements of P
  • NULL if an error occurs.
armoise_normalized_predicate* alambic_normalize_predicate ( armoise_context parent,
const armoise_predicate P,
alambic_error p_err 
)

Normalize the armoise predicate P.

This rewriting procedure is required before computations with Genepi. The rewriting rules are mainly applied to first order formulas:

  • vectorial variables are expanded into vectors
  • vectorial expressions are exploded
  • term comparisons are rewrited to obtain linear expressions
    Parameters
    parentthe parent of the context used to create the normalized version of P.
    Pthe predicate to normalize
    p_erraddress where an error status should be stored
    Returns
    a normalized version of P
ccl_tree* alambic_normalize_predicate_tree ( armoise_context parent,
const ccl_tree t,
alambic_error p_err 
)

Normalize the predicates stored in the tree t.

Parameters
parentthe parent of the context used to create the normalized version of P.
tthe tree containing the predicates to normalize
p_erraddress where an error status should be stored
Returns
a new tree containing the normalized version of predicates in t