Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
ff134eb8
Commit
ff134eb8
authored
May 31, 2008
by
Guillaume Sadegh
Browse files
2008-05-29 Guillaume SADEGH <sadegh@lrde.epita.fr>
* Makefile.am, nips.cc, nips.hh: Fix the previous patch.
parent
a48a10e8
Changes
3
Hide whitespace changes
Inline
Side-by-side
iface/nips/Makefile.am
View file @
ff134eb8
...
...
@@ -35,7 +35,7 @@ libspotnips_la_SOURCES = \
nips.cc
noinst_PROGRAMS
=
\
dottynips
dottynips
empt_check
dottynips_SOURCES
=
dottynips.cc
dottynips_LDADD
=
libspotnips.la
$(builddir)
/nips_vm/libnipsvm.la
...
...
iface/nips/nips.cc
View file @
ff134eb8
...
...
@@ -22,6 +22,7 @@
#include
<cassert>
#include
"misc/hashfunc.hh"
#include
"nips.hh"
#include
"nipsvm.h"
namespace
spot
{
...
...
@@ -385,7 +386,8 @@ namespace spot
if
(
bytecode_
==
0
)
throw
nips_exception
(
"bytecode_load_from_file()"
);
int
res
=
nipsvm_init
(
&
nipsvm_
,
bytecode_
,
successor_state_callback
,
nipsvm_
=
new
nipsvm_t
();
int
res
=
nipsvm_init
(
nipsvm_
,
bytecode_
,
successor_state_callback
,
search_error_callback
);
if
(
res
!=
0
)
...
...
@@ -394,12 +396,21 @@ namespace spot
nips_interface
::~
nips_interface
()
{
nipsvm_finalize
(
&
nipsvm_
);
nipsvm_finalize
(
nipsvm_
);
bytecode_unload
(
bytecode_
);
delete
nipsvm_
;
}
bool
nips_interface
::
has_monitor
()
const
{
if
(
bytecode_
==
0
)
throw
nips_exception
(
"The bytecode isn't loaded"
);
return
bytecode_monitor_present
(
bytecode_
);
}
tgba
*
nips_interface
::
automaton
()
{
return
new
tgba_nips
(
dict_
,
&
nipsvm_
);
return
new
tgba_nips
(
dict_
,
nipsvm_
);
}
}
iface/nips/nips.hh
View file @
ff134eb8
...
...
@@ -30,9 +30,10 @@
# include "tgba/tgba.hh"
# include "common.hh"
// Damn, nipsvm.h is include, to fix.
# include "nipsvm.h"
// Fwd declarations.
typedef
struct
nipsvm_t
nipsvm_t
;
typedef
struct
t_bytecode
nipsvm_bytecode_t
;
namespace
spot
{
...
...
@@ -54,10 +55,11 @@ namespace spot
public:
nips_interface
(
bdd_dict
*
dict
,
const
std
::
string
&
filename
);
~
nips_interface
();
bool
has_monitor
()
const
;
tgba
*
automaton
();
private:
bdd_dict
*
dict_
;
nipsvm_t
nipsvm_
;
nipsvm_t
*
nipsvm_
;
nipsvm_bytecode_t
*
bytecode_
;
};
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment