Commit 0dd39a41 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[lib] MCLAnalyser: Fix typos; doc

parent 50a6315b
......@@ -280,7 +280,7 @@ class MCLAnalyser(object):
if len(dimacs_solutions) == 1:
# No new solution has been found,
# the current solution is the best (sol_to_prune)
return dimacs_solutions[0] # it's sol_to_prune
return dimacs_solutions[0] # it's sol_to_prune variable
# Seach for less activated solution
# Get the solution with the less number of activated states
......@@ -290,6 +290,7 @@ class MCLAnalyser(object):
if is_pruned:
sol_to_prune = next_sol
current_len = next_len
# never reach this point
raise MCLException("MCLAnalyser:__prune_frontier_solution:: what happened??")
......@@ -317,7 +318,7 @@ class MCLAnalyser(object):
# Initialise the unfolder with the given query
# Following properties are used from the query:
# start_prop, dim_start, inv_prop, dim_inv, final_prop, dim_final,
# variant_prop, dim_variant_prop, steps_before_reach
# variant_prop, dim_variant_prop, steps_before_check
self.unfolder.init_with_query(query)
# go
return self.unfolder.squery_is_satisfied(max_step)
......@@ -369,8 +370,10 @@ class MCLAnalyser(object):
@param query: MCLQuery
@param max_step: int - Number of steps allowed in the unfolding;
the horizon on which the properties must be satisfied
@param vvars: variables for which solutions must differ:
list<int> Dimacs code
:param vvars: Variables for which solutions must differ.
In practice, it is a list with the values (Dimacs code)
of all frontier places of the system.
:type vvars: <list <int>>
:return: a list of RawSolutions from the solver
:rtype: <list <RawSolution>>
......@@ -383,7 +386,7 @@ class MCLAnalyser(object):
# Initialise the unfolder with the given query
# Following properties are used from the query:
# start_prop, dim_start, inv_prop, dim_inv, final_prop, dim_final,
# variant_prop, dim_variant_prop, steps_before_reach
# variant_prop, dim_variant_prop, steps_before_check
self.unfolder.init_with_query(query)
# go
return self.unfolder.squery_solve(vvars, max_step, max_sol)
......@@ -556,7 +559,7 @@ class MCLAnalyser(object):
# Get <tuple <DimacsFrontierSol>>
lfsol = self.__sq_dimacs_frontier_solutions(query, max_step, 2)
if not lfsol:
return None
return
# Get the solution with the less number of activated states
small_fsol = self.less_activated_solution(lfsol)
......@@ -590,6 +593,8 @@ class MCLAnalyser(object):
def is_strong_activator(self, act_sol, query):
"""Test if an activation condition is a strong one (independent of timing)
..refactor note: Unclear function
final property becomes the invariant property
=> Ex: test if "C3 and C4" will never append if start property is "A1 and C1 and B1"
......@@ -607,6 +612,8 @@ class MCLAnalyser(object):
def next_inhibitor(self, mac, query):
"""
..refactor note: Unclear function
if st_prop contains negation of mac conditions,
return a different mac if any
same parameters as __mac_exhaustive_search
......@@ -643,6 +650,8 @@ class MCLAnalyser(object):
def mac_inhibitor_search(self, mac, query, max_sol):
"""Search inhibitors for a mac scenario
..refactor note: Unclear function
@param mac: the mac
@param query: the property enforced by the mac
@param max_sol: limit on the number of solutions
......@@ -676,6 +685,8 @@ class MCLAnalyser(object):
"""Test if an activation condition inhibitor is a strong one
(i.e independent of timing)
..refactor note: Unclear function
@param in_sol: FrontierSolution with activation condition and inhibition
@param query: the property which is inhibed
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment