fix tyes.
This commit is contained in:
parent
1eeb17f6f1
commit
4a5a3d833a
@ -74,7 +74,9 @@ typedef enum
|
||||
#define Yap_has_signal(S) Yap_has_signal__(S PASS_REGS)
|
||||
#define Yap_only_has_signal(S) Yap_only_has_signal__(S PASS_REGS)
|
||||
|
||||
inline static uint64_t
|
||||
INLINE_ONLY inline EXTERN uint64_t SIGNAL_TO_BIT( yap_signals sig);
|
||||
|
||||
INLINE_ONLY inline EXTERN uint64_t
|
||||
SIGNAL_TO_BIT( yap_signals sig)
|
||||
{
|
||||
return ((uint64_t)1 << (sig-1));
|
||||
|
@ -15,6 +15,8 @@
|
||||
|
||||
#ifndef YAP_H
|
||||
#include "YapTermConfig.h"
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#if HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
|
@ -20,12 +20,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef YAP_H
|
||||
|
||||
/* The YAP main types */
|
||||
#include "YapTerm.h"
|
||||
|
||||
#else
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#endif /* YAP_H */
|
||||
|
||||
/* truth-values */
|
||||
/* stdbool defines the booleam type, bool,
|
||||
and the constants false and true */
|
||||
#if HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#if HAVE_STDBOOL_H
|
||||
#include <stdbool.h>
|
||||
#else
|
||||
@ -49,6 +60,9 @@ typedef int _Bool;
|
||||
#ifndef FALSE
|
||||
#define FALSE false
|
||||
#endif
|
||||
#ifndef YAP_Bool
|
||||
typedef bool YAP_Bool;
|
||||
#endif
|
||||
|
||||
#ifdef YAP_H
|
||||
|
||||
@ -72,8 +86,6 @@ typedef int _Bool;
|
||||
|
||||
#define YAP_Float Float
|
||||
|
||||
#define YAP_Bool bool
|
||||
|
||||
#define YAP_handle_t yhandle_t
|
||||
|
||||
#define YAP_PredEntryPtr struct pred_entry *
|
||||
@ -92,8 +104,6 @@ typedef unsigned long long YAP_CELL;
|
||||
typedef uintptr_t YAP_CELL;
|
||||
#endif
|
||||
|
||||
typedef bool YAP_Bool;
|
||||
|
||||
typedef YAP_CELL YAP_Term;
|
||||
|
||||
typedef YAP_CELL YAP_Arity;
|
||||
@ -136,7 +146,6 @@ typedef int (*YAP_agc_hook)(void *_Atom);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct YAP_thread_attr_struct {
|
||||
size_t ssize;
|
||||
size_t tsize;
|
||||
|
@ -41,7 +41,7 @@ typedef std::pair<ParfactorList*, ObservedFormulas*> LiftedNetwork;
|
||||
|
||||
|
||||
|
||||
int
|
||||
static YAP_Bool
|
||||
createLiftedNetwork()
|
||||
{
|
||||
Parfactors parfactors;
|
||||
@ -79,7 +79,7 @@ createLiftedNetwork()
|
||||
|
||||
|
||||
|
||||
int
|
||||
static YAP_Bool
|
||||
createGroundNetwork()
|
||||
{
|
||||
std::string factorsType ((char*) YAP_AtomName (YAP_AtomOfTerm (YAP_ARG1)));
|
||||
@ -135,7 +135,7 @@ createGroundNetwork()
|
||||
|
||||
|
||||
|
||||
int
|
||||
static YAP_Bool
|
||||
runLiftedSolver()
|
||||
{
|
||||
LiftedNetwork* network = (LiftedNetwork*) YAP_IntOfTerm (YAP_ARG1);
|
||||
@ -193,7 +193,7 @@ runLiftedSolver()
|
||||
|
||||
|
||||
|
||||
int
|
||||
static YAP_Bool
|
||||
runGroundSolver()
|
||||
{
|
||||
FactorGraph* fg = (FactorGraph*) YAP_IntOfTerm (YAP_ARG1);
|
||||
@ -244,7 +244,7 @@ runGroundSolver()
|
||||
|
||||
|
||||
|
||||
int
|
||||
static YAP_Bool
|
||||
setParfactorsParams()
|
||||
{
|
||||
LiftedNetwork* network = (LiftedNetwork*) YAP_IntOfTerm (YAP_ARG1);
|
||||
@ -271,7 +271,7 @@ setParfactorsParams()
|
||||
|
||||
|
||||
|
||||
int
|
||||
static YAP_Bool
|
||||
setFactorsParams()
|
||||
{
|
||||
FactorGraph* fg = (FactorGraph*) YAP_IntOfTerm (YAP_ARG1);
|
||||
@ -297,7 +297,7 @@ setFactorsParams()
|
||||
|
||||
|
||||
|
||||
int
|
||||
static YAP_Bool
|
||||
setVarsInformation()
|
||||
{
|
||||
Var::clearVarsInfo();
|
||||
@ -327,7 +327,7 @@ setVarsInformation()
|
||||
|
||||
|
||||
|
||||
int
|
||||
static YAP_Bool
|
||||
setHorusFlag()
|
||||
{
|
||||
std::string option ((char*) YAP_AtomName (YAP_AtomOfTerm (YAP_ARG1)));
|
||||
@ -352,7 +352,7 @@ setHorusFlag()
|
||||
|
||||
|
||||
|
||||
int
|
||||
static YAP_Bool
|
||||
freeGroundNetwork()
|
||||
{
|
||||
delete (FactorGraph*) YAP_IntOfTerm (YAP_ARG1);
|
||||
@ -361,7 +361,7 @@ freeGroundNetwork()
|
||||
|
||||
|
||||
|
||||
int
|
||||
static YAP_Bool
|
||||
freeLiftedNetwork()
|
||||
{
|
||||
LiftedNetwork* network = (LiftedNetwork*) YAP_IntOfTerm (YAP_ARG1);
|
||||
|
@ -262,7 +262,7 @@ term_to_cudd(DdManager *manager, YAP_Term t)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
static YAP_Bool
|
||||
p_term_to_cudd(void)
|
||||
{
|
||||
DdManager *manager;
|
||||
@ -417,7 +417,7 @@ term_to_add(DdManager *manager, YAP_Term t)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
static YAP_Bool
|
||||
p_term_to_add(void)
|
||||
{
|
||||
DdManager *manager = Cudd_Init(0,0,CUDD_UNIQUE_SLOTS,CUDD_CACHE_SLOTS,0);
|
||||
@ -431,16 +431,16 @@ p_term_to_add(void)
|
||||
YAP_Unify(YAP_ARG4, YAP_MkIntTerm((YAP_Int)t));
|
||||
}
|
||||
|
||||
static int complement(int i)
|
||||
static YAP_Bool complement(int i)
|
||||
{
|
||||
return i == 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
static int var(DdManager *manager, DdNode *n, YAP_Int *vals ) {
|
||||
static YAP_Bool var(DdManager *manager, DdNode *n, YAP_Int *vals ) {
|
||||
return (int)vals[Cudd_ReadPerm(manager,Cudd_NodeReadIndex(n))];
|
||||
}
|
||||
|
||||
static int
|
||||
static YAP_Bool
|
||||
cudd_eval(DdManager *manager, DdNode *n, YAP_Int *vals )
|
||||
{
|
||||
if (Cudd_IsConstant(n)) {
|
||||
@ -461,7 +461,7 @@ cudd_eval(DdManager *manager, DdNode *n, YAP_Int *vals )
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static YAP_Bool
|
||||
cudd_eval_top(DdManager *manager, DdNode *n, YAP_Int *vals )
|
||||
{
|
||||
if (Cudd_IsComplement(n)) {
|
||||
@ -471,7 +471,7 @@ cudd_eval_top(DdManager *manager, DdNode *n, YAP_Int *vals )
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static YAP_Bool
|
||||
p_eval_cudd(void)
|
||||
{
|
||||
DdManager *manager = (DdManager *)YAP_IntOfTerm(YAP_ARG1);
|
||||
@ -511,7 +511,7 @@ add_eval(DdManager *manager, DdNode *n, YAP_Int *vals )
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static YAP_Bool
|
||||
p_eval_add(void)
|
||||
{
|
||||
DdManager *manager = (DdManager *)YAP_IntOfTerm(YAP_ARG1);
|
||||
@ -604,7 +604,7 @@ get_vars(YAP_Term t3)
|
||||
return YAP_ArityOfFunctor(YAP_FunctorOfTerm(t3));
|
||||
}
|
||||
|
||||
static int
|
||||
static YAP_Bool
|
||||
p_cudd_to_term(void)
|
||||
{
|
||||
DdManager *manager = (DdManager *)YAP_IntOfTerm(YAP_ARG1);
|
||||
@ -674,7 +674,7 @@ build_prolog_add(DdManager *manager, DdNode *n, YAP_Term *ar, hash_table_entry *
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static YAP_Bool
|
||||
p_add_to_term(void)
|
||||
{
|
||||
DdManager *manager = (DdManager *)YAP_IntOfTerm(YAP_ARG1);
|
||||
@ -716,7 +716,7 @@ p_add_to_term(void)
|
||||
return YAP_Unify(YAP_ARG4, t);
|
||||
}
|
||||
|
||||
static int
|
||||
static YAP_Bool
|
||||
p_cudd_size(void)
|
||||
{
|
||||
DdManager *manager = (DdManager *)YAP_IntOfTerm(YAP_ARG1);
|
||||
@ -784,7 +784,7 @@ build_sp_cudd(DdManager *manager, DdNode *n, double *ar, hash_table_entry_dbl *h
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static YAP_Bool
|
||||
p_cudd_to_p(void)
|
||||
{
|
||||
DdManager *manager = (DdManager *)YAP_IntOfTerm(YAP_ARG1);
|
||||
@ -819,7 +819,7 @@ p_cudd_to_p(void)
|
||||
return YAP_Unify(YAP_ARG4, YAP_MkFloatTerm(p));
|
||||
}
|
||||
|
||||
static int
|
||||
static YAP_Bool
|
||||
p_cudd_print(void)
|
||||
{
|
||||
DdManager *manager = (DdManager *)YAP_IntOfTerm(YAP_ARG1);
|
||||
@ -836,7 +836,7 @@ p_cudd_print(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
static YAP_Bool
|
||||
p_cudd_die(void)
|
||||
{
|
||||
DdManager *manager = (DdManager *)YAP_IntOfTerm(YAP_ARG1);
|
||||
@ -844,7 +844,7 @@ p_cudd_die(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
static YAP_Bool
|
||||
p_cudd_release_node(void)
|
||||
{
|
||||
DdManager *manager = (DdManager *)YAP_IntOfTerm(YAP_ARG1);
|
||||
|
@ -178,7 +178,10 @@ extern BPLONG number_var_exception;
|
||||
|
||||
extern BPLONG toam_signal_vec;
|
||||
|
||||
#define unify YAP_Unify
|
||||
#define unify YAP_UnifyINT
|
||||
|
||||
extern inline YAP_UnifyINT(YAP_Term t1, YAP_Term t2);
|
||||
extern inline YAP_UnifyINT(YAP_Term t1, YAP_Term t2) { return YAP_Unify(t1,t2); }
|
||||
|
||||
INLINE_ONLY extern inline char *
|
||||
bp_term_2_string(TERM t)
|
||||
|
@ -2,9 +2,9 @@
|
||||
#define STUFF_H
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
#ifndef bool
|
||||
typedef enum { false, true } bool;
|
||||
|
||||
#endif
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
#if defined _MSC_VER
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 5e423b2d029c9dbf320649b08fc0253d64853257
|
||||
Subproject commit 9becd0f0619379d30b26b14df642872a373f3fa4
|
Reference in New Issue
Block a user