Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
119
Issues
119
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
92dd9a78
Commit
92dd9a78
authored
Apr 05, 2016
by
Andrei Paskevich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move the server code to a dedicated directory
also, do not use server_main.c, compile both .o instead
parent
6bb5875d
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
47 additions
and
65 deletions
+47
-65
.gitignore
.gitignore
+4
-2
Makefile.in
Makefile.in
+23
-49
configure.in
configure.in
+0
-4
src/driver/call_provers.ml
src/driver/call_provers.ml
+1
-1
src/driver/prove_client.ml
src/driver/prove_client.ml
+3
-3
src/server/README.server
src/server/README.server
+0
-6
src/server/arraylist.c
src/server/arraylist.c
+0
-0
src/server/arraylist.h
src/server/arraylist.h
+0
-0
src/server/cpulimit-unix.c
src/server/cpulimit-unix.c
+4
-0
src/server/cpulimit-win.c
src/server/cpulimit-win.c
+4
-0
src/server/logging.c
src/server/logging.c
+0
-0
src/server/logging.h
src/server/logging.h
+0
-0
src/server/options.c
src/server/options.c
+0
-0
src/server/options.h
src/server/options.h
+0
-0
src/server/queue.c
src/server/queue.c
+0
-0
src/server/queue.h
src/server/queue.h
+0
-0
src/server/readbuf.c
src/server/readbuf.c
+0
-0
src/server/readbuf.h
src/server/readbuf.h
+0
-0
src/server/request.c
src/server/request.c
+0
-0
src/server/request.h
src/server/request.h
+0
-0
src/server/server-unix.c
src/server/server-unix.c
+4
-0
src/server/server-win.c
src/server/server-win.c
+4
-0
src/server/writebuf.c
src/server/writebuf.c
+0
-0
src/server/writebuf.h
src/server/writebuf.h
+0
-0
No files found.
.gitignore
View file @
92dd9a78
...
@@ -121,8 +121,10 @@ why3.conf
...
@@ -121,8 +121,10 @@ why3.conf
/doc/stdlibdoc/
/doc/stdlibdoc/
# /lib
# /lib
/lib/why3-cpulimit
/lib/why3cpulimit
/lib/why3-cpulimit.exe
/lib/why3cpulimit.exe
/lib/why3server
/lib/why3server.exe
# /lib/why3/
# /lib/why3/
/lib/why3/META
/lib/why3/META
...
...
Makefile.in
View file @
92dd9a78
...
@@ -248,7 +248,7 @@ opt: lib/why3/why3.cmxa
...
@@ -248,7 +248,7 @@ opt: lib/why3/why3.cmxa
lib/why3/why3.cma
:
lib/why3/why3.cmo
lib/why3/why3.cma
:
lib/why3/why3.cmo
$(
if
$(QUIET)
,@echo
'Linking $@'
&&
)
\
$(
if
$(QUIET)
,@echo
'Linking $@'
&&
)
\
$(OCAMLC)
-a
$(BFLAGS)
-o
$@
$^
$(OCAMLC)
-a
$(BFLAGS)
-o
$@
$^
lib/why3/why3.cmxa
:
lib/why3/why3.cmx
lib/why3/why3.cmxa
:
lib/why3/why3.cmx
$(
if
$(QUIET)
,@echo
'Linking $@'
&&
)
\
$(
if
$(QUIET)
,@echo
'Linking $@'
&&
)
\
...
@@ -614,46 +614,38 @@ clean::
...
@@ -614,46 +614,38 @@ clean::
# Why3server #
# Why3server #
##############
##############
SERVER_MODULES
:=
logging arraylist options queue readbuf request writebuf server_main
SERVER_MODULES
:=
logging arraylist options queue readbuf request
\
SERVER_C
:=
$(
addprefix
src/tools/,
$(
addsuffix
.c,
$(SERVER_MODULES)
))
writebuf server-unix server-win
SERVER_H
:=
$(
addprefix
src/tools/,
$(
addsuffix
.h,
$(SERVER_MODULES)
))
SERVER_O
:=
$(
addprefix
src/tools/,
$(
addsuffix
.o,
$(SERVER_MODULES)
))
CPULIM_MODULES
:=
cpulimit-unix cpulimit-win
SERVER_O
:=
$(
addprefix
src/server/,
$(
addsuffix
.o,
$(SERVER_MODULES)
))
CPULIM_O
:=
$(
addprefix
src/server/,
$(
addsuffix
.o,
$(CPULIM_MODULES)
))
opt
:
lib/why3server$(EXE)
TOOLS
=
lib/why3server
$(EXE)
lib/why3cpulimit
$(EXE)
byte opt
:
$(TOOLS)
lib/why3server$(EXE)
:
$(SERVER_O)
lib/why3server$(EXE)
:
$(SERVER_O)
gcc
-o
$@
$^
$(CC)
-Wall
-o
$@
$^
lib/why3cpulimit$(EXE)
:
$(CPULIM_O)
$(CC)
-Wall
-o
$@
$^
%.o
:
%.c %.h
%.o
:
%.c %.h
gcc
-c
-Wall
-g
-o
$@
$<
$(CC)
-c
-Wall
-g
-o
$@
$<
%.o
:
%.c
gcc
-c
-Wall
-g
-o
$@
$<
src/tools/main.o
::
src/tools/server-unix.c src/tools/server-win.c
%.o
:
%.c
$(CC)
-c
-Wall
-g
-o
$@
$<
install_no_local
::
install_no_local
::
cp
-f
lib/why3server
$(EXE)
$(LIBDIR)
/why3/why3server
$(EXE)
cp
-f
lib/why3server
$(EXE)
$(LIBDIR)
/why3/why3server
$(EXE)
cp
-f
lib/why3cpulimit
$(EXE)
$(LIBDIR)
/why3/why3cpulimit
$(EXE)
cp
-f
lib/why3-call-pvs
$(LIBDIR)
/why3/why3-call-pvs
clean
::
clean
::
rm
-f
$(SERVER_O)
rm
-f
$(SERVER_O)
$(CPULIM_O)
$(TOOLS)
install_spark2014
:
mkdir
-p
$(BINDIR)
mkdir
-p
$(DATADIR)
/why3
mkdir
-p
$(DATADIR)
/why3/theories
mkdir
-p
$(DATADIR)
/why3/drivers
mkdir
-p
$(DATADIR)
/why3/modules
mkdir
-p
$(DATADIR)
/why3/libs
cp
-f
theories/
*
.why
$(DATADIR)
/why3/theories
cp
-f
modules/
*
.mlw
$(DATADIR)
/why3/modules
cp
-f
drivers/
*
.drv drivers/
*
.gen drivers/
*
.aux
$(DATADIR)
/why3/drivers
cp
-f
share/why3session.dtd
$(DATADIR)
/why3
cp
-f
lib/why3server
$(EXE)
$(BINDIR)
/why3server
$(EXE)
cp
-f
bin/gnatwhy3.@OCAMLBEST@
$(BINDIR)
/gnatwhy3
$(EXE)
cp
-f
bin/why3realize.@OCAMLBEST@
$(BINDIR)
/why3realize
$(EXE)
cp
-f
bin/why3config.@OCAMLBEST@
$(BINDIR)
/why3config
$(EXE)
cp
-f
share/provers-detection-data.conf
$(DATADIR)
/why3/
cp
-rf
lib/coq
$(DATADIR)
/why3/libs
##########
##########
# gallery
# gallery
...
@@ -873,7 +865,7 @@ lib/coq-tactic/why3tac.cmxs: lib/why3/why3.cmxa $(COQPCMX)
...
@@ -873,7 +865,7 @@ lib/coq-tactic/why3tac.cmxs: lib/why3/why3.cmxa $(COQPCMX)
$(
if
$(QUIET)
,@echo
'Linking $@'
&&
)
\
$(
if
$(QUIET)
,@echo
'Linking $@'
&&
)
\
$(OCAMLOPT)
$(OFLAGS)
-o
$@
-shared
$^
$(OCAMLOPT)
$(OFLAGS)
-o
$@
-shared
$^
lib/coq-tactic/why3tac.cma
:
src/driver/vc_client.o
lib/why3/why3.cma $(COQPCMO)
lib/coq-tactic/why3tac.cma
:
lib/why3/why3.cma $(COQPCMO)
$(
if
$(QUIET)
,@echo
'Linking $@'
&&
)
\
$(
if
$(QUIET)
,@echo
'Linking $@'
&&
)
\
$(OCAMLC)
-a
$(BFLAGS)
-o
$@
$^
$(OCAMLC)
-a
$(BFLAGS)
-o
$@
$^
...
@@ -1442,24 +1434,6 @@ clean::
...
@@ -1442,24 +1434,6 @@ clean::
endif
endif
#######
# tools
#######
TOOLS
=
lib/why3-cpulimit
$(EXE)
byte opt
:
$(TOOLS)
lib/why3-cpulimit$(EXE)
:
src/tools/@CPULIMIT@.c
$(CC)
-Wall
-o
$@
$^
clean
::
rm
-f
lib/why3-cpulimit
$(EXE)
install_no_local
::
cp
-f
lib/why3-cpulimit
$(EXE)
$(LIBDIR)
/why3/why3-cpulimit
$(EXE)
cp
-f
lib/why3-call-pvs
$(LIBDIR)
/why3/why3-call-pvs
#########
#########
# why3doc
# why3doc
#########
#########
...
...
configure.in
View file @
92dd9a78
...
@@ -140,18 +140,15 @@ AC_MSG_CHECKING(executable suffix)
...
@@ -140,18 +140,15 @@ AC_MSG_CHECKING(executable suffix)
if uname -s | grep -q CYGWIN ; then
if uname -s | grep -q CYGWIN ; then
EXE=.exe
EXE=.exe
STRIP='echo "no strip "'
STRIP='echo "no strip "'
CPULIMIT=cpulimit-win
AC_MSG_RESULT(.exe <Cygwin>)
AC_MSG_RESULT(.exe <Cygwin>)
else
else
if uname -s | grep -q MINGW ; then
if uname -s | grep -q MINGW ; then
EXE=.exe
EXE=.exe
STRIP=strip
STRIP=strip
CPULIMIT=cpulimit-win
AC_MSG_RESULT(.exe <MinGW>)
AC_MSG_RESULT(.exe <MinGW>)
else
else
EXE=
EXE=
STRIP=strip
STRIP=strip
CPULIMIT=cpulimit
AC_MSG_RESULT(<none>)
AC_MSG_RESULT(<none>)
fi
fi
fi
fi
...
@@ -719,7 +716,6 @@ AC_SUBST(enable_verbose_make)
...
@@ -719,7 +716,6 @@ AC_SUBST(enable_verbose_make)
AC_SUBST(EXE)
AC_SUBST(EXE)
AC_SUBST(STRIP)
AC_SUBST(STRIP)
AC_SUBST(CPULIMIT)
AC_SUBST(OCAMLC)
AC_SUBST(OCAMLC)
AC_SUBST(OCAMLOPT)
AC_SUBST(OCAMLOPT)
...
...
src/driver/call_provers.ml
View file @
92dd9a78
...
@@ -267,7 +267,7 @@ let actualcommand command ~use_why3cpulimit limit interactive file =
...
@@ -267,7 +267,7 @@ let actualcommand command ~use_why3cpulimit limit interactive file =
in
in
let
args
=
let
args
=
if
use_why3cpulimit
&&
not
interactive
then
if
use_why3cpulimit
&&
not
interactive
then
let
cpulimit_bin
=
Filename
.
concat
Config
.
libdir
"why3
-
cpulimit"
in
let
cpulimit_bin
=
Filename
.
concat
Config
.
libdir
"why3cpulimit"
in
let
cpulimit_time
=
let
cpulimit_time
=
(* for steps limit use 2 * t + 1 time *)
(* for steps limit use 2 * t + 1 time *)
if
limit
.
limit_steps
<>
None
then
string_of_int
(
2
*
timelimit
+
1
)
if
limit
.
limit_steps
<>
None
then
string_of_int
(
2
*
timelimit
+
1
)
...
...
src/driver/prove_client.ml
View file @
92dd9a78
...
@@ -76,9 +76,9 @@ let run_server () =
...
@@ -76,9 +76,9 @@ let run_server () =
let
force_connect
()
=
let
force_connect
()
=
match
!
socket
with
match
!
socket
with
|
None
when
!
standalone
->
|
None
when
!
standalone
->
run_server
()
;
let
_pid
=
run_server
()
in
(* sleep is needed before connecting,
or the server will not be ready
(* sleep is needed before connecting,
yet *)
or the server will not be ready
yet *)
ignore
(
Unix
.
select
[]
[]
[]
0
.
1
);
ignore
(
Unix
.
select
[]
[]
[]
0
.
1
);
connect
()
connect
()
|
_
->
()
|
_
->
()
...
...
src/
tools/server_main.c
→
src/
server/README.server
View file @
92dd9a78
...
@@ -48,9 +48,3 @@
...
@@ -48,9 +48,3 @@
// events are incoming clients, read/write operations on sockets, and
// events are incoming clients, read/write operations on sockets, and
// terminating child processes. Lists of child processes and connected clients
// terminating child processes. Lists of child processes and connected clients
// are maintained.
// are maintained.
#ifdef _WIN32
# include "server-win.c"
#else
# include "server-unix.c"
#endif
src/
tools
/arraylist.c
→
src/
server
/arraylist.c
View file @
92dd9a78
File moved
src/
tools
/arraylist.h
→
src/
server
/arraylist.h
View file @
92dd9a78
File moved
src/
tools/cpulimit
.c
→
src/
server/cpulimit-unix
.c
View file @
92dd9a78
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
/* */
/* */
/********************************************************************/
/********************************************************************/
#ifndef _WIN32
#include <sys/types.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/time.h>
#include <time.h>
#include <time.h>
...
@@ -145,3 +147,5 @@ int main(int argc, char *argv[]) {
...
@@ -145,3 +147,5 @@ int main(int argc, char *argv[]) {
return
EXIT_FAILURE
;
return
EXIT_FAILURE
;
}
}
#endif
/* _WIN32 */
src/
tools
/cpulimit-win.c
→
src/
server
/cpulimit-win.c
View file @
92dd9a78
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
/* $Id: cpulimit-win.c,v 1.3 2009-12-09 08:28:00 nrousset Exp $ */
/* $Id: cpulimit-win.c,v 1.3 2009-12-09 08:28:00 nrousset Exp $ */
#ifdef _WIN32
#include <windows.h>
#include <windows.h>
#include <stdlib.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdio.h>
...
@@ -203,5 +205,7 @@ int main(int argc, char *argv[]) {
...
@@ -203,5 +205,7 @@ int main(int argc, char *argv[]) {
return
ex
;
return
ex
;
}
}
#endif
/* _WIN32 */
// How to compile under Cygwin (needs make, gcc and win32api):
// How to compile under Cygwin (needs make, gcc and win32api):
// gcc -Wall -o cpulimit cpulimit.c
// gcc -Wall -o cpulimit cpulimit.c
src/
tools
/logging.c
→
src/
server
/logging.c
View file @
92dd9a78
File moved
src/
tools
/logging.h
→
src/
server
/logging.h
View file @
92dd9a78
File moved
src/
tools
/options.c
→
src/
server
/options.c
View file @
92dd9a78
File moved
src/
tools
/options.h
→
src/
server
/options.h
View file @
92dd9a78
File moved
src/
tools
/queue.c
→
src/
server
/queue.c
View file @
92dd9a78
File moved
src/
tools
/queue.h
→
src/
server
/queue.h
View file @
92dd9a78
File moved
src/
tools
/readbuf.c
→
src/
server
/readbuf.c
View file @
92dd9a78
File moved
src/
tools
/readbuf.h
→
src/
server
/readbuf.h
View file @
92dd9a78
File moved
src/
tools
/request.c
→
src/
server
/request.c
View file @
92dd9a78
File moved
src/
tools
/request.h
→
src/
server
/request.h
View file @
92dd9a78
File moved
src/
tools
/server-unix.c
→
src/
server
/server-unix.c
View file @
92dd9a78
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
// Contrary to the situation on windows, e.g. a read event means that the next
// Contrary to the situation on windows, e.g. a read event means that the next
// call to read() will not block.
// call to read() will not block.
#ifndef _WIN32
#include <sys/types.h>
#include <sys/types.h>
#include <unistd.h>
#include <unistd.h>
#include <stdio.h>
#include <stdio.h>
...
@@ -544,3 +546,5 @@ int main(int argc, char **argv) {
...
@@ -544,3 +546,5 @@ int main(int argc, char **argv) {
}
}
}
}
}
}
#endif
/* _WIN32 */
src/
tools
/server-win.c
→
src/
server
/server-win.c
View file @
92dd9a78
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
// windows: you need to start them first, and get notified when they are
// windows: you need to start them first, and get notified when they are
// terminated.
// terminated.
#ifdef _WIN32
#include <windows.h>
#include <windows.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
...
@@ -648,3 +650,5 @@ int main(int argc, char **argv) {
...
@@ -648,3 +650,5 @@ int main(int argc, char **argv) {
}
}
}
}
}
}
#endif
/* _WIN32 */
src/
tools
/writebuf.c
→
src/
server
/writebuf.c
View file @
92dd9a78
File moved
src/
tools
/writebuf.h
→
src/
server
/writebuf.h
View file @
92dd9a78
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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