Skip to content

Commit

Permalink
Minor public API improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
yrashk committed Feb 29, 2012
1 parent f419c61 commit 48f35b3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/seresye.erl
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ set_client_state(Name, NewState) ->
get_client_state(Name) -> get_client_state(Name) ->
gen_server:call(Name, get_client_state). gen_server:call(Name, get_client_state).


stop (EngineName) -> stop(EngineName) ->
gen_server:call(EngineName, {stop}). (catch gen_server:call(EngineName, stop)),
ok.


get_engine(EngineName) -> get_engine(EngineName) ->
gen_server:call(EngineName, get_engine). gen_server:call(EngineName, get_engine).
Expand All @@ -53,12 +54,12 @@ get_engine(EngineName) ->
%% It also checks if the fact verifies any condition, %% It also checks if the fact verifies any condition,
%% if this is the case the fact is also inserted in the alpha-memory %% if this is the case the fact is also inserted in the alpha-memory
assert(Name, Facts) -> assert(Name, Facts) ->
gen_server:call(Name, {assert, Facts}). gen_server:call(Name, {assert, Facts}, infinity).


%% @doc removes a 'fact' in the Knowledge Base and if something occurs %% @doc removes a 'fact' in the Knowledge Base and if something occurs
%% Condition is also deleted from the corresponding alpha-memory %% Condition is also deleted from the corresponding alpha-memory
retract(Name, Facts) -> retract(Name, Facts) ->
gen_server:call(Name, {retract, Facts}). gen_server:call(Name, {retract, Facts}, infinity).


add_rules(Name, RuleList) add_rules(Name, RuleList)
when is_list(RuleList) orelse is_atom(RuleList) -> when is_list(RuleList) orelse is_atom(RuleList) ->
Expand Down

0 comments on commit 48f35b3

Please sign in to comment.