static void
BmcBexpOutput(
FILE* f,
node_ptr bexp,
int output_type
)
- Write to specified FILE stream given node_ptr
formula with specified output_type format. There are
follow formats: BMC_BEXP_OUTPUT_SMV, BMC_BEXP_OUTPUT_LB
- Side Effects None
- Defined in
bmcTest.c
void
BmcIntFreeListOfLists(
lsList list_of_lists
)
- This function can be used to destroy lists of list. The
contained set of lists is removed from memory as the top level list.
More than two levels are not handled at the moment.
- Side Effects Lists are deallocated
- See Also
lsDestroy
- Defined in
bmcUtils.c
static void
BmcSatGenInvar(
rbc_ptr prob
)
- The generated dimacs file name depends on the model name
and on the value of the bmc_prefix environment variable
- See Also
BmcGenProblem
- Defined in
bmcCmd.c
static void
BmcSatGenProblemKL(
rbc_ptr prob,
int k,
int l
)
- Takes an RBC problem with bound K, generates
DIMACS, calls SATO, call SIM, and reconstruct model (if any).
Modes allow to factorize over different file names.
- Side Effects None
- Defined in
bmcCmd.c
static void
BmcSatGenProblemK(
rbc_ptr prob,
int k
)
- The generated dimacs file name depends on the model name, k, and the value of the bmc_prefix environment variable
- See Also
BmcGenProblem
- Defined in
bmcCmd.c
static sat_result
BmcSatSolveFalsificationProblem(
rbc_ptr prob,
int k,
int l,
int mode,
int bCreateDimacs,
node_ptr* model
)
- Converts the rbc-based problem into its CNF representation, and calls the
solver, which can be internal or external, or both. In this last case results
are compared.
Returns:
- SAT_INTERNAL_ERROR if an error occurred
- SAT_UNSATISFIABLE_PROBLEM if the formula is unsatisfiable
- SAT_SATISFIABLE_PROBLEM if the assignment satisfying
the formula. In this case the model parameter points to a list of
literals
- See Also
Bmc_RbcConvertToCnf
Bmc_CallSimSolver
Bmc_CallSatoSolver
- Defined in
bmcCmd.c
static sat_result
BmcSatSolveInvar(
rbc_ptr prob,
int bCreateDimacs,
node_ptr* pnSimResult
)
- BmcSatSolveInvar
- Side Effects pnSimResult will change to result if prob is
satisfiable, NULL otherwise
- Defined in
bmcCmd.c
void
BmcShiftingHashInit(
)
- Call BmcShiftingHashQuit() before quit from BMC module
- Side Effects Private global var GL_phtRbcShift will change
- See Also
Bmc_RbcVarShift
BmcShiftingHashQuit
- Defined in
bmcRbc.c
void
BmcShiftingHashQuit(
)
- Call BmcShiftingHashQuit() before quit from BMC module
- Side Effects Private global var GL_phtRbcShift will be put to NULL
- See Also
Bmc_RbcVarShift
BmcShiftingHashInit
- Defined in
bmcRbc.c
void
BmcVarsMgrInit(
node_ptr state_vars_bexp
)
- Initialize BMC Variables Manager
- Side Effects Alloc variables manager (data container)
Follow structures are allocated in the
variables manager (data container):
- variables environment
- variables state vars -> current vars conversion table
- variables current vars -> state vars conversion table
- variables substitution array
- See Also
scan_state_vars_bexp
- Defined in
bmcVarsMgr.c
void
BmcVarsMgrQuit(
)
- Quit from BMC Variables Manager
- Side Effects Follow structures are freed in the variables
manager (data container):
- variables substitution array
- variables current vars -> state vars conversion table
- variables state vars -> current vars conversion table
- variables environment
Free variables manager (data container)
- See Also
bmc_vars_init
- Defined in
bmcVarsMgr.c
void
Bmc_AddCmd(
)
- Adds all bmc-related commands to the interactive shell
- See Also
SmInit
- Defined in
bmcCmd.c
rbc_ptr
Bmc_Bexp2Rbc(
node_ptr bexp
)
- Converts given boolean expression into
correspondent reduced boolean circuit
- Side Effects rbc hash may change
- Defined in
bmcVarsMgr.c
sat_result
Bmc_CallSatoSolver(
char * fname
)
- Interface to external solver Sato.
Returns:
- SAT_INTERNAL_ERROR if an error occurred
- SAT_UNSATISFIABLE_PROBLEM if the formula is unsatisfiable
- SAT_SATISFIABLE_PROBLEM if the formula is unsatisfiable
- Side Effects none
- Defined in
bmcSatsolver.c
sat_result
Bmc_CallSimSolver(
lsList CnfClauses,
lsList CnfVars,
int CnfMaxVar,
lsList lsResult
)
- If the sim solver successfully returns a model, the representation of that
model can be found into the list lsResult, which must be previously created.
The calle function has the responsibility for the list allocation and
deallocation.
Returns:
- SAT_INTERNAL_ERROR if an error occurred
- SAT_UNSATISFIABLE_PROBLEM if the formula is unsatisfiable
- SAT_SATISFIABLE_PROBLEM if the assignment is satisfying
the formula. In this case lsResult points to a list of literals
- Side Effects the list lsResult could be changed
- See Also
CallSimSolver
- Defined in
bmcSatsolver.c
node_ptr
Bmc_CheckFairnessListForPropositionalFormulae(
node_ptr wffList
)
- Help function to simplify calling to 'bmc_check_wff_list'
for searching of propositional only wff. Returns a new list of wffs which
contains legal wff only
- See Also
bmc_check_wff_list
- Defined in
bmcCheck.c
void
Bmc_ConvertLoopbackFromInteger(
const int iLoopback,
char* szLoopback,
const int _bufsize
)
- Inverse semantic of Bmc_ConvertLoopbackFromString.
bufsize is the maximum buffer size
- Side Effects String buffer passed as argument will change
- See Also
Bmc_ConvertLoopbackFromString
- Defined in
bmcUtils.c
outcome
Bmc_ConvertLoopbackFromString(
const char* strValue,
int* iValue
)
- Use this function to correctly convert a string
containing a loopback user-side value to the internal representation of
the same loopback value
- Side Effects Integer value passed as argumnet will change
- Defined in
bmcUtils.c
rbc_ptr
Bmc_CurrNextShiftAtTimes(
rbc_ptr exp,
int ctime,
int ntime
)
- Shift given current, next expression at
specified ctime (current vars at time) and ntime (next
vars at time)
- Side Effects extends variables environment and maxtime, if required
- Defined in
bmcVarsMgr.c
rbc_ptr
Bmc_CurrNextShiftAtTime(
rbc_ptr exp,
int time
)
- Shift given current, next expression at
specified time
- Side Effects extends variables environment and maxtime, if required
- Defined in
bmcVarsMgr.c
rbc_ptr
Bmc_CurrShiftToNext(
rbc_ptr exp
)
- Warning: argument 'exp' must contain only variables in
current time, otherwise results will be unpredictible, surely inconsistent
- Defined in
bmcVarsMgr.c
rbc_ptr
Bmc_Curvar2Nextvar(
rbc_ptr curvar
)
- Given a rbc current variable, returns the rbc variable
corrisponding to the next variables block
- Side Effects None
- Defined in
bmcVarsMgr.c
node_ptr
Bmc_Curvar2Statevar(
rbc_ptr curvar
)
- Given a rbc representation of a variable, returns the
relative state variable
- Side Effects None
- Defined in
bmcVarsMgr.c
rbc_ptr
Bmc_Curvar2Timedvar(
rbc_ptr curvar,
int time
)
- Given a rbc current variable, returns the rbc variable
corrisponding to the 'time' index variables block
- Defined in
bmcVarsMgr.c
outcome
Bmc_DavinciWriteProblem(
rbc_ptr rbc,
char* fname
)
- The filename must not contain extension, which will
be appended from this function. Returns SUCCESS if the dump has been
performed successfully, otherwise returns FILE_ERROR
- Defined in
bmcSatsolver.c
outcome
Bmc_DimacsWriteProblem(
char * fname,
int k,
lsList CnfClauses,
lsList CnfVars,
int CnfMaxVar
)
- The Dimacs file is annotated with a description of the
model checking problem, and with the mapping from model variables to
dimacs variables
Returns FILE_ERROR if an error had occured, SUCCESS otherwise
- Side Effects none
- Defined in
bmcSatsolver.c
void
Bmc_ExtendsMaxtime(
int new_maxtime
)
- Extends maxtime at given
new_maxtime
- Side Effects rbc hash may change
- Defined in
bmcVarsMgr.c
void
Bmc_GenSolveInvar(
Prop_Ptr invarprop,
const int bCreateDimacs,
const int bSolve
)
- Genetate DIMACS version and/or solve and INVARSPEC
problem.
- See Also
Bmc_GenSolvePbs
- Defined in
bmcCmd.c
void
Bmc_GenSolvePbs(
Prop_Ptr ltlprop,
const int bIncreaseK,
const int bCreateDimacs,
const int bSolve
)
- TODO
- Defined in
bmcCmd.c
rbc_ptr
Bmc_GetIthCurvar(
int i
)
- As Bmc_GetIthStatevar but in terms of rbc
representation
- Side Effects None
- Defined in
bmcVarsMgr.c
rbc_ptr
Bmc_GetIthNextvar(
int i
)
- As Bmc_GetIthCurvar but relatively to next state
variables block
- Side Effects None
- Defined in
bmcVarsMgr.c
node_ptr
Bmc_GetIthStatevar(
int i
)
- Given the relative index returns the state variable
which addresses
- Side Effects None
- Defined in
bmcVarsMgr.c
rbc_ptr
Bmc_GetIthTimedvar(
int i,
int time
)
- As Bmc_GetIthNextvar but relatively to 'time' indexed
state variables block
- Side Effects None
- Defined in
bmcVarsMgr.c
int
Bmc_GetLtlWffDepth(
node_ptr ltl_wff
)
- Returns 0 for propositional formulae, 1 or more for
temporal formulae
- Side Effects none
- Defined in
bmcWff.c
void
Bmc_Init(
)
- Initializes the BMC model manager structure
- Side Effects ...
- Defined in
bmcUtils.c
int
Bmc_IsPropositionalFormula(
node_ptr wff
)
- Given a wff returns 1 if wff is a propositional formula,
zero (0) otherwise.
- Defined in
bmcCheck.c
node_ptr
Bmc_LtlWffMkNnfToplevel(
node_ptr wff
)
- a positive (1) polarity will not negate entire formula
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_MapBexp2Rbc(
node_ptr bexp_list
)
- Converts given boolean expressions list
into correspondent reduced boolean circuits list
- Side Effects rbc hash may change
- Defined in
bmcVarsMgr.c
rbc_ptr
Bmc_MkAndCurrNextInterval(
rbc_ptr exp,
int from,
int to
)
- Make an AND interval of given expression using
range [from, to]
- Side Effects rbc hash may change
- Defined in
bmcVarsMgr.c
rbc_ptr
Bmc_MkEventuallyTableauAtTime(
node_ptr ltl_wff,
int intime,
int k,
int l
)
- ltl_wff is the 'p' part in 'F p'.
If intime<=k is out of [l, k] or if there is no loop,
iterates from intime to k, otherwise iterates from l to k
- Defined in
bmcModel.c
rbc_ptr
Bmc_MkGloballyTableauAtTime(
node_ptr ltl_wff,
int intime,
int k,
int l
)
- ltl_wff is the 'p' part in 'G p'
- See Also
Bmc_MkEventuallyTableauAtTime
- Defined in
bmcModel.c
rbc_ptr
Bmc_MkInvariantProblem(
Fsm_RbcPtr rbc_fsm,
node_ptr wff
)
- Builds the negation of
(I0 imp P0) and ((P0 and R01) imp P1)
that must be unsatisfiable.
- Defined in
bmcModel.c
node_ptr
Bmc_MkLoopbackLtl(
int k,
int l
)
- In the following example we suppose the loop starts
from 2 and finishes to 5 (the bound).
,--------,
V |
o--o--o--o--o--o--o--o--o--o--o--o--o- (...continues indefinitely)
0 1 2 3 4 5 6 7 8 9 10 11 12
In general all variables in time 2 must be forced to be equivalent
to the corresponding variables timed in 6, the variables in 3 to 7,
and so on up to the variables in 5 (equivalent to variables in
9). Then variables in 6 (or 2 again) must be forced to be equivalent
to the varaibles in 10, and so on indefinitely.
In formula (let suppose we have only one boolean variable):
(p2 <-> p6) && (p6 <-> p10) ...
In a more compact (and finite!) form, related to this example:
XX(G (p <-> XXXX(p)))
The first two neXtes forces the formula to be effective only from the loop
starting point.
The generic formula implemented in the code is the following one:
X^(l) (G (
(p0 <-> X^(k-l+1)(p0)) &&
(p1 <-> X^(k-l+1)(p1)) &&
.
.
.
(pn <-> X^(k-l+1)(pn))
)
)
where:
p0..pn are all boolean variables into the model
X^(n) is expanded to XXX..X n-times
- Defined in
bmcTest.c
rbc_ptr
Bmc_MkNextTableauAtTime(
node_ptr ltl_wff,
int time,
int k,
int l
)
- Returns a falsity constants if the next operator leads
out of [l, k] and there is no loop
- Defined in
bmcModel.c
rbc_ptr
Bmc_MkOrCurrNextInterval(
rbc_ptr exp,
int from,
int to
)
- Make an OR interval of given expression using
range [from, to]
- Side Effects None
- Defined in
bmcVarsMgr.c
rbc_ptr
Bmc_MkProblem_k_l(
Fsm_RbcPtr rbc_fsm,
node_ptr ltl_wff,
int k,
int l
)
- Returns the problem at length k with loopback l
(possibly BMC_NO_LOOP)
- Side Effects ...
- Defined in
bmcModel.c
rbc_ptr
Bmc_MkProblem_k(
Fsm_RbcPtr rbc_fsm,
node_ptr ltl_wff,
int k
)
- Returns all problems for the model at length k with
all loops from 0 to k
- Side Effects ...
- Defined in
bmcModel.c
rbc_ptr
Bmc_MkReleasesTableauAtTime(
node_ptr p,
node_ptr q,
int time,
int k,
int l
)
- Carries out the steps number to be performed, depending
on l,k and time, then calls bmc_mk_releasestableau_at_time_aux
- See Also
bmc_mk_releasestableau_at_time_aux
- Defined in
bmcModel.c
rbc_ptr
Bmc_MkTableauAtTime(
node_ptr ltl_wff,
int time,
int k,
int l
)
- This function is the entry point of a mutual recursive
calling stack. All logical connectives are resolved, excepted for NOT, which
closes the recursive calling stack. Variables and falsity/truth constants
close the recursion too
- See Also
Bmc_MkNextTableauAtTime
Bmc_MkGloballyTableauAtTime
Bmc_MkEventuallyTableauAtTime
Bmc_MkUntilTableauAtTime
Bmc_MkReleasesTableauAtTime
- Defined in
bmcModel.c
rbc_ptr
Bmc_MkTableau_k_Noloop(
Fsm_RbcPtr rbc_fsm,
node_ptr ltl_wff,
int k
)
- Builds tableau without loop at time zero, taking account
of fairnesses
- Defined in
bmcModel.c
rbc_ptr
Bmc_MkTableau_k_l(
node_ptr ltl_wff,
int k,
int l
)
- Builds the tableau at time zero. Loop is allowed
- Side Effects ...
- Defined in
bmcModel.c
rbc_ptr
Bmc_MkUntilTableauAtTime(
node_ptr p,
node_ptr q,
int time,
int k,
int l
)
- Carries out the steps number to be performed, depending
on l,k and time, then calls bmc_mk_untiltableau_at_time_aux
- See Also
bmc_mk_untiltableau_at_time_aux
- Defined in
bmcModel.c
rbc_ptr
Bmc_Mk_k_Path(
Fsm_RbcPtr rbc_fsm,
int k
)
- Collects initial state and invariants at step zero as
bmc_mk_j_k_unrolling does not take into account of them
- See Also
bmc_mk_j_k_unrolling
- Defined in
bmcModel.c
rbc_ptr
Bmc_Nextvar2Curvar(
rbc_ptr nextvar
)
- Given a variable which belongs to the next block of
variables, returns the corrisponding current variable in rbc form
- Side Effects ...
- Defined in
bmcVarsMgr.c
node_ptr
Bmc_Nextvar2Statevar(
rbc_ptr nextvar
)
- Given a variable which belongs to the next block of
variables, returns the corrisponding state variable
- Side Effects ...
- Defined in
bmcVarsMgr.c
rbc_ptr
Bmc_Nextvar2Timedvar(
rbc_ptr nextvar,
int time
)
- Given a rbc next variable, returns the rbc variable
corrisponding to the 'time' index variables block
- Side Effects None
- Defined in
bmcVarsMgr.c
void
Bmc_Quit(
)
- Frees all resources allocated for the BMC model manager
- Side Effects ...
- Defined in
bmcUtils.c
node_ptr
Bmc_Rbc2Bexp(
rbc_ptr rbc
)
- Descends the structure of the RBC with dag-level
primitives.
- Defined in
bmcRbc2bexp.c
rbc_ptr
Bmc_RbcAnd(
RbcManager_ptr rbcManager,
rbc_ptr left,
rbc_ptr right
)
- Builds a new rbc which is the conjunction between
its two arguments
- Defined in
bmcRbc.c
rbc_ptr
Bmc_RbcFalsity(
RbcManager_ptr rbcManager
)
- Builds a rbc 'false' constant value
- Defined in
bmcRbc.c
rbc_ptr
Bmc_RbcIff(
RbcManager_ptr rbcManager,
rbc_ptr left,
rbc_ptr right
)
- Builds a new rbc which is the logical equivalence
between its two arguments
- Defined in
bmcRbc.c
rbc_ptr
Bmc_RbcImplies(
RbcManager_ptr rbcManager,
rbc_ptr arg1,
rbc_ptr arg2
)
- Builds a new rbc which is the implication between
its two arguments
- Defined in
bmcRbc.c
int
Bmc_RbcIsFalse(
RbcManager_ptr rbcManager,
rbc_ptr arg
)
- Returns 1 if the given rbc is the false value,
otherwise returns 0
- Defined in
bmcRbc.c
int
Bmc_RbcIsTrue(
RbcManager_ptr rbcManager,
rbc_ptr arg
)
- Returns 1 if the given rbc is the true value,
otherwise returns 0
- Defined in
bmcRbc.c
rbc_ptr
Bmc_RbcIte(
RbcManager_ptr rbcManager,
rbc_ptr c,
rbc_ptr t,
rbc_ptr e
)
- Builds an if-then-else operation rbc
- Side Effects ...
- Defined in
bmcRbc.c
rbc_ptr
Bmc_RbcNot(
RbcManager_ptr rbcManager,
rbc_ptr left
)
- Negates its rbc argument
- Defined in
bmcRbc.c
rbc_ptr
Bmc_RbcOr(
RbcManager_ptr rbcManager,
rbc_ptr left,
rbc_ptr right
)
- Builds a new rbc which is the disjunction of
its two arguments
- Defined in
bmcRbc.c
rbc_ptr
Bmc_RbcTruth(
RbcManager_ptr rbcManager
)
- Builds a rbc 'true' constant value
- Defined in
bmcRbc.c
rbc_ptr
Bmc_RbcVarShift(
RbcManager_ptr rbcManager,
rbc_ptr f,
int shift
)
- Shifting operation replaces each occurence of the variable x_i
in `f' with the variable x_(i + shift).
A simple lazy mechanism is implemented to optimize that cases which
given expression is a constant in
- Defined in
bmcRbc.c
rbc_ptr
Bmc_RbcXor(
RbcManager_ptr rbcManager,
rbc_ptr left,
rbc_ptr right
)
- Builds a new rbc which is the exclusive-disjunction
of its two arguments
- Defined in
bmcRbc.c
rbc_ptr
Bmc_Statevar2Curvar(
node_ptr statevar
)
- Search the association from given state variable and
its relative rbc representation, and returns the rbc form
- Side Effects None
- Defined in
bmcVarsMgr.c
rbc_ptr
Bmc_Statevar2Nextvar(
node_ptr statevar
)
- As Bmc_Curvar2Nextvar but current variable must be
supplied in state variable form instead of rbc form
- Side Effects None
- Defined in
bmcVarsMgr.c
rbc_ptr
Bmc_Statevar2Timedvar(
node_ptr statevar,
int time
)
- As Bmc_Curvar2Timedvar but current variable must be
supplied in state variable form instead of rbc form
- Side Effects ...
- Defined in
bmcVarsMgr.c
void
Bmc_StripPathExt(
char * fpathname,
char* filename
)
- Example: given "~/.../test.smv", "test" will be returned.
filename must be a string whose length is large enought to contain the "pure"
filename
- Side Effects the string pointed by 'filename' changes
- Defined in
bmcUtils.c
char*
Bmc_StripPath(
char * pathfname
)
- Return pathname without path prefix
- Side Effects None
- Defined in
bmcUtils.c
void
Bmc_TestReset(
)
- Call this function to reset the test sub-package (into
the reset command for example)
- Defined in
bmcTest.c
int
Bmc_TestTableau(
int argc,
char ** argv
)
- If you call this command with a loopback set to
BMC_ALL_LOOPS you command execution is aborted.
- Defined in
bmcTest.c
void
Bmc_TestVarsMgr(
)
- Bmc_TestVarsMgr
- Side Effects ...
- Defined in
bmcTest.c
int
Bmc_Time2Firstvar(
int time
)
- Returns the first variable in rbc form which belongs to
the given block of variables indexed by 'time'
- Defined in
bmcVarsMgr.c
rbc_ptr
Bmc_Timedvar2Curvar(
rbc_ptr timedvar
)
- Given a variable which belongs to a timed block of
variables, returns the corrisponding current variable in rbc form
- Defined in
bmcVarsMgr.c
rbc_ptr
Bmc_Timedvar2Nextvar(
rbc_ptr timedvar
)
- Given a variable which belongs to a timed block of
variables, returns the corrisponding variable in rbc form which belongs to
the next block of variables
- Defined in
bmcVarsMgr.c
node_ptr
Bmc_Timedvar2Statevar(
rbc_ptr timedvar
)
- Given a variable which belongs to a timed block of
variables, returns the corrisponding state variable
- Side Effects ...
- Defined in
bmcVarsMgr.c
int
Bmc_VarIndex2StateVarIndex(
int varIdx
)
- Given the index of a timed variable, returns the index
of the corresponding state variable
- Defined in
bmcVarsMgr.c
int
Bmc_VarIndex2Time(
int varIdx
)
- A current variable index returns 0, a next variable
returns 1, a timed variable returns its time (p0 returns 0, p1 returns 1,
and so on)
- Defined in
bmcVarsMgr.c
int
Bmc_VarsMgrGetMaxtime(
)
- Returns the
maximum time currently handled by the variable environment
- Side Effects None
- Defined in
bmcVarsMgr.c
int
Bmc_VarsMgrGetNum(
)
- Returns the
number of variables currently handled by the Variables Manager
- Side Effects None
- Defined in
bmcVarsMgr.c
RbcManager_ptr
Bmc_VarsMgrGetRbcMgr(
)
- Returns the
variable environment data structure
- Side Effects None
- Defined in
bmcVarsMgr.c
int
Bmc_WffListMatchProperty(
node_ptr wffList,
BMC_PF_MATCH pCheck,
void* pCheckOptArgument,
int iMaxMatches,
unsigned int* aiMatchedIndexes,
BMC_PF_MATCH_ANSWER pAnswer,
void* pAnswerOptArgument
)
- This is a generic searching function for a property
across a list of wff. Please note that searching is specific for a list
of wff, but the searching semantic and behaviour are generic and
customizable.
Searching may be stopped after the nth match, or can be continued till all
list elements have been checked (specify -1 in this case).
In any case searching cannot be carried out over the MAX_MATCHES
value.
Arguments:
Parameter name | Description |
wffList | A list of wffs to iterate in |
pCheck | Pointer to matching function.
The checking function type is BMC_PF_MATCH, and has three
parameters:
wff the formula to check for
index index of wff into list
pOpt generic pointer to custom structure (optional) |
pCheckOptArgument | Argument passed to pCheck
(specify NULL if you do not use it.) |
iMaxMatches | Maximum number of matching to be
found before return. This must be less of MAX_MATCHES.
Specify -1 to iterate across the entire list. |
aiMatchedIndexes | Optional int array which
will contain all match indexes.
Specify NULL if you do not need this functionality.
Array size must be less of MAX_MATCHES. |
pAnswer | Pointer to answer function
of type BMC_PF_MATCH_ANSWER. This function is called everytime
a match is found.
Specify NULL if you do not need for this functionality.
The answer function has the following prototype:
void answer(node_ptr wff, int index, void* pOpt)
where:
wff the formula that matches the criteria
index is the index of wff into the list
pOpt pointer to generic & customizable structure
(see pAnswerOptArgument below)
pAnswerOptArgument optional parameter for pAnswer function,
in order to ensure more flexibility. Specify NULL if you do not need
for this functionality.) |
- Side Effects Given aiMatchedIndexes array changes if at least one
match has found out
- Defined in
bmcCheck.c
node_ptr
Bmc_WffMkAnd(
node_ptr arg1,
node_ptr arg2
)
- Make an and WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkBinary(
int type,
node_ptr arg1,
node_ptr arg2
)
- Make a binary WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkConst(
int type
)
- Make a constant WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkEventually(
node_ptr arg
)
- Make an eventually WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkFalsity(
)
- Make a false WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkGlobally(
node_ptr arg
)
- Make a globally WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkIff(
node_ptr arg1,
node_ptr arg2
)
- Make an iff WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkImplies(
node_ptr arg1,
node_ptr arg2
)
- Make an implies WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkNext(
node_ptr arg
)
- Make a next WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkNot(
node_ptr arg
)
- Make a not WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkOpNext(
node_ptr arg
)
- Make an op_next WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkOr(
node_ptr arg1,
node_ptr arg2
)
- Make an or WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkReleases(
node_ptr arg1,
node_ptr arg2
)
- Make a releases WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkTruth(
)
- Make a truth WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkUnary(
int type,
node_ptr arg
)
- Make a unary WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkUntil(
node_ptr arg1,
node_ptr arg2
)
- Make an until WFF
- Side Effects node hash may change
- Defined in
bmcWff.c
node_ptr
Bmc_WffMkXopNext(
node_ptr arg,
int x
)
- Applies op_next x times
- Side Effects node hash may change
- Defined in
bmcWff.c
static sat_result
CallSimSolver(
lsList clauses,
lsList vars,
int maxVar,
int * parms,
lsList lsResult
)
- A simple function to interface a call to Sim.
If the sim solver successfully returns a model, the representation of that
model can be found into the list lsResult, which must be previously created.
Returns:
- SAT_INTERNAL_ERROR if an error occurred
- SAT_UNSATISFIABLE_PROBLEM if the formula is unsatisfiable
- SAT_SATISFIABLE_PROBLEM if the assignment satisfying
the formula. In this case lsResult points to a list of literals
- Side Effects the list lsResult could be changed
- Defined in
bmcSatsolver.c
static void
CnfWriteDimacs(
FILE * outFile,
lsList clauses,
lsList vars,
int maxVar
)
- Ouput a list of clauses as a DIMACS file. The input
file is supposed to be open and closed out of this function.
- Side Effects none
- Defined in
bmcSatsolver.c
static int
CommandBmcLtlsat(
int argc,
char ** argv
)
- Builds a problem for given k and l, then
calls the solver
- See Also
BmcSatSolveProblemKL
- Defined in
bmcCmd.c
static int
CommandBmcSetup(
int argc,
char ** argv
)
- Initializes the bmc sub-system, and builds the model in
RBC format
- Side Effects Overall the bmc system
- Defined in
bmcCmd.c
static int
CommandBmcSimulate(
int argc,
char ** argv
)
- CommandBmcSimulate does not require a specification
to build the problem, because only the model is used to build it.
- Side Effects None
- Defined in
bmcCmd.c
static int
CommandCheckInvarBmc(
int argc,
char ** argv
)
- After command line processing calls Bmc_GenSolveInvar
to solve and eventually dump the generated invariant problem. If you specify
the -o "filename" option a dimacs file will be generated, otherwise
no dimacs dump will be performed
- Side Effects Property database may change
- See Also
Bmc_GenSolveInvar
- Defined in
bmcCmd.c
static int
CommandCheckLtlSpecBmcOnePb(
int argc,
char ** argv
)
- This function saves the current values of environment
variables bmc_length, bmc_loopback and
bmc_dimacs_filename. Then after command line processing it calls
the function Bmc_GenSolvePbs which generates and solve the singleton
problem of length k and loopback l.
Before exit this function restores old values of all modified environment
variables.
- Side Effects Property database may change
- See Also
CommandCheckLtlSpecBmc
Bmc_GenSolvePbs
- Defined in
bmcCmd.c
static int
CommandCheckLtlSpecBmc(
int argc,
char ** argv
)
- This function saves the current values of environment
variables bmc_length, bmc_loopback and
bmc_dimacs_filename. Then after command line processing it calls
the function Bmc_GenSolvePbs which generates and solve all problems from
0 to k.
Before exit this function restores old values of all modified environment
variables.
- Side Effects Property database may change
- See Also
CommandCheckLtlSpecBmcOnePb
Bmc_GenSolvePbs
- Defined in
bmcCmd.c
static int
CommandGenInvarBmc(
int argc,
char ** argv
)
- After command line processing calls Bmc_GenSolveInvar
to dump the generated invariant problem.
If you specify the -o "filename" option a dimacs file named
"filename" will be created, otherwise the environment variable
bmc_invar_dimacs_filename value will be considered.
- Side Effects Property database may change
- See Also
Bmc_GenSolveInvar
- Defined in
bmcCmd.c
static int
CommandGenLtlSpecBmcOnePb(
int argc,
char ** argv
)
- This function saves the current values of environment
variables bmc_length, bmc_loopback and
bmc_dimacs_filename. Then after command line processing it calls
the function Bmc_GenSolvePbs to generate and dump the single problem.
Before exit this function restores old values of all modified environment
variables.
- Side Effects Property database may change
- See Also
CommandGenLtlSpecBmc
Bmc_GenSolvePbs
- Defined in
bmcCmd.c
static int
CommandGenLtlSpecBmc(
int argc,
char ** argv
)
- This function saves the current values of environment
variables bmc_length, bmc_loopback and
bmc_dimacs_filename. Then after command line processing it calls
the function Bmc_GenSolvePbs to generate and dump all problems from
0 to k.
Before exit this function restores old values of all modified environment
variables.
- Side Effects Property database may change
- See Also
CommandGenLtlSpecBmcOnePb
Bmc_GenSolvePbs
- Defined in
bmcCmd.c
static Fsm_RbcPtr
Prop_GetRbcFsmCoi(
Prop_Ptr prop
)
- Applies COI if it is enabled. Uses previuosly built model
if present.
- Side Effects None
- Defined in
bmcCmd.c
static node_ptr
Rbc2bexpDfsData_head(
struct Rbc2bexpDfsData * data
)
- Rbc2bexpDfsData_head
- Side Effects None
- Defined in
bmcRbc2bexp.c
static node_ptr
Rbc2bexpDfsData_pop(
struct Rbc2bexpDfsData * data
)
- Rbc2bexpDfsData_pop
- Side Effects None
- Defined in
bmcRbc2bexp.c
static void
Rbc2bexpDfsData_push(
struct Rbc2bexpDfsData * data,
node_ptr value
)
- Sets a node into the stack
- Side Effects None
- Defined in
bmcRbc2bexp.c
static void
Rbc2bexp_Back(
rbc_ptr rbc,
char * Rbc2bexpData,
int sign
)
- Rbc2bexp_Back
- Side Effects None
- Defined in
bmcRbc2bexp.c
static void
Rbc2bexp_First(
rbc_ptr rbc,
char * Rbc2bexpData,
int sign
)
- Rbc2bexpFirst
- Side Effects None
- Defined in
bmcRbc2bexp.c
static void
Rbc2bexp_Last(
rbc_ptr rbc,
char* Rbc2bexpData,
int sign
)
- Rbc2bexp_Last
- Side Effects None
- Defined in
bmcRbc2bexp.c
static int
Rbc2bexp_Set(
rbc_ptr rbc,
char * Rbc2bexpData,
int sign
)
- Rbc2bexpSet
- Side Effects None
- Defined in
bmcRbc2bexp.c
static int
UsageBmcCheckInvar(
)
- Usage string for command check_invar_bmc
- Side Effects None
- See Also
CommandCheckInvarBmc
- Defined in
bmcCmd.c
static int
UsageBmcCheckLtlSpecOnePb(
)
- Usage string for command check_ltlspec_bmc_onepb
- Side Effects None
- See Also
CommandCheckLtlSpecBmcOnePb
- Defined in
bmcCmd.c
static int
UsageBmcCheckLtlSpec(
)
- Usage string for command check_ltlspec_bmc
- Side Effects None
- See Also
CommandCheckLtlSpecBmc
- Defined in
bmcCmd.c
static int
UsageBmcGenInvar(
)
- Usage string for command gen_invar_bmc
- Side Effects None
- See Also
CommandGenInvarBmc
- Defined in
bmcCmd.c
static int
UsageBmcGenLtlSpecOnePb(
)
- Usage string for command gen_ltlspec_bmc_onepb
- Side Effects None
- See Also
CommandGenLtlSpecBmcOnePb
- Defined in
bmcCmd.c
static int
UsageBmcGenLtlSpec(
)
- Usage string for command gen_ltlspec_bmc
- Side Effects None
- See Also
CommandGenLtlSpecBmc
- Defined in
bmcCmd.c
static int
UsageBmcLtlsat(
)
- Usage string for UsageBmcLtlsat
- Side Effects None
- See Also
bmc_CommandBmcPbGen
- Defined in
bmcCmd.c
static int
UsageBmcSetup(
)
- Usage string for CommandBmcSetup
- See Also
CommandBmcSetup
- Defined in
bmcCmd.c
static int
UsageBmcSimulate(
)
- Usage string for UsageBmcSimulate
- Side Effects None
- See Also
CommandBmcSetup
- Defined in
bmcCmd.c
static int
UsageBmcTestTableau(
)
- Usage string for Bmc_TestTableau
- Side Effects None
- Defined in
bmcTest.c
static void
bmcRestoreDimacsFilenames(
char* szFilenameDimacs,
char* szFilenameInvarDimacs
)
- Use this function to restore dimacs filenames saved using
bmcSaveDimacsFilenames
- Side Effects szFilenameDimacs and szFilenameInvarDimacs will be
deleted
- See Also
bmcSaveDimacsFilenames
- Defined in
bmcCmd.c
static void
bmcSaveDimacsFilenames(
char** szFilenameDimacs,
char** szFilenameInvarDimacs
)
- This function allocates as space as needed to contain
current default dimacs filename string. The given pointer will point to
the just allocated buffer. It is strongly suggested you use function
bmcRestoreDimacsFilename to dealloc the buffer and to restore the original
dimacs filename value
- Side Effects szFilenameDimacs and szFilenameInvarDimacs will change
- See Also
bmcRestoreDimacsFilenames
- Defined in
bmcCmd.c
static void
bmcSave_k_l(
int* k_store,
int* l_store
)
- Use bmcRestore_k_l to restore stored values into
length and loopback
- Side Effects k_store and l_store addressed locations will change
- See Also
bmcRestore_k_l
- Defined in
bmcCmd.c
outcome
bmc_CommandsWith_k_l_OptionsHandling(
int argc,
char ** argv,
Prop_Ptr* pProperty,
Prop_Type type,
int* dimacsSpecified
)
- Handles options of bmc commands
{check,gen}_ltlspec_bmc_*. pProperty will contain the property must
be checked out, or NULL if all properties must be checked. Initial value
of ltlspec *must* be NULL
This function will check the values specified for length and loopback are
compatible with their constrains.
dimacsSpecified will be put to one (1) if the -o option is specified, zero
(0) otherwise.
Returns GENERIC_ERROR if an error has occurred;
Returns SUCCESS_REQUIRED_HELP if -h options had been specified;
Returns SUCCESS in all other cases.
- Side Effects High level options (system environment variables) might
change: make sure to save options before to call this function. pProperty
might change if one or more valid properties are specified. dimacsSpecified
will change if -o option is specified
- Defined in
bmcCmd.c
outcome
bmc_CommandsWithout_k_l_OptionsHandling(
int argc,
char ** argv,
Prop_Ptr* pProperty,
Prop_Type type,
int* dimacsSpecified
)
- Handles options of bmc commands
{check,gen}_invar_bmc_*. pProperty will contain the property must
be checked out, or NULL if all properties must be checked. Initial value
of ltlspec *must* be NULL
dimacsSpecified will be put to one (1) if the -o option is specified, zero
(0) otherwise.
Returns GENERIC_ERROR if an error has occurred;
Returns SUCCESS_REQUIRED_HELP if -h options had been specified;
Returns SUCCESS in all other cases.
- Side Effects High level options (system environment variables) might
change: make sure to save options before to call this function. pProperty
might change if one or more valid properties are specified. dimacsSpecified
will change if -o option is specified
- Defined in
bmcCmd.c
void
bmc_add_valid_wff_to_list(
node_ptr wff,
int index,
void* _pList
)
- private service for
Bmc_CheckFairnessListForPropositionalFormulae
- See Also
Bmc_CheckFairnessListForPropositionalFormulae
- Defined in
bmcCheck.c
int
bmc_check_if_wff_is_valid(
node_ptr wff,
int index,
void* _aiIndexes
)
- private service for
Bmc_CheckFairnessListForPropositionalFormulae
- See Also
Bmc_CheckFairnessListForPropositionalFormulae
- Defined in
bmcCheck.c
node_ptr
bmc_gen_tableau_test(
node_ptr ltl_nnf_wff,
int k,
int l
)
- This function is used to test tableau formulae
- Defined in
bmcTest.c
node_ptr
bmc_gen_wff(
int max_depth,
int max_conns
)
- Builds a random LTL WFF with specified
max depth and max connectives.
- Side Effects node hash may change
- Defined in
bmcTest.c
int
bmc_is_propositional_formula_aux(
node_ptr wff,
int index,
void* pOpt
)
- Wrapper that makes
Bmc_CheckFairnessListForPropositionalFormulae able to call
Bmc_IsPropositionalFormula with a mode generic interface.
Arguments 2 and 3 are practically unused, supplied to respect the generic
interface only.
- See Also
Bmc_CheckFairnessListForPropositionalFormulae
- Defined in
bmcCheck.c
rbc_ptr
bmc_mk_all_loops(
Fsm_RbcPtr rbc_fsm,
int k
)
- Builds the disjunction of all the loops from 0 to k
- Defined in
bmcModel.c
rbc_ptr
bmc_mk_fairness(
Fsm_RbcPtr rbc_fsm,
int k,
int l
)
- Uses bmc_mk_fairness_aux which recursively call itself
to conjuctive all fairnesses by constructing a top-level 'and' operation.
Moreover bmc_mk_fairness_aux calls the recursive function
bmc_mk_one_fairness, which resolves a single fairness as a disjunctioned
expression in which each ORed element is a shifting of the single fairness
across [l, k] if a loop exists. If no loop exists, nothing can be issued,
so a falsity value is returned
- See Also
bmc_mk_fairness_aux
bmc_mk_one_fairness
- Defined in
bmcModel.c
rbc_ptr
bmc_mk_j_k_unrolling(
Fsm_RbcPtr rbc_fsm,
int j,
int k
)
- Using of invars over next variables instead of the
previuos variables is a specific implementation aspect
- See Also
bmc_mk_and_cnexp_interval
- Defined in
bmcModel.c
rbc_ptr
bmc_mk_loopback(
Fsm_RbcPtr rbc_fsm,
int k,
int l
)
- Shifts current and next vars in trans expression
respectively to k and l steps, if a loop exists.
Returns truth if no loop exists
- See Also
Bmc_CurrNextShiftAtTimes
- Defined in
bmcModel.c
rbc_ptr
bmc_mk_releasestableau_at_time_aux(
node_ptr p,
node_ptr q,
int time,
int k,
int l,
int steps
)
- Builds the release operator expression
- Defined in
bmcModel.c
rbc_ptr
bmc_mk_tableau_k_loops_depth1(
Fsm_RbcPtr rbc_fsm,
node_ptr ltl_wff,
int k
)
- Builds the tableau in the case depth==1 as suggested
by Sebastiani
- Defined in
bmcModel.c
rbc_ptr
bmc_mk_tableau_k_loops(
Fsm_RbcPtr rbc_fsm,
node_ptr ltl_wff,
int k,
int l
)
- Each tableau takes into account of fairnesses relative
to its step. All tableau are collected together into a disjunctive form.
- Defined in
bmcModel.c
rbc_ptr
bmc_mk_untiltableau_at_time_aux(
node_ptr p,
node_ptr q,
int time,
int k,
int l,
int steps
)
- auxiliary part of Bmc_MkUntilTableauAtTime
- Side Effects ...
- Defined in
bmcModel.c
int
bmc_succ_k_l_loop(
int time,
int k,
int l
)
- Given time<=k and a [l, k] interval, returns next
time, or BMC_NO_LOOP if time is equal to k and there is no loop
- Side Effects ...
- Defined in
bmcModel.c
void
bmc_vars_mgr_set_env(
RbcManager_ptr pNewEnv
)
- Stores a new variable environment
data structure
- Side Effects None
- Defined in
bmcVarsMgr.c
void
bmc_vars_mgr_set_maxtime(
int iNewMaxtime
)
- Sets the
maximum time currently handled by the variable environment
- Side Effects None
- Defined in
bmcVarsMgr.c
void
bmc_vars_mgr_set_num(
int iNewNum
)
- Sets the
number of variables handled by the Variables Manager
- Side Effects None
- Defined in
bmcVarsMgr.c
static void
freeListOfLists_aux(
lsList list
)
- Private service for BmcIntFreeListOfLists
- See Also
BmcIntFreeListOfLists
- Defined in
bmcUtils.c
static void
scan_state_vars_bexp(
node_ptr state_vars_bexp
)
- Builds all internal structures used in order to
perform searches and conversion from different variable representation
forms
- Side Effects ...
- See Also
bmc_vars_init
- Defined in
bmcVarsMgr.c
(
)
- In command processing functions use this macro to declare all
variables needed to securly save all options might be modified by command
options, but that you do not want any side-effect on those options value
- See Also
BMC_CMD_SAVE_OPTIONS
BMC_CMD_RESTORE_OPTIONS
- Defined in
bmcCmd.c
(
)
- Make sure that all function branches containing a call to
BMC_CMD_SAVE_OPTIONS close their execution with a call to the
BMC_CMD_RESTORE_OPTIONS macro.
- Side Effects Global options will receive the previuosly saved value
- See Also
BMC_CMD_DECL_SAVING_OPTIONS
BMC_CMD_SAVE_OPTIONS
- Defined in
bmcCmd.c
(
)
- Only one shot is allowed for this macro call. Do not call more
than one time! Use BMC_CMD_RESTORE_OPTIONS before exit from any
function branch which has carried out the BMC_CMD_SAVE_OPTIONS macro
- Side Effects Variables delcared using BMC_CMD_DECL_SAVING_OPTIONS will
change
- See Also
BMC_CMD_DECL_SAVING_OPTIONS
BMC_CMD_RESTORE_OPTIONS
- Defined in
bmcCmd.c
(
)
- Use this macro when you need to know if a string representing
loopback value means "all possible loops"
- See Also
BMC_IS_NO_LOOPBACK
- Defined in
bmc.h
(
)
- Use this macro when you need to know if a string representing
loopback value means "no loopback"
- See Also
BMC_IS_ALL_LOOPBACKS
- Defined in
bmc.h