Merge BuDDy 2.3.
* examples/calculator/, examples/internal/: Were renamed as ... * examples/bddcalc/, examples/bddtest/: ... these. * configure.ac: Adjust version and output Makefiles. * examples/Makefile.am (SUBDIRS): Adjust subdir renaming. * examples/cmilner/milner.c, examples/fdd/statespace.cxx: Were renamed as ... * examples/cmilner/cmilner.c, examples/fdd/fdd.cxx: ... these. * examples/cmilner/Makefile.am, examples/fdd/Makefile.am: Adjust accordingly. * src/Makefile.am (AM_CPPFLAGS): Define VERSION.
This commit is contained in:
parent
805b6fb70b
commit
aa4a582f1b
27 changed files with 130 additions and 796 deletions
8
buddy/examples/bddcalc/.cvsignore
Normal file
8
buddy/examples/bddcalc/.cvsignore
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
Makefile.in
|
||||
Makefile
|
||||
lexer.cxx
|
||||
parser.cxx
|
||||
parser.h
|
||||
.deps
|
||||
.libs
|
||||
bddcalc
|
||||
24
buddy/examples/bddcalc/Makefile.am
Normal file
24
buddy/examples/bddcalc/Makefile.am
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
include ../Makefile.def
|
||||
EXTRA_DIST = \
|
||||
readme \
|
||||
example.cal \
|
||||
examples/c432.cal \
|
||||
examples/c499.cal \
|
||||
examples/c1355.cal \
|
||||
examples/c1908.cal \
|
||||
examples/c2670.cal \
|
||||
examples/c3540.cal \
|
||||
examples/readme
|
||||
|
||||
AM_YFLAGS = -d
|
||||
|
||||
BUILT_SOURCES = parser.h
|
||||
|
||||
check_PROGRAMS = bddcalc
|
||||
bddcalc_SOURCES = \
|
||||
hashtbl.h \
|
||||
hashtbl.cxx \
|
||||
lexer.lxx \
|
||||
parser.yxx \
|
||||
parser_.h \
|
||||
slist.h
|
||||
|
|
@ -7,8 +7,8 @@
|
|||
%{
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "parser_.h"
|
||||
#include "parser.h"
|
||||
#include "tokens.h"
|
||||
%}
|
||||
|
||||
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
# ---------------------------
|
||||
# Makefile for BDD calculator
|
||||
# ---------------------------
|
||||
|
||||
all: bddcalc
|
||||
|
||||
# --- Compiler flags
|
||||
CFLAGS = -O3 -pedantic -Wall -ansi -L../../src -I../../src
|
||||
|
||||
# --- C++ compiler
|
||||
CPP = g++
|
||||
|
||||
# --- C compiler
|
||||
CC = gcc
|
||||
|
||||
# --- You may need to change these according to your flex and bison versions
|
||||
parser.cxx: parser.h parser.y
|
||||
yacc -d -o parser.cxx parser.y
|
||||
mv parser.cxx.h tokens.h
|
||||
|
||||
lexer.cxx: tokens.h parser.h lexer.l
|
||||
flex -olexer.cxx lexer.l
|
||||
|
||||
|
||||
# --- Do not touch ---
|
||||
|
||||
.SUFFIXES: .cxx .c
|
||||
|
||||
.cxx.o:
|
||||
$(CPP) $(CFLAGS) -c $<
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
bddcalc: parser.o lexer.o hashtbl.o bddlib
|
||||
$(CPP) $(CFLAGS) parser.o lexer.o hashtbl.o -o bddcalc -lbdd -lm
|
||||
|
||||
bddlib:
|
||||
cd ../../src ; make
|
||||
|
||||
clean:
|
||||
rm -f *~ examples/*~
|
||||
rm -f *.o
|
||||
rm -f bddcalc parser.cxx lexer.cxx
|
||||
|
||||
|
|
@ -6,15 +6,17 @@
|
|||
*************************************************************************/
|
||||
|
||||
%{
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <fstream>
|
||||
#include <getopt.h>
|
||||
#define IMPLEMENTSLIST /* Special for list template handling */
|
||||
#include "slist.h"
|
||||
#include "hashtbl.h"
|
||||
#include "parser.h"
|
||||
|
||||
#include "parser_.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/* Definitions for storing and caching of identifiers */
|
||||
#define inputTag 0
|
||||
#define exprTag 1
|
||||
|
|
@ -64,23 +66,23 @@ void actPrint(token *id);
|
|||
Token definitions
|
||||
*************************************************************************/
|
||||
|
||||
%token T_id, T_str, T_intval, T_true, T_false
|
||||
%token T_id T_str T_intval T_true T_false
|
||||
|
||||
%token T_initial, T_inputs, T_actions
|
||||
%token T_size, T_dumpdot
|
||||
%token T_autoreorder, T_reorder, T_win2, T_win2ite, T_sift, T_siftite, T_none
|
||||
%token T_cache, T_tautology, T_print
|
||||
%token T_initial T_inputs T_actions
|
||||
%token T_size T_dumpdot
|
||||
%token T_autoreorder T_reorder T_win2 T_win2ite T_sift T_siftite T_none
|
||||
%token T_cache T_tautology T_print
|
||||
|
||||
%token T_lpar, T_rpar
|
||||
%token T_lpar T_rpar
|
||||
%token T_equal
|
||||
%token T_semi, T_dot
|
||||
%token T_semi T_dot
|
||||
|
||||
%right T_exist, T_forall, T_dot
|
||||
%right T_exist T_forall T_dot
|
||||
%left T_biimp
|
||||
%left T_imp
|
||||
%left T_or, T_nor
|
||||
%left T_or T_nor
|
||||
%left T_xor
|
||||
%left T_nand, T_and
|
||||
%left T_nand T_and
|
||||
%right T_not
|
||||
|
||||
/*************************************************************************
|
||||
|
|
@ -201,7 +203,6 @@ print:
|
|||
|
||||
void usage(void)
|
||||
{
|
||||
using namespace std ;
|
||||
cerr << "USAGE: bddcalc [-hg] file\n";
|
||||
cerr << " -h : print this message\n";
|
||||
cerr << " -g : disable garbage collection info\n";
|
||||
|
|
@ -210,7 +211,6 @@ void usage(void)
|
|||
|
||||
int main(int ac, char **av)
|
||||
{
|
||||
using namespace std ;
|
||||
int c;
|
||||
|
||||
while ((c=getopt(ac, av, "hg")) != EOF)
|
||||
|
|
@ -389,7 +389,6 @@ void actQuantVar1(token *res, token *id)
|
|||
|
||||
void actSize(token *id)
|
||||
{
|
||||
using namespace std ;
|
||||
hashData hd;
|
||||
|
||||
if (names.lookup(id->id,hd) == 0)
|
||||
|
|
@ -404,7 +403,6 @@ void actSize(token *id)
|
|||
|
||||
void actDot(token *fname, token *id)
|
||||
{
|
||||
using namespace std ;
|
||||
hashData hd;
|
||||
|
||||
if (names.lookup(id->id,hd) == 0)
|
||||
|
|
@ -434,7 +432,6 @@ void actCache(void)
|
|||
|
||||
void actTautology(token *id)
|
||||
{
|
||||
using namespace std ;
|
||||
hashData hd;
|
||||
|
||||
if (names.lookup(id->id,hd) == 0)
|
||||
|
|
@ -451,7 +448,6 @@ void actTautology(token *id)
|
|||
|
||||
void actPrint(token *id)
|
||||
{
|
||||
using namespace std ;
|
||||
hashData hd;
|
||||
|
||||
if (names.lookup(id->id,hd) == 0)
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
#ifndef YYERRCODE
|
||||
#define YYERRCODE 256
|
||||
#endif
|
||||
|
||||
#define T_id 257
|
||||
#define T_str 258
|
||||
#define T_intval 259
|
||||
#define T_true 260
|
||||
#define T_false 261
|
||||
#define T_initial 262
|
||||
#define T_inputs 263
|
||||
#define T_actions 264
|
||||
#define T_size 265
|
||||
#define T_dumpdot 266
|
||||
#define T_autoreorder 267
|
||||
#define T_reorder 268
|
||||
#define T_win2 269
|
||||
#define T_win2ite 270
|
||||
#define T_sift 271
|
||||
#define T_siftite 272
|
||||
#define T_none 273
|
||||
#define T_cache 274
|
||||
#define T_tautology 275
|
||||
#define T_print 276
|
||||
#define T_lpar 277
|
||||
#define T_rpar 278
|
||||
#define T_equal 279
|
||||
#define T_semi 280
|
||||
#define T_dot 281
|
||||
#define T_exist 282
|
||||
#define T_forall 283
|
||||
#define T_biimp 284
|
||||
#define T_imp 285
|
||||
#define T_or 286
|
||||
#define T_nor 287
|
||||
#define T_xor 288
|
||||
#define T_nand 289
|
||||
#define T_and 290
|
||||
#define T_not 291
|
||||
Loading…
Add table
Add a link
Reference in a new issue