merci fred
This commit is contained in:
parent
e34f3c4396
commit
e0ae1c67f2
|
@ -0,0 +1 @@
|
|||
SUBDIRS = src man1 man3
|
|
@ -0,0 +1,53 @@
|
|||
dnl
|
||||
/*
|
||||
dnl This file is part of the Alliance CAD System
|
||||
dnl Copyright (C) Laboratoire LIP6 - Département ASIM
|
||||
dnl Universite Pierre et Marie Curie
|
||||
dnl
|
||||
dnl Home page : http://www-asim.lip6.fr/alliance/
|
||||
dnl E-mail support : mailto:alliance-support@asim.lip6.fr
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or modify it
|
||||
dnl under the terms of the GNU Library General Public License as published
|
||||
dnl by the Free Software Foundation; either version 2 of the License, or (at
|
||||
dnl your option) any later version.
|
||||
dnl
|
||||
dnl Alliance VLSI CAD System is distributed in the hope that it will be
|
||||
dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
dnl Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License along
|
||||
dnl with the GNU C Library; see the file COPYING. If not, write to the Free
|
||||
dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
dnl
|
||||
dnl Purpose : Auto stuffing Alliance
|
||||
dnl Almost ten years since I wrote this stuff, I just can't
|
||||
dnl believe it
|
||||
dnl Date : 01/02/2002
|
||||
dnl Author : Frederic Petrot <Frederic.Petrot@lip6.fr>
|
||||
dnl $Id: configure.in,v 1.1 2002/03/18 11:06:15 ludo Exp $
|
||||
dnl
|
||||
dnl
|
||||
AC_INIT(src/abl.h)
|
||||
AM_INIT_AUTOMAKE(abl, 2.1)
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CC
|
||||
AC_HEADER_STDC
|
||||
AC_C_CONST
|
||||
AC_PROG_RANLIB
|
||||
|
||||
changequote(,)dnl
|
||||
INCLUDES=-I${ALLIANCE_TOP}/include
|
||||
LDFLAGS=-L${ALLIANCE_TOP}/lib
|
||||
changequote([,])dnl
|
||||
|
||||
AC_SUBST(INCLUDES)
|
||||
AC_SUBST(LDFLAGS)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
man1/Makefile
|
||||
man3/Makefile
|
||||
])
|
|
@ -0,0 +1 @@
|
|||
man_MANS = abl.1
|
|
@ -0,0 +1,216 @@
|
|||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ../..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
CC = @CC@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
|
||||
man_MANS = abl.1
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
man1dir = $(mandir)/man1
|
||||
MANS = $(man_MANS)
|
||||
|
||||
NROFF = nroff
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/man1/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
install-man1:
|
||||
$(mkinstalldirs) $(DESTDIR)$(man1dir)
|
||||
@list='$(man1_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
|
||||
uninstall-man1:
|
||||
@list='$(man1_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
rm -f $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
install-man: $(MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-man1
|
||||
uninstall-man:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) uninstall-man1
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = doc/man1
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign doc/man1/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am: install-man
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-man
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(MANS)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(mandir)/man1
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-generic clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: install-man1 uninstall-man1 install-man uninstall-man tags \
|
||||
distdir info-am info dvi-am dvi check check-am installcheck-am \
|
||||
installcheck install-exec-am install-exec install-data-am install-data \
|
||||
install-am install uninstall-am uninstall all-redirect all-am all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,235 @@
|
|||
.\" $Id: abl.1,v 1.1 2002/03/18 11:06:15 ludo Exp $
|
||||
.\" @(#)log.l 0.0 92/08/01 UPMC; Author: Luc Burgun
|
||||
.pl -.4
|
||||
.TH ABL 1 "October 1, 1997" "ASIM/LIP6" "cao\-vlsi reference manual"
|
||||
.SH NAME
|
||||
\fBabl\fP \- Prefixed representation for boolean functions
|
||||
.so man1/alc_origin.1
|
||||
.SH DESCRIPTION
|
||||
\fIlibablmmm.a\fP is a library that enables to represent a boolean function in a LISP-like form. An ABL is a prefixed internal representation for a boolean function having standard operators as OR,NOR,NAND,XOR,NOT and AND. An ABL is only made up of doublets. A doublet is composed of two fields wich are accessible by the functionnal \fI#define\fP \fICAR\fP and \fICDR\fP. A doublet is implemented with a MBK \fIchain_list\fP.
|
||||
.br
|
||||
\fIExpression\fP is the generic term for a boolean function represented by an ABL. An expression can be an atomic expression or an operator expression. The function \fBf = a\fP is represented by an atomic expression whereas \fBf = (or a b)\fP is represented by an operator expression. An atomic expression is made up of a single doublet having the \fINEXT\fP pointer equal to NULL and \fIDATA\fP pointer equal to the identifier pointer. A constant atomic expression is an atomic expression having the string "'0'" or "'1'" as identifier.
|
||||
.br
|
||||
An operator expression is more complicated than an atomic expression. It's a list of items, the first item is the head operator of the expression and the following items are the arguments of the expression. It's possible to go trough the arguments by calling the functionnal \fI#define\fP \fICDR\fP. Then each argument is accessible by the functionnal \fI#define\fP \fICAR\fP. An argument can be recursively an atomic or an operator expression. The arity of an operator expression is the number of arguments of the first level.
|
||||
.br
|
||||
.br
|
||||
Functions are divided into two groups, the low level functions are written with \fI#define\fP and are used to manage the ABL internal form, the high level functions are used to manage the boolean expressions. All functions are defined in the file "prefbib.c" (\fI#define\fP in "logmmm.h").
|
||||
.TP
|
||||
\fIFunctionnal #define\fP
|
||||
.TP 20
|
||||
\fBATOM\fP
|
||||
\- checks the kind of an expression (atomic or operator expression).
|
||||
.TP 20
|
||||
\fBCAR\fP
|
||||
\- returns the \fIDATA\fP pointer of a doublet.
|
||||
.TP 20
|
||||
\fBCADR\fP
|
||||
\- returns the \fIDATA\fP pointer of the \fINEXT\fP pointer of a doublet.
|
||||
.TP 20
|
||||
\fBCDR\fP
|
||||
\- returns the \fINEXT\fP pointer of a doublet.
|
||||
.TP 20
|
||||
\fBOPER\fP
|
||||
\- returns the operator number of an operator expression.
|
||||
.TP 20
|
||||
\fBVALUE_ATOM\fP
|
||||
\- returns the associated \fIchar *\fP of an atomic expression.
|
||||
.br
|
||||
.TP
|
||||
\fIFunctions and procedures\fP
|
||||
.TP 20
|
||||
\fBaddHExpr\fP
|
||||
\- adds a new arguments at the head of an operator expression.
|
||||
.TP 20
|
||||
\fBaddQExpr\fP
|
||||
\- adds a new arguments at the queue of an operator expression.
|
||||
.TP 20
|
||||
\fBanyExpr\fP
|
||||
\- returns the value of a logical OR applied on the results of the application of a function on the arguments of an operator expression.
|
||||
.TP 20
|
||||
\fBchangeOperExpr\fP
|
||||
\- changes the operator of the head of an expression.
|
||||
.TP 20
|
||||
\fBcharToOper\fP
|
||||
\- converts an operator string into an operator number.
|
||||
.TP 20
|
||||
\fBcopyExpr\fP
|
||||
\- copies an expression.
|
||||
.TP 20
|
||||
\fBcreateAtom\fP
|
||||
\- creates an atomic expression.
|
||||
.TP 20
|
||||
\fBcreateBinExpr\fP
|
||||
\- creates a binary operator expression with an eventual merging of the operator.
|
||||
.TP 20
|
||||
\fBcreateExpr\fP
|
||||
\- creates the head of an operator expression.
|
||||
.TP 20
|
||||
\fBdeleteNumExpr\fP
|
||||
\- removes the i-th argument in an operator expression.
|
||||
.TP 20
|
||||
\fBdevXor2Expr\fP
|
||||
\- converts XOR 2 to OR-AND.
|
||||
.TP 20
|
||||
\fBdevXorExpr\fP
|
||||
\- removes XOR in an expression.
|
||||
.TP 20
|
||||
\fBdisplayExpr\fP
|
||||
\- displays an expression in a prefixed notation.
|
||||
.TP 20
|
||||
\fBdisplayInfExpr\fP
|
||||
\- displays an expression in infixed notation.
|
||||
.TP 20
|
||||
\fBequalExpr\fP
|
||||
\- checks that two expressions are strictly equal.
|
||||
.TP 20
|
||||
\fBequalVarExpr\fP
|
||||
\- checks that two expressions are syntactically equal.
|
||||
.TP 20
|
||||
\fBeveryExpr\fP
|
||||
\- returns the value of a logical AND applied on the results of the application of a function on the arguments of an operator expression.
|
||||
.TP 20
|
||||
\fBexprToChar\fP
|
||||
\- converts an expression into a string.
|
||||
.TP 20
|
||||
\fBcharToExpr\fP
|
||||
\- converts a string into an expression.
|
||||
.TP 20
|
||||
\fBflatArityExpr\fP
|
||||
\- flattens the operators of an expression.
|
||||
.TP 20
|
||||
\fBflatPolarityExpr\fP
|
||||
\- translates the inverters of an expression to the level of atomic expressions.
|
||||
.TP 20
|
||||
\fBfreeExpr\fP
|
||||
\- frees an expression.
|
||||
.TP 20
|
||||
\fBidentExpr\fP
|
||||
\- gives an identifier from an operator expression.
|
||||
.TP 20
|
||||
\fBlengthExpr\fP
|
||||
\- returns the number of arguments in an expression.
|
||||
.TP 20
|
||||
\fBmapCarExpr\fP
|
||||
\- creates a new expression by applying a function to all arguments of an operator expression.
|
||||
.TP 20
|
||||
\fBmapExpr\fP
|
||||
\- applies a procedure to all the arguments of an operator expression.
|
||||
.TP 20
|
||||
\fBmaxExpr\fP
|
||||
\- returns the highest argument of an operator expression.
|
||||
.TP 20
|
||||
\fBminExpr\fP
|
||||
\- returns the lowest argument of an operator expression.
|
||||
.TP 20
|
||||
\fBnormExpr\fP
|
||||
\- normalizes an expression.
|
||||
.TP 20
|
||||
\fBnotExpr\fP
|
||||
\- complements an expression and eventually does a simplification.
|
||||
.TP 20
|
||||
\fBnumberAtomExpr\fP
|
||||
\- returns the number of atoms in an expression.
|
||||
.TP 20
|
||||
\fBnumberOccExpr\fP
|
||||
\- returns the number of time an atom appears in an expression.
|
||||
.TP 20
|
||||
\fBnumberOperBinExpr\fP
|
||||
\- returns the number of equivalent binary operators in an expression.
|
||||
.TP 20
|
||||
\fBoperToChar\fP
|
||||
\- converts an operator number into an operator string.
|
||||
.TP 20
|
||||
\fBprofExpr\fP
|
||||
\- returns the depth of an expression.
|
||||
.TP 20
|
||||
\fBprofAOExpr\fP
|
||||
\- returns the depth of an expression without taking the inverters into account.
|
||||
.TP 20
|
||||
\fBsearchExpr\fP
|
||||
\- searches for a specific atom in an expression.
|
||||
.TP 20
|
||||
\fBsearchNumExpr\fP
|
||||
\- fetches the i-th argument in an operator expression.
|
||||
.TP 20
|
||||
\fBsearchOperExpr\fP
|
||||
\- searches for an operator in an expression.
|
||||
.TP 20
|
||||
\fBsimplif10Expr\fP
|
||||
\- makes simplifications on an expression including constant atomic expressions.
|
||||
.TP 20
|
||||
\fBsimplifNotExpr\fP
|
||||
\- makes simplifications on an expression including inverters.
|
||||
.TP 20
|
||||
\fBsortExpr\fP
|
||||
\- sorts an expression.
|
||||
.TP 20
|
||||
\fBsubstExpr\fP
|
||||
\- copies an expression by substituting a given atom by an expression.
|
||||
.TP 20
|
||||
\fBsubstPhyExpr\fP
|
||||
\- substitutes an atomic expression by an expression within an expression.
|
||||
.TP 20
|
||||
\fBsupportChain_listExpr\fP
|
||||
\- returns the support of an expression in a \fIchain_list\fP.
|
||||
.TP 20
|
||||
\fBsupportPtype_listExpr\fP
|
||||
\- returns the support of an expression in a \fIptype_list\fP.
|
||||
.TP 20
|
||||
\fBwPMExpr\fP
|
||||
\- returns 1 if the pattern matching is possible between two expressions.
|
||||
|
||||
.br
|
||||
.SH SEE ALSO
|
||||
.BR log (1),
|
||||
.BR mbk (1),
|
||||
.BR addHExpr (3),
|
||||
.BR addQExpr (3),
|
||||
.BR anyExpr (3),
|
||||
.BR changeOperExpr (3),
|
||||
.BR charToExpr (3),
|
||||
.BR charToOper (3),
|
||||
.BR copyExpr (3),
|
||||
.BR createAtom (3),
|
||||
.BR createBinExpr (3),
|
||||
.BR createExpr (3),
|
||||
.BR deleteNumExpr (3),
|
||||
.BR devXor2Expr (3),
|
||||
.BR devXorExpr (3),
|
||||
.BR displayExpr (3),
|
||||
.BR displayInfExpr (3),
|
||||
.BR equalExpr (3),
|
||||
.BR equalVarExpr (3),
|
||||
.BR everyExpr (3),
|
||||
.BR exprToChar (3),
|
||||
.BR flatArityExpr (3),
|
||||
.BR flatPolarityExpr (3),
|
||||
.BR freeExpr (3),
|
||||
.BR identExpr (3),
|
||||
.BR lengthExpr (3),
|
||||
.BR mapCarExpr (3),
|
||||
.BR mapExpr (3),
|
||||
.BR maxExpr (3),
|
||||
.BR minExpr (3),
|
||||
.BR notExpr (3),
|
||||
.BR normExpr (3),
|
||||
.BR numberAtomExpr (3),
|
||||
.BR numberOccExpr (3),
|
||||
.BR numberOperBinExpr (3),
|
||||
.BR operToChar (3),
|
||||
.BR profExpr (3),
|
||||
.BR profAOExpr (3),
|
||||
.BR searchExpr (3),
|
||||
.BR searchNumExpr (3),
|
||||
.BR searchOperExpr (3),
|
||||
.BR simplif10Expr (3),
|
||||
.BR simplifNotExpr (3),
|
||||
.BR sortExpr (3),
|
||||
.BR substExpr (3),
|
||||
.BR substPhyExpr (3),
|
||||
.BR supportChain_listExpr (3),
|
||||
.BR supportPtype_listExpr (3).
|
||||
.BR PMExpr (3).
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
man_MANS = addablhexpr.3 getablexprlength.3 mapablexpr.3 \
|
||||
addablqexpr.3 getablexprmax.3 mapabloperexpr.3 \
|
||||
createablatom.3 getablexprmin.3 polarablexpr.3 \
|
||||
createablbinexpr.3 getablexprnum.3 polardupablexpr.3 \
|
||||
createablnotexpr.3 getablexprnumatom.3 simpablexpr.3 \
|
||||
createabloper.3 getablexprnumbinoper.3 simpdupablexpr.3 \
|
||||
createablunaryexpr.3 getablexprnumocc.3 substablexpr.3 \
|
||||
createablxorbinexpr.3 getablexprsupport.3 substdupablexpr.3 \
|
||||
delablexpr.3 isablbinaryoper.3 unflatablexpr.3 \
|
||||
delablexprnum.3 isablequalexpr.3 vhdlablname.3 \
|
||||
devablxorexpr.3 isablnameinexpr.3 vhdlablvector.3 \
|
||||
devdupablxorexpr.3 isabloperinexpr.3 viewablexpr.3 \
|
||||
dupablexpr.3 isablsimilarexpr.3 viewablexprfile.3 \
|
||||
flatablexpr.3 isablunaryoper.3 viewablexprstr.3 \
|
||||
freeablexpr.3 mapablanyexpr.3 \
|
||||
getablexprdepth.3 mapableveryexpr.3
|
|
@ -0,0 +1,217 @@
|
|||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ../..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
CC = @CC@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
|
||||
man_MANS = addablhexpr.3 getablexprlength.3 mapablexpr.3 addablqexpr.3 getablexprmax.3 mapabloperexpr.3 createablatom.3 getablexprmin.3 polarablexpr.3 createablbinexpr.3 getablexprnum.3 polardupablexpr.3 createablnotexpr.3 getablexprnumatom.3 simpablexpr.3 createabloper.3 getablexprnumbinoper.3 simpdupablexpr.3 createablunaryexpr.3 getablexprnumocc.3 substablexpr.3 createablxorbinexpr.3 getablexprsupport.3 substdupablexpr.3 delablexpr.3 isablbinaryoper.3 unflatablexpr.3 delablexprnum.3 isablequalexpr.3 vhdlablname.3 devablxorexpr.3 isablnameinexpr.3 vhdlablvector.3 devdupablxorexpr.3 isabloperinexpr.3 viewablexpr.3 dupablexpr.3 isablsimilarexpr.3 viewablexprfile.3 flatablexpr.3 isablunaryoper.3 viewablexprstr.3 freeablexpr.3 mapablanyexpr.3 getablexprdepth.3 mapableveryexpr.3
|
||||
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
man3dir = $(mandir)/man3
|
||||
MANS = $(man_MANS)
|
||||
|
||||
NROFF = nroff
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/man3/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
install-man3:
|
||||
$(mkinstalldirs) $(DESTDIR)$(man3dir)
|
||||
@list='$(man3_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.3*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst"; \
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst; \
|
||||
done
|
||||
|
||||
uninstall-man3:
|
||||
@list='$(man3_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.3*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f $(DESTDIR)$(man3dir)/$$inst"; \
|
||||
rm -f $(DESTDIR)$(man3dir)/$$inst; \
|
||||
done
|
||||
install-man: $(MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-man3
|
||||
uninstall-man:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) uninstall-man3
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = doc/man3
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign doc/man3/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am: install-man
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-man
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(MANS)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(mandir)/man3
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-generic clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: install-man3 uninstall-man3 install-man uninstall-man tags \
|
||||
distdir info-am info dvi-am dvi check check-am installcheck-am \
|
||||
installcheck install-exec-am install-exec install-data-am install-data \
|
||||
install-am install uninstall-am uninstall all-redirect all-am all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,62 @@
|
|||
.\" $Id: addablhexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)addablhexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH ADDABLHEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
addablhexpr \- adds a new argument in head of an expression.
|
||||
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
void addablhexpr( Expr1, Expr2 )
|
||||
chain_list *Expr1;
|
||||
chain_list *Expr2;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr1\fP
|
||||
First expression.
|
||||
.TP
|
||||
\fIExpr2\fP
|
||||
Second expression.
|
||||
.SH DESCRIPTION
|
||||
\fBaddablhexpr\fP adds \fIExpr2\fP in head of \fIExpr1\fP.
|
||||
The expression pointers \fIExpr2\fP MUSTN'T be used after
|
||||
the call to this function
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBaddablhexpr\fP returns nothing.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
Expr = createabloper( ABL_OR );
|
||||
addablhexpr( Expr, createablatom( "a" ) );
|
||||
addablhexpr( Expr, createablatom( "b" ) );
|
||||
/* displays (a or b) */
|
||||
viewablexpr( Expr, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
.BR createablatom(3),
|
||||
.BR createabloper(3),
|
||||
.BR createablxorbinexpr(3),
|
||||
.BR createablunaryexpr(3),
|
||||
.BR createablbinexpr(3),
|
||||
.BR createablnotexpr(3),
|
||||
.BR addablqexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
.\" $Id: addablqexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)addablqexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH ADDABLQEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
addablqexpr \- adds a new argument in queue of an expression.
|
||||
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
void addablqexpr( Expr1, Expr2 )
|
||||
chain_list *Expr1;
|
||||
chain_list *Expr2;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr1\fP
|
||||
First expression.
|
||||
.TP
|
||||
\fIExpr2\fP
|
||||
Second expression.
|
||||
.SH DESCRIPTION
|
||||
\fBaddablqexpr\fP adds \fIExpr2\fP in queue of \fIExpr1\fP.
|
||||
The expression pointers \fIExpr2\fP MUSTN'T be used after
|
||||
the call to this function
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBaddablqexpr\fP returns nothing.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
Expr = createabloper( ABL_OR );
|
||||
addablqexpr( Expr, createablatom( "a" ) );
|
||||
addablqexpr( Expr, createablatom( "b" ) );
|
||||
/* displays (a or b) */
|
||||
viewablexpr( Expr, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
.BR createablatom(3),
|
||||
.BR createabloper(3),
|
||||
.BR createablxorbinexpr(3),
|
||||
.BR createablunaryexpr(3),
|
||||
.BR createablbinexpr(3),
|
||||
.BR createablnotexpr(3),
|
||||
.BR addablhexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
.\" $Id: createablatom.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)createablatom.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH CREATEABLATOM 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
createablatom \- creates an atomic expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**createablatom( Atom )
|
||||
char \(**Atom;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIAtom\fP
|
||||
Name of the atom.
|
||||
.SH DESCRIPTION
|
||||
\fBcreateablatom\fP creates an atomic expression with the name \fIAtom\fP.
|
||||
This function uses \fInamealloc\fP with \fIAtom\fP as parameter.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBcreateablatom\fP returns a pointer to the new atomic expression.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**ExprA;
|
||||
chain_list \(**ExprB;
|
||||
chain_list \(**ExprAorB;
|
||||
ExprA = createablatom( "a" );
|
||||
ExprB = createablatom( "b" );
|
||||
ExprAorB = createablbinexpr( ABL_OR, ExprA, ExprB );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR createabloper(3),
|
||||
.BR createablnotexpr(3),
|
||||
.BR createablbinexpr(3),
|
||||
.BR createablunaryexpr(3),
|
||||
.BR createablxorbinexpr(3),
|
||||
.BR addablhexpr(3),
|
||||
.BR addablqexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
.\" $Id: createablbinexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)createablbinexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH CREATEABLBINEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
createablbinexpr \- creates a binary operator expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**createablbinexpr( Oper, Expr1, Expr2 )
|
||||
long Oper;
|
||||
chain_list \(**Expr1;
|
||||
chain_list \(**Expr2;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIOper\fP
|
||||
The operator number.
|
||||
.TP
|
||||
\fIExpr1\fP
|
||||
The first expression.
|
||||
.TP
|
||||
\fIExpr2\fP
|
||||
The second expression.
|
||||
.SH DESCRIPTION
|
||||
\fBcreateablbinexpr\fP creates the binary operator expression
|
||||
\fIExpr1\fP \fIOperator\fP \fIExpr2\fP. If the operator of \fIExpr1\fP
|
||||
and/or \fIExpr2\fP, and \fIOperator\fP are identicals \fBcreateablbinexpr\fP
|
||||
merges eventually the sub-expressions. The expression pointers \fIExpr1\fP
|
||||
and \fIExpr2\fP MUSTN'T be used after the call to this function.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBcreateablbinexpr\fP returns a pointer to the new operator expression.
|
||||
.SH ERRORS
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
"ablcreate: bad operator xx !",
|
||||
.ft R
|
||||
.RS
|
||||
\fIOperator\fP must be defined and must be a binary operator.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**ExprA;
|
||||
chain_list \(**ExprB;
|
||||
chain_list \(**ExprAorB;
|
||||
ExprA = createablatom( "a" );
|
||||
ExprB = createablatom( "b" );
|
||||
ExprAorB = createablbinexpr( ABL_OR, ExprA, ExprB );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
.BR createablatom(3),
|
||||
.BR createabloper(3),
|
||||
.BR createablxorbinexpr(3),
|
||||
.BR createablunaryexpr(3),
|
||||
.BR createablnotexpr(3),
|
||||
.BR addablhexpr(3),
|
||||
.BR addablqexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
.\" $Id: createablnotexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)createablnotexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH CREATEABLNOTEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
createablnotexpr \- complements an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**createablnotexpr( Expr )
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
The expression to be complemented.
|
||||
.SH DESCRIPTION
|
||||
\fBcreateablnotexpr\fP complements the expression \fIExpr\fP and
|
||||
eventually does a simplification. The expression pointer \fIExpr\fP
|
||||
MUSTN'T be used after the call to this function.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBcreateablnotexpr\fP returns the new complemented expression.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**ExprA;
|
||||
chain_list \(**ExprNotA;
|
||||
ExprA = createablatom( "a" );
|
||||
ExprNotA = createablnotexpr( ExprA );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
.BR createablatom(3),
|
||||
.BR createabloper(3),
|
||||
.BR createablbinexpr(3),
|
||||
.BR createablunaryexpr(3),
|
||||
.BR createablxorbinexpr(3),
|
||||
.BR addablhexpr(3),
|
||||
.BR addablqexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
.\" $Id: createabloper.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)createabloper.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH CREATEABLOPER 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
createabloper \- creates the head of an operator expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**createabloper( Oper )
|
||||
long Oper;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIOper\fP
|
||||
The operator number.
|
||||
.SH DESCRIPTION
|
||||
\fBcreateabloper\fP creates the head of an operator expression.
|
||||
Arguments can be added to this expression with the \fIaddablhexpr\fP
|
||||
and \fIaddablqexpr\fP functions.
|
||||
\fIOperator\fP can take the following values ABL_AND, ABL_OR,
|
||||
ABL_AND, ABL_XOR, ABL_NOT, ABL_NOR, ABL_NAND, ABL_NXOR,
|
||||
ABL_STABLE, ABL_AF, ABL_AG, ABL_AX, ABL_AU, ABL_EF, ABL_EG, ABL_EX, ABL_EU.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBcreateabloper\fP returns a pointer to the new operator expression.
|
||||
.SH ERRORS
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
"ablcreate: bad operator xx !",
|
||||
.ft R
|
||||
.RS
|
||||
The operator number must be defined.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
Expr = createabloper( ABL_OR );
|
||||
addablhexpr( Expr, createablatom( "a" ) );
|
||||
addablhexpr( Expr, createablatom( "b" ) );
|
||||
/* displays (a or b) */
|
||||
viewablexpr( Expr, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
.BR createablatom(3),
|
||||
.BR createablnotexpr(3),
|
||||
.BR createablbinexpr(3),
|
||||
.BR createablunaryexpr(3),
|
||||
.BR createablxorbinexpr(3),
|
||||
.BR addablhexpr(3),
|
||||
.BR addablqexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
.\" $Id: createablunaryexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)createablunaryexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH CREATEABLUNARYEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
createablunaryexpr \- creates an unary operator expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**createablunaryexpr( Oper, Expr )
|
||||
long Oper;
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIOper\fP
|
||||
The unary operator number.
|
||||
.TP
|
||||
\fIExpr\fP
|
||||
Expression.
|
||||
.SH DESCRIPTION
|
||||
\fBcreateablunaryexpr\fP creates the unary operator expression
|
||||
\fIOperator\fP \fIExpr\fP. \fBcreateablbinexpr\fP combines
|
||||
eventualy the operator of \fIExpr\fP with \fIOperator\fP.
|
||||
The expression pointer \fIExpr\fP MUSTN'T be used after
|
||||
the call to this function.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBcreateablunaryexpr\fP returns a pointer to the new operator expression.
|
||||
.SH ERRORS
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
"ablcreate: bad operator xx !",
|
||||
.ft R
|
||||
.RS
|
||||
\fIOperator\fP must be defined and must be a unary operator.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**ExprA;
|
||||
chain_list \(**ExprB;
|
||||
chain_list \(**ExprAorB;
|
||||
chain_list \(**ExprAnorB;
|
||||
ExprA = createablatom( "a" );
|
||||
ExprB = createablatom( "b" );
|
||||
ExprAorB = createablbinexpr( ABL_OR, ExprA, ExprB );
|
||||
ExprAnorB = createablunaryexpr( ABL_NOT, ExprAorB );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
.BR createablatom(3),
|
||||
.BR createabloper(3),
|
||||
.BR createablnotexpr(3),
|
||||
.BR createablbinexpr(3),
|
||||
.BR createablxorbinexpr(3),
|
||||
.BR addablhexpr(3),
|
||||
.BR addablqexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
.\" $Id: createablxorbinexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)createablxorbinexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH CREATEABLXORBINEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
createablxorbinexpr \- creates an 'xor' or 'xnor' operator expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list *createablxorbinexpr( Oper, Expr1, Expr2 )
|
||||
long Oper;
|
||||
chain_list \(**Expr1;
|
||||
chain_list \(**Expr2;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIOper\fP
|
||||
Operator ABL_XOR or ABL_NXOR.
|
||||
.TP
|
||||
\fIExpr1\fP
|
||||
First expression.
|
||||
.TP
|
||||
\fIExpr2\fP
|
||||
Second expression.
|
||||
.SH DESCRIPTION
|
||||
\fBcreateablxorbinexpr\fP creates a binary 'xor' or 'xnor'
|
||||
operator expression with the 'and', 'or' form. \fBcreateablbinexpr\fP
|
||||
simplifies eventually the sub-expressions.
|
||||
The expression pointers \fIExpr1\fP and \fIExpr2\fP MUSTN'T
|
||||
be used after the call to this function.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBcreateablxorbinexpr\fP returns a pointer to the new operator expression.
|
||||
.SH ERRORS
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
"ablcreate: bad operator xx !",
|
||||
.ft R
|
||||
.RS
|
||||
\fIOperator\fP must be ABL_XOR or ABL_NXOR.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**ExprA;
|
||||
chain_list \(**ExprB;
|
||||
chain_list \(**ExprAxorB;
|
||||
ExprA = createablatom( "a" );
|
||||
ExprB = createablatom( "b" );
|
||||
ExprAxorB = createablxorbinexpr( ABL_XOR, ExprA, ExprB );
|
||||
/* displays (a and (not b) or (b and (not a)) */
|
||||
viewablexpr( ExprAxorB, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
.BR abl (1)
|
||||
.BR createablatom(3),
|
||||
.BR createabloper(3),
|
||||
.BR createablbinexpr(3),
|
||||
.BR createablunaryexpr(3),
|
||||
.BR createablnotexpr(3),
|
||||
.BR addablhexpr(3),
|
||||
.BR addablqexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
.\" $Id: delablexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)delablexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH DELABLEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
delablexpr \- deletes an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
void delablexpr( Expr )
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression to delete.
|
||||
.SH DESCRIPTION
|
||||
\fBdelablexpr\fP deletes the expression \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBdelablexpr\fP returns nothing.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**ExprA;
|
||||
chain_list \(**ExprB;
|
||||
chain_list \(**ExprAorB;
|
||||
ExprA = createablatom( "a" );
|
||||
ExprB = createablatom( "b" );
|
||||
ExprAorB = createablbinexpr( ABL_OR, ExprA, ExprB );
|
||||
...
|
||||
delablexpr( ExprAorB );
|
||||
ExprAorB = (chain_list \(**)0;
|
||||
...
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
.BR freeablexpr(3).
|
||||
.BR delablexprnum(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
.\" $Id: delablexprnum.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)delablexprnum.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH DELABLEXPRNUM 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
delablexprnum \- deletes an operand in an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
void delablexprnum( Expr, Number )
|
||||
chain_list \(**Expr;
|
||||
int Number;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression where to delete an operand.
|
||||
.TP
|
||||
\fIsecond_param\fP
|
||||
Operand number.
|
||||
.SH DESCRIPTION
|
||||
\fBdelablexprnum\fP deletes the operand \fINumber\fP + 1 in \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBdelablexprnum\fP returns nothing.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**ExprA;
|
||||
chain_list \(**ExprB;
|
||||
chain_list \(**ExprC;
|
||||
chain_list \(**ExprAorBorC;
|
||||
ExprA = createablatom( "a" );
|
||||
ExprB = createablatom( "b" );
|
||||
ExprC = createablatom( "c" );
|
||||
ExprAorBorC = createablbinexpr( ABL_OR, ExprA, ExprB );
|
||||
ExprAorBorC = createablbinexpr( ABL_OR, ExprAorBorC, ExprC );
|
||||
...
|
||||
delablexprnum( ExprAorBorC, 2 );
|
||||
/* displays (a or b) */
|
||||
viewablexpr( ExprAorBorC, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR freeablexpr(3),
|
||||
.BR delablexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
.\" $Id: devablxorexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)devablxorexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH DEVABLXOREXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
devablxorexpr \- develops 'xor', 'nxor' in an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**devablxorexpr( Expr )
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression to develop.
|
||||
.SH DESCRIPTION
|
||||
\fBdevablxorexpr\fP develops 'xor' or 'xnor' in \fIExpr\fP.
|
||||
The expression pointer \fIExpr\fP MUSTN'T be used after the call to this function.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBdevablxorexpr\fP returns a pointer to the modified expression.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
Expr = createablbinexpr( ABL_XOR,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
Expr = devablxorexpr( Expr );
|
||||
/* displays (a and (not b)) or ((not a) and b) */
|
||||
viewablexpr( Expr, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR devdupablxorexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
.\" $Id: devdupablxorexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)devdupablxorexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH DEVDUPABLXOREXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
devdupablxorexpr \- duplicates and develops 'xor', 'nxor'.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**devdupablxorexpr( Expr )
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression to develop.
|
||||
.SH DESCRIPTION
|
||||
\fBdevdupablxorexpr\fP develops 'xor' or 'xnor' in \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBdevdupablxorexpr\fP returns a pointer to the modified expression.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr1;
|
||||
chain_list \(**Expr2;
|
||||
Expr1 = createablbinexpr( ABL_XOR,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
Expr2 = devdupablxorexpr( Expr1 );
|
||||
/* displays (a and (not b)) or ((not a) and b) */
|
||||
viewablexpr( Expr2, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR devdupablxorexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
.\" $Id: dupablexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)dupablexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH DUPABLEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
dupablexpr \- duplicates an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**dupablexpr( Expr )
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression to duplicate.
|
||||
.SH DESCRIPTION
|
||||
\fBdupablexpr\fP duplicates the expression \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBdupablexpr\fP returns the duplicated expression.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**ExprAorB;
|
||||
chain_list \(**ExprAnorB;
|
||||
ExprAorB = createabloper( ABL_OR );
|
||||
addablhexpr( ExprAorB, createablatom( "a" ) );
|
||||
addablhexpr( ExprAorB, createablatom( "b" ) );
|
||||
ExprAnorB = createablnotexpr( dupablexpr( ExprAorB ) );
|
||||
/* displays (a or b) (a nor b) */
|
||||
viewablexpr( ExprAorB, ABL_VIEW_VHDL );
|
||||
viewablexpr( ExprAnorB, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR delablexpr(3),
|
||||
.BR freeablexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
.\" $Id: flatablexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)flatablexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH FLATABLEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
flatablexpr \- merges the operators of an expression
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
void flatablexpr( Expr )
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression to flat.
|
||||
.SH DESCRIPTION
|
||||
\fBflatablexpr\fP merges all the common operators in \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBflatablexpr\fP returns nothing.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr1;
|
||||
chain_list \(**Expr2;
|
||||
Expr1 = createbinexpr( ABL_OR,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
Expr2 = createabloper( ABL_OR );
|
||||
addablhexpr( Expr2, createablatom( "c" ) );
|
||||
addablhexpr( Expr2, Expr1 );
|
||||
Expr1 = dupablexpr( Expr2 );
|
||||
flatablexpr( Expr1 );
|
||||
/* displays ((a or b) or c) (a or b or c) */
|
||||
viewablexpr( Expr2, ABL_VIEW_VHDL );
|
||||
viewablexpr( Expr1, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR unflatablexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
.\" $Id: freeablexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)freeablexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH FREEABLEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
freeablexpr \- frees an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
void freeablexpr( Expr )
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression to free.
|
||||
.SH DESCRIPTION
|
||||
\fBfreeablexpr\fP frees the expression \fIExpr\fP even if
|
||||
this expression is not a valid one.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBfreeablexpr\fP returns nothing.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**ExprA;
|
||||
chain_list \(**ExprB;
|
||||
chain_list \(**ExprAorB;
|
||||
ExprA = createablatom( "a" );
|
||||
ExprB = createablatom( "b" );
|
||||
ExprAorB = createablbinexpr( ABL_OR, ExprA, ExprB );
|
||||
...
|
||||
freeablexpr( ExprAorB );
|
||||
ExprAorB = (chain_list \(**)0;
|
||||
...
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
.BR delablexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
.\" $Id: getablexprdepth.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)getablexprdepth.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH GETABLEXPRDEPTH 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
getablexprdepth \- gives the depth of an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
long getablexprdepth( Expr )
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression.
|
||||
.SH DESCRIPTION
|
||||
\fBgetablexprdepth\fP gives the depth of an expression.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBgetablexprdepth\fP returns the depth of \fIExpr\fP.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**ExprA;
|
||||
chain_list \(**ExprB;
|
||||
chain_list \(**ExprAorB;
|
||||
ExprA = createablatom( "a" );
|
||||
ExprB = createablatom( "b" );
|
||||
ExprAorB = createablbinexpr( ABL_OR, ExprA, ExprB );
|
||||
/* displays 1 */
|
||||
printf( "%d", getablexprdepth( ExprAorB ) );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
.\" $Id: getablexprlength.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)getablexprlength.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH GETABLEXPRLENGTH 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
getablexprlength \- gives the length of an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
long getablexprlength( Expr )
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression.
|
||||
.SH DESCRIPTION
|
||||
\fBgetablexprlength\fP gives the length of an expression.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBgetablexprlength\fP returns the length of \fIExpr\fP.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**ExprA;
|
||||
chain_list \(**ExprB;
|
||||
chain_list \(**ExprAorB;
|
||||
ExprA = createablatom( "a" );
|
||||
ExprB = createablatom( "b" );
|
||||
ExprAorB = createablbinexpr( ABL_OR, ExprA, ExprB );
|
||||
/* displays 2 */
|
||||
printf( "%d", getablexprlength( ExprAorB ) );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
.\" $Id: getablexprmax.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)getablexprmax.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH GETABLEXPRMAX 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
getablexprmax \- applies a function to all operands.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**getablexprmax( Function, Expr )
|
||||
int (\(**Function)();
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIFunction\fP
|
||||
Cost function.
|
||||
.TP
|
||||
\fIExpr\fP
|
||||
Expression to scan.
|
||||
.SH DESCRIPTION
|
||||
\fBgetablexprmax\fP applies the cost function \fIFunction\fP to all operands of \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBgetablexprmax\fP returns the operand for which \fFunction\fP gives the maximum cost.
|
||||
The expression pointer returned MUSTN'T be modified after the call to this function.
|
||||
.SH ERRORS
|
||||
getablexprmax error ...
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
int MapFunction( MapExpr )
|
||||
chain_list \(**MapExpr;
|
||||
{
|
||||
return( getabldepthexpr( MapExpr ) );
|
||||
}
|
||||
...
|
||||
chain_list \(**Expr;
|
||||
chain_list \(**Expr1;
|
||||
Expr = createablbinexpr( ABL_AND,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
Expr1 = getablexprmax( MapFunction, Expr );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
.\" $Id: getablexprmin.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)getablexprmin.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH GETABLEXPRMIN 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
getablexprmin \- applies a function to all operands.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**getablexprmin( Function, Expr )
|
||||
int (\(**Function)();
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIFunction\fP
|
||||
Cost function.
|
||||
.TP
|
||||
\fIExpr\fP
|
||||
Expression to scan.
|
||||
.SH DESCRIPTION
|
||||
\fBgetablexprmin\fP applies the cost function \fIFunction\fP to all operands of \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBgetablexprmin\fP returns the operand for which \fFunction\fP gives the minimum cost.
|
||||
The expression pointer returned MUSTN'T be modified after the call to this function.
|
||||
.SH ERRORS
|
||||
getablexprmin error ...
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
int MapFunction( MapExpr )
|
||||
chain_list \(**MapExpr;
|
||||
{
|
||||
return( getabldepthexpr( MapExpr ) );
|
||||
}
|
||||
...
|
||||
chain_list \(**Expr;
|
||||
chain_list \(**Expr1;
|
||||
Expr = createablbinexpr( ABL_AND,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
Expr1 = getablexprmin( MapFunction, Expr );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
.\" $Id: getablexprnum.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)getablexprnum.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH GETABLEXPRNUM 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
getablexprnum \- gives a specified operand of an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**getablexprnum( Expr, Number )
|
||||
chain_list \(**Expr;
|
||||
int Number;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression.
|
||||
.TP
|
||||
\fINumber\fP
|
||||
Operand number.
|
||||
.SH DESCRIPTION
|
||||
\fBgetablexprnum\fP gives the operand \fINumber\fP of \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBgetablexprnum\fP returns the operand \fINumber\fP of \fIExpr\fP.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
Expr = createablbinexpr( ABL_AND,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
/* displays b */
|
||||
viewablexpr( getablexprnum( Expr, 1 ), ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
.\" $Id: getablexprnumatom.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)getablexprnumatom.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH GETABLEXPRNUMATOM 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
getablexprnumatom \- gives the number of atom in an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
long getablexprnumatom( Expr )
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression.
|
||||
.SH DESCRIPTION
|
||||
\fBgetablexprnumatom\fP gives the number of atom in \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBgetablexprnumatom\fP returns the number of atom in \fIExpr\fP.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
Expr = createablbinexpr( ABL_AND,
|
||||
createablatom( "'0'" ),
|
||||
createablatom( "'1'" ) );
|
||||
/* displays 2 */
|
||||
printf( "%d", getablexprnumatom( Expr ) );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
.\" $Id: getablexprnumbinoper.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)getablexprnumbinoper.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH GETABLEXPRNUMBINOPER 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
getablexprnumbinoper \- gives the number of binary operators in an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
long getablexprnumbinoper( Expr )
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression.
|
||||
.SH DESCRIPTION
|
||||
\fBgetablexprnumbinoper\fP gives the number of binary operators in \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBgetablexprnumbinoper\fP returns the number of binary operators in \fIExpr\fP.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
Expr = createablbinexpr( ABL_AND,
|
||||
createablatom( "'0'" ),
|
||||
createablatom( "'1'" ) );
|
||||
/* displays 1 */
|
||||
printf( "%d", getablexprnumbinoper( Expr ) );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
.\" $Id: getablexprnumocc.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)getablexprnumocc.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH GETABLEXPRNUMOCC 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
getablexprnumocc \- how many times a name appears in an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
long getablexprnumocc( Expr, Name )
|
||||
chain_list \(**Expr;
|
||||
char \(**Name;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression.
|
||||
.TP
|
||||
\fIName\fP
|
||||
Name to find.
|
||||
.SH DESCRIPTION
|
||||
\fBgetablexprnumocc\fP gives the number of occurents of \fIName\fP in \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBgetablexprnumocc\fP returns number of occurents of \fIName\fP in \fIExpr\fP.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
Expr = createablbinexpr( ABL_AND,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
/* displays 1 */
|
||||
printf( "%d", getablexprnumocc( Expr, "a" ) );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
.\" $Id: getablexprsupport.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)getablexprsupport.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH GETABLEXPRSUPPORT 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
getablexprsupport \- gives the expression's support.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
void \(**getablexprsupport( Expr, Mode )
|
||||
chain_list \(**Expr;
|
||||
int Mode;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression.
|
||||
.TP
|
||||
\fIMode\fP
|
||||
The returned support's mode.
|
||||
.SH DESCRIPTION
|
||||
\fBgetablexprsupport\fP gives the support of \fIExpr\fP. if \fIMode\fP
|
||||
is ABL_SUPPORT_CHAIN the support is returned using \fIchain_list\fP
|
||||
else it is returned using \fIptype_list\fP. The support must be freed
|
||||
using the \fIfreechain\fP or \fIfreeptype\fP functions.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBgetablexprsupport\fP returns a pointer to a \fIchain_list\fP or
|
||||
a \fIptype_list\fP.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
ptype_list \(**Support;
|
||||
ptype_list \(**ScanSupport;
|
||||
Expr = createablbinexpr( ABL_AND,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
Support = getablexprsupport( Expr, ABL_SUPPORT_PTYPE );
|
||||
/* displays a b */
|
||||
for ( ScanSupport = Support;
|
||||
ScanSupport != (ptype_list \(**)0;
|
||||
ScanSupport = ScanSupport->NEXT )
|
||||
{
|
||||
printf( "%s ", (char *)ScanSupport->DATA );
|
||||
}
|
||||
freeptype( Support );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
.\" $Id: isablbinaryoper.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)isablbinaryoper.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH ISABLBINARYOPER 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
isablbinaryoper \- tests if an operator is binary.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
int isablbinaryoper( Oper )
|
||||
long Oper;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIOper\fP
|
||||
Operator number.
|
||||
.SH DESCRIPTION
|
||||
\fBisablbinaryoper\fP tests if \fIOper\fP is binary.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBisablbinaryoper\fP returns 1 if \fIOper\fP is binary, -1
|
||||
if \fIOper\fP is not a valid number, and 0 otherwise.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
/* displays 1 0 */
|
||||
printf( "%d ", isablbinaryoper( ABL_OR ) );
|
||||
printf( "%d\n", isablbinaryoper( ABL_NOT ) );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
.\" $Id: isablequalexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)isablequalexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH ISABLEQUALEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
isablequalexpr \- tests if two expressions are strictly identicals.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
int isablequalexpr( Expr1, Expr2 )
|
||||
chain_list \(**Expr1;
|
||||
chain_list \(**Expr2;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr1\fP
|
||||
First expression.
|
||||
.TP
|
||||
\fIExpr2\fP
|
||||
Second expression.
|
||||
.SH DESCRIPTION
|
||||
\fBisablequalexpr\fP compares \fIExpr1\fP and \fIExpr2\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
if \fIExpr1\fP and \fIExpr2\fP are strictly identicals
|
||||
\fBisablequalexpr\fP returns 1 and 0 otherwise.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr1;
|
||||
chain_list \(**Expr2;
|
||||
Expr1 = createablbinexpr( ABL_AND,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
Expr2 = createablbinexpr( ABL_AND,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
/* displays 1 */
|
||||
printf( "%d", isablequalexpr( Expr1, Expr2 ) );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
.\" $Id: isablnameinexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)isablnameinexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH ISABLNAMEINEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH OPER
|
||||
isablnameinexpr \- tests if a name appears in an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
int isablnameinexpr( Expr, Name )
|
||||
chain_list \(**Expr;
|
||||
char \(**Name;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression where to search.
|
||||
.TP
|
||||
\fIName\fP
|
||||
Name to search.
|
||||
.SH DESCRIPTION
|
||||
\fBisablnameinexpr\fP tests if \fIName\fP appears in \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBisablnameinexpr\fP returns 1 if \fIName\fP appears in \fIExpr\fP
|
||||
and 0 otherwise.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
Expr = createablbinexpr( ABL_AND,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
/* displays 1 */
|
||||
printf( "%d", isablnameinexpr( Expr, "a" ) );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
.\" $Id: isabloperinexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)isabloperinexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH ISABLOPERINEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
isabloperinexpr \- tests if an operator appears in an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
int isabloperinexpr( Expr, Oper )
|
||||
chain_list \(**Expr;
|
||||
long Oper;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression where to search.
|
||||
.TP
|
||||
\fIOper\fP
|
||||
Operator to search.
|
||||
.SH DESCRIPTION
|
||||
\fBisabloperinexpr\fP tests if \fIOper\fP appears in \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBisabloperinexpr\fP returns 1 if \fIOper\fP appears in \fIExpr\fP
|
||||
and 0 otherwise.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
Expr = createablbinexpr( ABL_AND,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
/* displays 1 */
|
||||
printf( "%d", isabloperinexpr( Expr, ABL_AND ) );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
.\" $Id: isablsimilarexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)isablsimilarexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH ISABLSIMILAREXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
isablsimilarexpr \- tests if two expressions have the same morphology.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
int isablsimilarexpr( Expr1, Expr2 )
|
||||
chain_list \(**Expr1;
|
||||
chain_list \(**Expr2;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr1\fP
|
||||
First expression.
|
||||
.TP
|
||||
\fIExpr2\fP
|
||||
Second expression.
|
||||
.SH DESCRIPTION
|
||||
\fBisablequalexpr\fP compares \fIExpr1\fP and \fIExpr2\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
if \fIExpr1\fP and \fIExpr2\fP have got the same morphology
|
||||
\fBisablequalexpr\fP returns 1 and 0 otherwise.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr1;
|
||||
chain_list \(**Expr2;
|
||||
Expr1 = createablbinexpr( ABL_AND,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
Expr2 = createablbinexpr( ABL_AND,
|
||||
createablatom( "c" ),
|
||||
createablatom( "d" ) );
|
||||
/* displays 1 */
|
||||
printf( "%d", isablsimilarexpr( Expr1, Expr2 ) );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
.\" $Id: isablunaryoper.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)isablunaryoper.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH ISABLUNARYOPER 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
isablunaryoper \- tests if an operator is unary.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
int isablunaryoper( Oper )
|
||||
long Oper;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIOper\fP
|
||||
Operator number.
|
||||
.SH DESCRIPTION
|
||||
\fBisablunaryoper\fP tests if \fIOper\fP is unary.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBisablunaryoper\fP returns 1 if \fIOper\fP is unary, -1
|
||||
if \fIOper\fP is not a valid number, and 0 otherwise.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
/* displays 0 1 */
|
||||
printf( "%d ", isablunaryoper( ABL_OR ) );
|
||||
printf( "%d\n", isablunaryoper( ABL_NOT ) );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
.\" $Id: mapablanyexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)mapablanyexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH MAPABLANYEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
mapablanyexpr \- applies a function to all operands.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
int mapablanyexpr( Function, Expr )
|
||||
void (\(**Function)();
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
.TP
|
||||
\fIFunction\fP
|
||||
Function name to apply to all operands.
|
||||
.TP
|
||||
\fIExpr\fP
|
||||
Expression to scan.
|
||||
.SH DESCRIPTION
|
||||
\fBmapablanyexpr\fP applies \fIFunction\fP to all operands of \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBmapablanyexpr\fP returns the value of a logical OR applied on
|
||||
the results of the application of the function on the arguments of
|
||||
an operator expression.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
int MapFunction( MapExpr )
|
||||
chain_list \(**MapExpr;
|
||||
{
|
||||
if ( ABL_ATOM( MapExpr ) )
|
||||
{
|
||||
if ( ABL_ATOM_VALUE( MapExpr ) == getablatomzero() )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
}
|
||||
return( 0 );
|
||||
}
|
||||
...
|
||||
chain_list \(**Expr;
|
||||
...
|
||||
mapablanyexpr( MapFunction, Expr );
|
||||
...
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR mapablexpr(3),
|
||||
.BR mapableveryexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
.\" $Id: mapableveryexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)mapableveryexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH MAPABLEVERYEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
mapableveryexpr \- applies a function to all operands.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
int mapableveryexpr( Function, Expr )
|
||||
void (\(**Function)();
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
.TP
|
||||
\fIFunction\fP
|
||||
Function name to apply to all operands.
|
||||
.TP
|
||||
\fIExpr\fP
|
||||
Expression to scan.
|
||||
.SH DESCRIPTION
|
||||
\fBmapableveryexpr\fP applies \fIFunction\fP to all operands of \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBmapableveryexpr\fP returns the value of a logical AND applied on
|
||||
the results of the application of the function on the arguments of
|
||||
the expression \fIExpr\fP.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
int MapFunction( MapExpr )
|
||||
chain_list \(**MapExpr;
|
||||
{
|
||||
if ( ABL_ATOM( MapExpr ) )
|
||||
{
|
||||
if ( ABL_ATOM_VALUE( MapExpr ) == getablatomzero() )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
}
|
||||
return( 0 );
|
||||
}
|
||||
...
|
||||
chain_list \(**Expr;
|
||||
...
|
||||
mapableveryexpr( MapFunction, Expr );
|
||||
...
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR mapablexpr(3),
|
||||
.BR mapablanyexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
.\" $Id: mapablexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)mapablexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH MAPABLEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
mapablexpr \- applies a function to all operands.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
void mapablexpr( Function, Expr )
|
||||
void (\(**Function)();
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
.TP
|
||||
\fIFunction\fP
|
||||
Function name to apply to all operands.
|
||||
.TP
|
||||
\fIExpr\fP
|
||||
Expression to scan.
|
||||
.SH DESCRIPTION
|
||||
\fBmapablexpr\fP applies \fIFunction\fP to all operands of \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBmapablexpr\fP returns nothing.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
void MapFunction( MapExpr )
|
||||
chain_list \(**MapExpr;
|
||||
{
|
||||
if ( ABL_ATOM( MapExpr ) )
|
||||
{
|
||||
printf( stdout, "%s", ABL_ATOM_VALUE( MapExpr ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
mapablexpr( MapFunction, MapExpr );
|
||||
}
|
||||
}
|
||||
...
|
||||
chain_list \(**Expr;
|
||||
...
|
||||
mapablexpr( MapFunction, Expr );
|
||||
...
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
.\" $Id: mapabloperexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)mapabloperexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH MAPABLOPEREXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
mapabloperexpr \- applies a function to all operands.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**mapabloperexpr( Function, Oper, Expr )
|
||||
chain_list \(** (\(**Function)();
|
||||
long Oper;
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
.TP
|
||||
\fIFunction\fP
|
||||
Function name to apply to all operands.
|
||||
.TP
|
||||
\fIOper\fP
|
||||
Operator number.
|
||||
.TP
|
||||
\fIExpr\fP
|
||||
Expression to scan.
|
||||
.SH DESCRIPTION
|
||||
\fBmapabloperexpr\fP applies \fIFunction\fP to all operands of \fIExpr\fP.
|
||||
\fBmapabloperexpr\fP creates a head of an operator expression having
|
||||
\fIOper\fP as operator and adds the arguments calculated by applying
|
||||
\fIFunction\fP to each arguments of \fIExpr\fP.
|
||||
\fIFunction\fP must return an expression and must have a
|
||||
unique expression as argument.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBmapabloperexpr\fP returns a new expression by applying \fIFunction\fP
|
||||
to all the arguments of the operator expression \fIExpr\fP.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**MapFunction( MapExpr )
|
||||
chain_list \(**MapExpr;
|
||||
{
|
||||
return( createablnotexpr( dupablexpr( MapExpr ) ) );
|
||||
}
|
||||
chain_list \(**Expr;
|
||||
chain_list \(**Expr1;
|
||||
Expr = createablbinexpr( ABL_NOR,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
Expr1 = mapabloperexpr( MapFunction, ABL_AND, Expr );
|
||||
/* displays ((not a) and (not b)) */
|
||||
viewablexpr( Expr1, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
.\" $Id: polarablexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)polarablexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH POLARABLEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
polarablexpr \- moves inverters to the atomic level.
|
||||
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**polarablexpr( Expr, Polar )
|
||||
chain_list \(**Expr;
|
||||
int Polar;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression to modify.
|
||||
.TP
|
||||
\fIPolar\fP
|
||||
Expression polarity.
|
||||
.SH DESCRIPTION
|
||||
\fBpolarablexpr\fP modifies \fIExpr\fP by moving down the inverters to the atomic level.
|
||||
\fBpolarablexpr\fP applies the Morgan's laws. If \fIPolar\fP is equal to ABL_POLAR_NEGATIVE
|
||||
the function returns the modified expression after having complemented it.
|
||||
The expression pointer \fIExpr\fP MUSTN'T be used after the call to this function.
|
||||
.SH RETURN VALUE
|
||||
\fBpolarablexpr\fP returns the modified expression.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr1;
|
||||
chain_list \(**Expr2;
|
||||
Expr1 = createabloper( ABL_NOT );
|
||||
Expr2 = createabloper( ABL_NOT );
|
||||
addablhexpr( Expr1, createablatom( "a" ) );
|
||||
addablhexpr( Expr2, Expr1 );
|
||||
Expr1 = polarablexpr( Expr2, ABL_POLAR_POSITIVE );
|
||||
/* displays a */
|
||||
viewablexpr( Expr1, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
.\" $Id: polardupablexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)polardupablexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH POLARDUPABLEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
polardupablexpr \- duplicates an expression and moves down the inverters.
|
||||
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**polardupablexpr( Expr, Polar )
|
||||
chain_list \(**Expr;
|
||||
int Polar;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression to modify.
|
||||
.TP
|
||||
\fIPolar\fP
|
||||
Expression polarity.
|
||||
.SH DESCRIPTION
|
||||
\fBpolardupablexpr\fP modifies \fIExpr\fP by moving down the inverters to the atomic level.
|
||||
\fBpolardupablexpr\fP applies the Morgan's laws. If \fIPolar\fP is equal to ABL_POLAR_NEGATIVE
|
||||
the function returns the modified expression after having complemented it.
|
||||
.SH RETURN VALUE
|
||||
\fBpolardupablexpr\fP returns the modified expression.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr1;
|
||||
chain_list \(**Expr2;
|
||||
Expr1 = createabloper( ABL_NOT );
|
||||
Expr2 = createabloper( ABL_NOT );
|
||||
addablhexpr( Expr1, createablatom( "a" ) );
|
||||
addablhexpr( Expr2, Expr1 );
|
||||
Expr1 = polardupablexpr( Expr2, ABL_POLAR_POSITIVE );
|
||||
/* displays a */
|
||||
viewablexpr( Expr1, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1)
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
.\" $Id: simpablexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)simpablexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH SIMPABLEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
simpablexpr \- simplies an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**simpablexpr( Expr )
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression to simplfy.
|
||||
.SH DESCRIPTION
|
||||
\fBsimpablexpr\fP simplifies \fIExpr\fP. The expression pointer \fIExpr\fP
|
||||
MUSTN'T be used after the call to this function.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBsimpablexpr\fP returns a pointer to the simplied expression.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
Expr = createablbinexpr( ABL_AND,
|
||||
createablatom( "'0'" ),
|
||||
createablatom( "'1'" ) );
|
||||
Expr = simpablexpr( Expr );
|
||||
/* displays '0' */
|
||||
viewablexpr( Expr, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR simpdupablexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
.\" $Id: simpdupablexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)simpdupablexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH SIMPDUPABLEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
simpdupablexpr \- duplicates and simplies an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**simpdupablexpr( Expr )
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression to simplfy.
|
||||
.SH DESCRIPTION
|
||||
\fBsimpdupablexpr\fP simplifies \fIExpr\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBsimpdupablexpr\fP returns a pointer to the simplied expression.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
chain_list \(**ExprSimp;
|
||||
Expr = createablbinexpr( ABL_AND,
|
||||
createablatom( "'0'" ),
|
||||
createablatom( "'1'" ) );
|
||||
ExprSimp = simpdupablexpr( Expr );
|
||||
/* displays ('0' and '1') '0' */
|
||||
viewablexpr( Expr, ABL_VIEW_VHDL );
|
||||
viewablexpr( ExprSimp, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR simpdupablexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
.\" $Id: substablexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)substablexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH SUBSTABLEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
substablexpr \- substitutes a given atom by an expression.
|
||||
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**substablexpr( Expr1, Name, Expr2 )
|
||||
chain_list \(**Expr1;
|
||||
char \(**Name;
|
||||
chain_list \(**Expr2;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr1\fP
|
||||
First expression.
|
||||
.TP
|
||||
\fIName\fP
|
||||
Atom name.
|
||||
.TP
|
||||
\fIExpr\fP
|
||||
Second expression.
|
||||
.SH DESCRIPTION
|
||||
\fBsubstablexpr\fP substitutes \fIAtom\fP in \fIExpr1\fP by \fIExpr2\fP.
|
||||
The expression pointer \fIExpr1\fP MUSTN'T be used after the call to this function.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBsubstablexpr\fP returns the modified expression.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr1;
|
||||
chain_list \(**Expr2;
|
||||
Expr1 = createablbinexpr( ABL_OR,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
Expr2 = createablbinexpr( ABL_AND,
|
||||
createablatom( "c" ),
|
||||
createablatom( "d" ) );
|
||||
Expr1 = substablexpr( Expr1, "a", Expr2 );
|
||||
/* displays ((c and d) or b) */
|
||||
viewablexpr( Expr1, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR substdupablexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
.\" $Id: substdupablexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)substdupablexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH SUBSTDUPABLEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
substdupablexpr \- substitutes a given atom by an expression.
|
||||
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**substdupablexpr( Expr1, Name, Expr2 )
|
||||
chain_list \(**Expr1;
|
||||
char \(**Name;
|
||||
chain_list \(**Expr2;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr1\fP
|
||||
First expression.
|
||||
.TP
|
||||
\fIName\fP
|
||||
Atom name.
|
||||
.TP
|
||||
\fIExpr\fP
|
||||
Second expression.
|
||||
.SH DESCRIPTION
|
||||
\fBsubstdupablexpr\fP duplicates and substitutes \fIAtom\fP in \fIExpr1\fP by \fIExpr2\fP.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBsubstdupablexpr\fP returns the duplicated and modified expression.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr1;
|
||||
chain_list \(**Expr2;
|
||||
chain_list \(**Expr3;
|
||||
Expr1 = createablbinexpr( ABL_OR,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
Expr2 = createablbinexpr( ABL_AND,
|
||||
createablatom( "c" ),
|
||||
createablatom( "d" ) );
|
||||
Expr3 = substdupablexpr( Expr1, "a", Expr2 );
|
||||
/* displays ((c and d) or b) */
|
||||
viewablexpr( Expr1, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR substablexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
.\" $Id: unflatablexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)unflatablexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH UNFLATABLEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
unflatablexpr \- unflats the operators of an expression
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
void unflatablexpr( Expr )
|
||||
chain_list \(**Expr;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression to unflat.
|
||||
.SH DESCRIPTION
|
||||
\fBunflatablexpr\fP modifies all the operators in \fIExpr\fP in order
|
||||
to have exclusively binary or unary operators.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBunflatablexpr\fP returns the modified expression.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr1;
|
||||
chain_list \(**Expr2;
|
||||
Expr1 = createbinexpr( ABL_OR,
|
||||
createablatom( "a" ),
|
||||
createablatom( "b" ) );
|
||||
addablqexpr( Expr1, createablatom( "c" ) );
|
||||
Expr2 = unflatablexpr( dupablexpr( Expr1 ) );
|
||||
/* displays ((a or b) or c) (a or b or c) */
|
||||
viewablexpr( Expr2, ABL_VIEW_VHDL );
|
||||
viewablexpr( Expr1, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR ununflatablexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
.\" $Id: vhdlablname.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)vhdlablname.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH VHDLABLNAME 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
vhdlablname \- returns a compatible VHDL name.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
char \(**vhdlablname( Name )
|
||||
char \(**Name;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIName\fP
|
||||
Name to be translated.
|
||||
.SH DESCRIPTION
|
||||
\fBvhdlablname\fP translates a name according to the VHDL syntax.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBvhdlablname\fP return a new name, using \fInamealloc\fP.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
/* displays v_hello_world */
|
||||
printf( "%s\n", vhdlablname( "_hello_world" ) );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR vhdlablvector(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
.\" $Id: vhdlablvector.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)vhdlablvector.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH VHDLABLVECTOR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
vhdlablvector \- gives the index and the name of a vectorized name.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
char \(**vhdlablvector( Name, Index )
|
||||
char \(**Name;
|
||||
long \(**Index;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIName\fP
|
||||
A vectorized name.
|
||||
.TP
|
||||
\fIIndex\fP
|
||||
A pointer to long.
|
||||
.SH DESCRIPTION
|
||||
\fBvhdlablvector\fP searches the index of a vectorized name, and the vector's name.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
If \fIName\fP is a vectorized name, \fBvhdlablvector\fP
|
||||
returns the vector's name using \fInamealloc\fP, and its index throw \fIIndex\fP.
|
||||
Otherwise, it returns a null pointer.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
long Index;
|
||||
char \(**Name;
|
||||
Name = vhdlablvector( "vec 2", &Index );
|
||||
/* displays Name:vec, Index:2 */
|
||||
printf( "Name:%s, Index:%d\n", Name, Index );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR ablvhdlname(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
.\" $Id: viewablexpr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)viewablexpr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH VIEWABLEXPR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
viewablexpr \- displays an expression.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
void viewablexpr( Expr, Mode )
|
||||
chain_list \(**Expr;
|
||||
int Mode;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression to display.
|
||||
.TP
|
||||
\fIMode\fP
|
||||
The notation type.
|
||||
.SH DESCRIPTION
|
||||
\fBviewablexpr\fP displays \fIExpr\fP in the notation specified
|
||||
by \fIMode\fP. The following notation types are available
|
||||
ABL_VIEW_INFIX, ABL_VIEW_PREFIX, ABL_VIEW_POSTFIX or ABL_VIEW_VHDL.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBviewablexpr\fP returns nothing.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
Expr = createabloper( ABL_OR );
|
||||
addablhexpr( Expr, createablatom( "a" ) );
|
||||
addablhexpr( Expr, createablatom( "b" ) );
|
||||
/* displays (a or b) */
|
||||
viewablexpr( Expr, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR viewablexprstr(3),
|
||||
.BR viewablexprfile(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
.\" $Id: viewablexprfile.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)viewablexprfile.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH VIEWABLEXPRFILE 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
viewablexprfile \- displays an expression in a file.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
void viewablexprfile( AblFile, Expr, Mode )
|
||||
FILE \(**AblFile;
|
||||
chain_list \(**Expr;
|
||||
int Mode;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIAblFile\fP
|
||||
The target file.
|
||||
.TP
|
||||
\fIExpr\fP
|
||||
Expression to display.
|
||||
.TP
|
||||
\fIMode\fP
|
||||
The notation type.
|
||||
.SH DESCRIPTION
|
||||
\fBviewablexprfile\fP displays \fIExpr\fP in the file \fIAblFile\fP
|
||||
with the notation specified by \fIMode\fP.
|
||||
The following notation types are available ABL_VIEW_INFIX, ABL_VIEW_PREFIX,
|
||||
ABL_VIEW_POSTFIX or ABL_VIEW_VHDL.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBviewablexprfile\fP returns nothing.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
Expr = createabloper( ABL_OR );
|
||||
addablhexpr( Expr, createablatom( "a" ) );
|
||||
addablhexpr( Expr, createablatom( "b" ) );
|
||||
/* displays (a or b) */
|
||||
viewablexprfile( stderr, Expr, ABL_VIEW_VHDL );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR viewablexprstr(3),
|
||||
.BR viewablexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
.\" $Id: viewablexprstr.3,v 1.1 2002/03/18 11:06:16 ludo Exp $
|
||||
.\" @(#)viewablexprstr.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic
|
||||
.TH VIEWABLEXPRSTR 3 "October 1, 1997" "ASIM/LIP6" "ABL FUNCTIONS"
|
||||
.SH NAME
|
||||
viewablexprstr \- displays an expression in a str.
|
||||
.so man1/alc_origin.1
|
||||
.SH SYNOPSYS
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
char *viewablexprstr( Expr, Mode )
|
||||
chain_list \(**Expr;
|
||||
int Mode;
|
||||
.ft R
|
||||
.fi
|
||||
.SH PARAMETERS
|
||||
.TP 20
|
||||
\fIExpr\fP
|
||||
Expression to display.
|
||||
.TP
|
||||
\fIMode\fP
|
||||
The notation type.
|
||||
.SH DESCRIPTION
|
||||
\fBviewablexprstr\fP displays \fIExpr\fP in a string, with the notation
|
||||
specified by \fIMode\fP. The following notation types are available
|
||||
ABL_VIEW_INFIX, ABL_VIEW_PREFIX, ABL_VIEW_POSTFIX or ABL_VIEW_VHDL.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
\fBviewablexprstr\fP returns a pointer to the string where the expression
|
||||
has been displayed in. This string MUSTN'T be freed.
|
||||
.SH EXAMPLE
|
||||
.ta 3n 6n 9n 12n 15n 18n 21n
|
||||
.nf
|
||||
.if n \{\
|
||||
.ft B \}
|
||||
.if t \{\
|
||||
.ft CR \}
|
||||
#include "abl101.h"
|
||||
chain_list \(**Expr;
|
||||
char \(**String;
|
||||
Expr = createabloper( ABL_OR );
|
||||
addablhexpr( Expr, createablatom( "a" ) );
|
||||
addablhexpr( Expr, createablatom( "b" ) );
|
||||
/* displays (a or b) */
|
||||
String = viewablexprstr( Expr, ABL_VIEW_VHDL );
|
||||
printf( String );
|
||||
.ft R
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
.BR abl (1),
|
||||
.BR viewablexprfile(3),
|
||||
.BR viewablexpr(3).
|
||||
|
||||
|
||||
.so man1/alc_bug_report.1
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
INCLUDES = -I$(top_srcdir)/../mbk/src \
|
||||
-I$(top_srcdir)/../aut/src
|
||||
lib_LIBRARIES = libAbl.a
|
||||
include_HEADERS = abl.h
|
||||
libAbl_a_SOURCES = abldel.h ablflat.h abloptim.h ablunflat.h \
|
||||
abladd.c abldev.c ablfree.c ablpolar.c ablvhdl.c \
|
||||
abladd.h abldev.h ablfree.h ablpolar.h ablvhdl.h \
|
||||
ablcreate.c abldup.c ablget.c ablsimp.c ablview.c \
|
||||
ablcreate.h abldup.h ablget.h ablsimp.h ablview.h \
|
||||
ablctlnorm.c ablenv.c ablis.c ablstr.c \
|
||||
ablctlnorm.h ablenv.h ablis.h ablstr.h \
|
||||
ablctlsimp.c ablerror.c ablmap.c ablsubst.c \
|
||||
ablctlsimp.h ablerror.h ablmap.h ablsubst.h \
|
||||
abldel.c ablflat.c abloptim.c ablunflat.c
|
|
@ -0,0 +1,345 @@
|
|||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
CC = @CC@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/../mbk/src -I$(top_srcdir)/../aut/src
|
||||
|
||||
lib_LIBRARIES = libAbl.a
|
||||
include_HEADERS = abl.h
|
||||
libAbl_a_SOURCES = abldel.h ablflat.h abloptim.h ablunflat.h abladd.c abldev.c ablfree.c ablpolar.c ablvhdl.c abladd.h abldev.h ablfree.h ablpolar.h ablvhdl.h ablcreate.c abldup.c ablget.c ablsimp.c ablview.c ablcreate.h abldup.h ablget.h ablsimp.h ablview.h ablctlnorm.c ablenv.c ablis.c ablstr.c ablctlnorm.h ablenv.h ablis.h ablstr.h ablctlsimp.c ablerror.c ablmap.c ablsubst.c ablctlsimp.h ablerror.h ablmap.h ablsubst.h abldel.c ablflat.c abloptim.c ablunflat.c
|
||||
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(lib_LIBRARIES)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
libAbl_a_LIBADD =
|
||||
libAbl_a_OBJECTS = abladd.o abldev.o ablfree.o ablpolar.o ablvhdl.o \
|
||||
ablcreate.o abldup.o ablget.o ablsimp.o ablview.o ablctlnorm.o ablenv.o \
|
||||
ablis.o ablstr.o ablctlsimp.o ablerror.o ablmap.o ablsubst.o abldel.o \
|
||||
ablflat.o abloptim.o ablunflat.o
|
||||
AR = ar
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
HEADERS = $(include_HEADERS)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/abladd.P .deps/ablcreate.P .deps/ablctlnorm.P \
|
||||
.deps/ablctlsimp.P .deps/abldel.P .deps/abldev.P .deps/abldup.P \
|
||||
.deps/ablenv.P .deps/ablerror.P .deps/ablflat.P .deps/ablfree.P \
|
||||
.deps/ablget.P .deps/ablis.P .deps/ablmap.P .deps/abloptim.P \
|
||||
.deps/ablpolar.P .deps/ablsimp.P .deps/ablstr.P .deps/ablsubst.P \
|
||||
.deps/ablunflat.P .deps/ablvhdl.P .deps/ablview.P
|
||||
SOURCES = $(libAbl_a_SOURCES)
|
||||
OBJECTS = $(libAbl_a_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-libLIBRARIES:
|
||||
|
||||
clean-libLIBRARIES:
|
||||
-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
|
||||
|
||||
distclean-libLIBRARIES:
|
||||
|
||||
maintainer-clean-libLIBRARIES:
|
||||
|
||||
install-libLIBRARIES: $(lib_LIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
@list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
|
||||
else :; fi; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
|
||||
$(RANLIB) $(DESTDIR)$(libdir)/$$p; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(libdir)/$$p; \
|
||||
done
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
libAbl.a: $(libAbl_a_OBJECTS) $(libAbl_a_DEPENDENCIES)
|
||||
-rm -f libAbl.a
|
||||
$(AR) cru libAbl.a $(libAbl_a_OBJECTS) $(libAbl_a_LIBADD)
|
||||
$(RANLIB) libAbl.a
|
||||
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(includedir)
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
|
||||
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \
|
||||
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(include_HEADERS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(includedir)/$$p; \
|
||||
done
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = src
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign src/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-libLIBRARIES
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am: install-includeHEADERS
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-libLIBRARIES uninstall-includeHEADERS
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(LIBRARIES) $(HEADERS)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-libLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-depend mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-libLIBRARIES clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-libLIBRARIES distclean-compile distclean-tags \
|
||||
distclean-depend distclean-generic clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-libLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-depend maintainer-clean-generic \
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-libLIBRARIES distclean-libLIBRARIES \
|
||||
clean-libLIBRARIES maintainer-clean-libLIBRARIES uninstall-libLIBRARIES \
|
||||
install-libLIBRARIES mostlyclean-compile distclean-compile \
|
||||
clean-compile maintainer-clean-compile uninstall-includeHEADERS \
|
||||
install-includeHEADERS tags mostlyclean-tags distclean-tags clean-tags \
|
||||
maintainer-clean-tags distdir mostlyclean-depend distclean-depend \
|
||||
clean-depend maintainer-clean-depend info-am info dvi-am dvi check \
|
||||
check-am installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,389 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Title : Structures and fonctions for ABL |
|
||||
| |
|
||||
| Date : 12.06.95 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_102_H
|
||||
# define ABL_102_H
|
||||
|
||||
# ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Logical Operators |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define ABL_OR 0
|
||||
# define ABL_AND 1
|
||||
# define ABL_XOR 2
|
||||
# define ABL_NOT 3
|
||||
# define ABL_NOR 4
|
||||
# define ABL_NAND 5
|
||||
# define ABL_NXOR 6
|
||||
# define ABL_STABLE 7
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| CTL Operators |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define ABL_AF 8
|
||||
# define ABL_AG 9
|
||||
# define ABL_AX 10
|
||||
# define ABL_AU 11
|
||||
# define ABL_EF 12
|
||||
# define ABL_EG 13
|
||||
# define ABL_EX 14
|
||||
# define ABL_EU 15
|
||||
|
||||
# define ABL_MAX_OPERATOR 16
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Polarity |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define ABL_POLAR_NEGATIVE 0
|
||||
# define ABL_POLAR_POSITIVE 1
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Macros |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| View |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define ABL_VIEW_INFIX 0
|
||||
# define ABL_VIEW_PREFIX 1
|
||||
# define ABL_VIEW_POSTFIX 2
|
||||
# define ABL_VIEW_VHDL 3
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Support Type |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define ABL_SUPPORT_CHAIN 0
|
||||
# define ABL_SUPPORT_PTYPE 1
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Lisp Like Macros |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define ABL_CDR( E ) ( ( E )->NEXT )
|
||||
# define ABL_CAR( E ) ( (ablexpr *)( E )->DATA )
|
||||
# define ABL_CADR( E ) ( ABL_CAR( ABL_CDR( ( E ) ) ) )
|
||||
# define ABL_CDDR( E ) ( ABL_CDR( ABL_CDR( ( E ) ) ) )
|
||||
# define ABL_ATOM( E ) ( ( E )->NEXT == (ablexpr *)0 )
|
||||
# define ABL_ATOM_VALUE( E ) ( (char *)( ( E )->DATA ) )
|
||||
# define ABL_OPER( E ) ( (long)( ( ABL_CAR( ( E ) ) )->DATA ) )
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Get Macros |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define getablatomone() ( ABL_ATOM_NAME_ONE )
|
||||
# define getablatomzero() ( ABL_ATOM_NAME_ZERO )
|
||||
# define getablatomdc() ( ABL_ATOM_NAME_DC )
|
||||
# define getablatomtristate() ( ABL_ATOM_NAME_TRISTATE )
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Type |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
typedef chain_list ablexpr;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Global Variables |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern char *ABL_OPERATOR_NAME[ ABL_MAX_OPERATOR ];
|
||||
extern char *ABL_OPERATOR_UPPER_NAME[ ABL_MAX_OPERATOR ];
|
||||
extern char *ABL_ATOM_NAME_ZERO;
|
||||
extern char *ABL_ATOM_NAME_ONE;
|
||||
extern char *ABL_ATOM_NAME_DC;
|
||||
extern char *ABL_ATOM_NAME_TRISTATE;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Initialize Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern void ablenv __P(());
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Free Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern void freeablexpr __P((ablexpr *Expr));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Create Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern ablexpr * createablatom __P((char *Atom));
|
||||
extern ablexpr * createablatomone __P(());
|
||||
extern ablexpr * createablatomzero __P(());
|
||||
extern ablexpr * createablatomdc __P(());
|
||||
extern ablexpr * createablatomtristate __P(());
|
||||
|
||||
extern ablexpr * createabloper __P((long Oper));
|
||||
extern ablexpr * createablbinexpr __P((long Oper, ablexpr *Expr1, ablexpr *Expr2));
|
||||
extern ablexpr * createablnotexpr __P((ablexpr *Expr));
|
||||
extern ablexpr * createablxorbinexpr __P((long Oper, ablexpr *Expr1, ablexpr *Expr2));
|
||||
extern ablexpr * createablunaryexpr __P((long Oper, ablexpr *Expr));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Optim Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern ablexpr * optimablbinexpr __P((long Oper, ablexpr *Expr1, ablexpr *Expr2));
|
||||
extern ablexpr * optimablnotexpr __P((ablexpr *Expr));
|
||||
extern ablexpr * optimablxorbinexpr __P((long Oper, ablexpr *Expr1, ablexpr *Expr2));
|
||||
extern ablexpr * optimablunaryexpr __P((long Oper, ablexpr *Expr));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Add Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern void addablqexpr __P((ablexpr *Expr1, ablexpr *Expr2));
|
||||
extern void addablhexpr __P((ablexpr *Expr1, ablexpr *Expr2));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Duplicate Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern ablexpr * dupablexpr __P((ablexpr *Expr));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Del Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern void delablexpr __P((ablexpr *Expr));
|
||||
extern void delablexprnum __P((ablexpr *Expr, int Number));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Get Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern int getabloperpolar __P((long Oper));
|
||||
extern int getablopernot __P((long Oper));
|
||||
extern char * getablopername __P((long Oper));
|
||||
extern char * getabloperuppername __P((long Oper));
|
||||
extern long getabloperbyname __P((char *Name));
|
||||
|
||||
extern long getablexprdepth __P((ablexpr *Expr));
|
||||
extern long getablexprlength __P((ablexpr *Expr));
|
||||
extern long getablexprnumatom __P((ablexpr *Expr));
|
||||
extern long getablexprnumbinoper __P((ablexpr *Expr));
|
||||
extern long getablexprnumocc __P((ablexpr *Expr, char *Name));
|
||||
|
||||
extern ablexpr * getablexprnum __P((ablexpr *Expr, int Number));
|
||||
extern ablexpr * getablexprmin __P((int (*Function)(), ablexpr *Expr));
|
||||
extern ablexpr * getablexprmax __P((int (*Function)(), ablexpr *Expr));
|
||||
|
||||
extern void * getablexprsupport __P((ablexpr *Expr, int Mode));
|
||||
extern void * unionablexprsupport __P((void *Support, ablexpr *Expr, int Mode));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Is Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern int isablunaryoper __P((long Oper));
|
||||
extern int isablbinaryoper __P((long Oper));
|
||||
extern int isabloperinexpr __P((ablexpr *Expr, long Oper));
|
||||
extern int isablnameinexpr __P((ablexpr *Expr, char *Name));
|
||||
extern int isablequalexpr __P((ablexpr *Expr1, ablexpr *Expr2));
|
||||
extern int isablsimilarexpr __P((ablexpr *Expr1, ablexpr *Expr2));
|
||||
extern int isablnotexpr __P((ablexpr *Expr1, ablexpr *Expr2));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vhdl Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern char * vhdlablname __P((char *Name));
|
||||
extern char * vhdlablvector __P((char *Name, long *Index));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Map Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern void mapablexpr __P((void (*Function)(), ablexpr *Expr));
|
||||
extern ablexpr * mapabloperexpr __P((ablexpr *(*Function)(), long Oper, ablexpr *Expr));
|
||||
extern int mapablanyexpr __P((int (*Function)(), ablexpr *Expr));
|
||||
extern int mapableveryexpr __P((int (*Function)(), ablexpr *Expr));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Substitute Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern ablexpr * substablexpr __P((ablexpr *Expr1, char *Name, ablexpr *Expr2));
|
||||
extern ablexpr * substdupablexpr __P((ablexpr *Expr1, char *Name, ablexpr *Expr2));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Polar Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern ablexpr * polarablexpr __P((ablexpr *Expr, int Polar));
|
||||
extern ablexpr * polardupablexpr __P((ablexpr *Expr, int Polar));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Develop Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern ablexpr * devdupablxorexpr __P((ablexpr *Expr));
|
||||
extern ablexpr * devablxorexpr __P((ablexpr *Expr));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Simplify Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern ablexpr * simpablexpr __P((ablexpr *Expr));
|
||||
extern ablexpr * simpdupablexpr __P((ablexpr *Expr));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Simplify CTL Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern ablexpr * simpablctlexpr __P((ablexpr *Expr));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Normalisation CTL Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern ablexpr * normablctlexpr __P((ablexpr *Expr));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Flatten Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern void flatablexpr __P((ablexpr *Expr));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| UnFlatten Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern ablexpr * unflatablexpr __P((ablexpr *Expr));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| String Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern ablexpr * strablexpr __P((char *String, int Mode));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| View Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern void viewablexpr __P((ablexpr *Expr, int Mode));
|
||||
extern void viewablexprln __P((ablexpr *Expr, int Mode));
|
||||
extern void viewablexprfile __P((FILE *AblFile, ablexpr *Expr, int Mode));
|
||||
extern void viewablexprfileln __P((FILE *AblFile, ablexpr *Expr, int Mode));
|
||||
extern char * viewablexprstr __P((ablexpr *Expr, int Mode));
|
||||
extern char * viewablexprstrln __P((ablexpr *Expr, int Mode));
|
||||
|
||||
# endif
|
|
@ -0,0 +1,124 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : abladd.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "abladd.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ablexpr *AblQueueExpr = (ablexpr *)0;
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Add Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Add Abl Queue Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void addablqexpr( Expr1, Expr2 )
|
||||
|
||||
ablexpr *Expr1;
|
||||
ablexpr *Expr2;
|
||||
{
|
||||
if ( Expr2 == (ablexpr *)0 )
|
||||
{
|
||||
AblQueueExpr = Expr1; return;
|
||||
}
|
||||
|
||||
if ( Expr1 == (ablexpr *)0 )
|
||||
{
|
||||
Expr1 = AblQueueExpr;
|
||||
}
|
||||
else
|
||||
{
|
||||
while ( ABL_CDR( Expr1 ) != (ablexpr *)0 )
|
||||
{
|
||||
Expr1 = ABL_CDR( Expr1 );
|
||||
}
|
||||
}
|
||||
|
||||
AblQueueExpr = addchain( (ablexpr *)0, (void *)Expr2 );
|
||||
ABL_CDR( Expr1 ) = AblQueueExpr;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Add Abl Head Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void addablhexpr( Expr1, Expr2 )
|
||||
|
||||
ablexpr *Expr1;
|
||||
ablexpr *Expr2;
|
||||
{
|
||||
ABL_CDR( Expr1 ) = addchain( ABL_CDR( Expr1 ), (void *)Expr2 );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : abladd.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_ADD_H
|
||||
# define ABL_ADD_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,283 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablcreate.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "ablcreate.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Create Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Create Abl Atom |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *createablatom( Atom )
|
||||
|
||||
char *Atom;
|
||||
{
|
||||
return( addchain( (ablexpr *)0, (void *)namealloc( Atom ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Create Abl Atom Zero |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *createablatomzero()
|
||||
{
|
||||
return( addchain( (ablexpr *)0, (void *)ABL_ATOM_NAME_ZERO ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Create Abl Atom One |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *createablatomone()
|
||||
{
|
||||
return( addchain( (ablexpr *)0, (void *)ABL_ATOM_NAME_ONE ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Create Abl Atom Dc |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *createablatomdc()
|
||||
{
|
||||
return( addchain( (ablexpr *)0, (void *)ABL_ATOM_NAME_DC ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Create Abl Atom Tristate |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *createablatomtristate()
|
||||
{
|
||||
return( addchain( (ablexpr *)0, (void *)ABL_ATOM_NAME_TRISTATE ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Create Abl Oper |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *createabloper( Oper )
|
||||
|
||||
long Oper;
|
||||
{
|
||||
if ( ( Oper < 0 ) ||
|
||||
( Oper >= ABL_MAX_OPERATOR ) )
|
||||
{
|
||||
ablerror( ABL_OPERATOR_ERROR, Oper );
|
||||
}
|
||||
|
||||
return( addchain( (ablexpr *)0,
|
||||
(void *)addchain( (ablexpr *)0,
|
||||
(void *)Oper ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Create Abl Bin Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *createablbinexpr( Oper, Expr1, Expr2 )
|
||||
|
||||
long Oper;
|
||||
ablexpr *Expr1;
|
||||
ablexpr *Expr2;
|
||||
{
|
||||
ablexpr *Expr;
|
||||
|
||||
if ( ! isablbinaryoper( Oper ) )
|
||||
{
|
||||
ablerror( ABL_OPERATOR_ERROR, Oper );
|
||||
}
|
||||
|
||||
Expr = createabloper( Oper );
|
||||
|
||||
addablhexpr( Expr, Expr2 );
|
||||
addablhexpr( Expr, Expr1 );
|
||||
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Create Abl Not Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *createablnotexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *Expr1;
|
||||
char *AtomValue;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
AtomValue = ABL_ATOM_VALUE( Expr );
|
||||
|
||||
if ( AtomValue == ABL_ATOM_NAME_ONE )
|
||||
{
|
||||
ABL_ATOM_VALUE( Expr ) = (void *)ABL_ATOM_NAME_ZERO;
|
||||
|
||||
return( Expr );
|
||||
}
|
||||
else
|
||||
if ( AtomValue == ABL_ATOM_NAME_ZERO )
|
||||
{
|
||||
ABL_ATOM_VALUE( Expr ) = (void *)ABL_ATOM_NAME_ONE;
|
||||
|
||||
return( Expr );
|
||||
}
|
||||
}
|
||||
|
||||
Expr1 = createabloper( ABL_NOT );
|
||||
addablhexpr( Expr1, Expr );
|
||||
|
||||
return( Expr1 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Create Abl Xor Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *createablxorbinexpr( Oper, Expr1, Expr2 )
|
||||
|
||||
long Oper;
|
||||
ablexpr *Expr1;
|
||||
ablexpr *Expr2;
|
||||
{
|
||||
ablexpr *Expr;
|
||||
ablexpr *NotExpr1;
|
||||
ablexpr *NotExpr2;
|
||||
|
||||
if ( ( Oper != ABL_XOR ) &&
|
||||
( Oper != ABL_NXOR ) )
|
||||
{
|
||||
ablerror( ABL_OPERATOR_ERROR, Oper );
|
||||
}
|
||||
|
||||
NotExpr1 = createablnotexpr( dupablexpr( Expr1 ) );
|
||||
NotExpr2 = createablnotexpr( dupablexpr( Expr2 ) );
|
||||
|
||||
if ( Oper == ABL_XOR )
|
||||
{
|
||||
Expr = createablbinexpr( ABL_OR,
|
||||
createablbinexpr( ABL_AND, NotExpr1, Expr2 ),
|
||||
createablbinexpr( ABL_AND, Expr1 , NotExpr2 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
Expr = createablbinexpr( ABL_OR,
|
||||
createablbinexpr( ABL_AND, NotExpr1, NotExpr2 ),
|
||||
createablbinexpr( ABL_AND, Expr1 , Expr2 ) );
|
||||
}
|
||||
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Create Abl Unary Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *createablunaryexpr( Oper, Expr )
|
||||
|
||||
long Oper;
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *Expr1;
|
||||
|
||||
if ( ! isablunaryoper( Oper ) )
|
||||
{
|
||||
ablerror( ABL_NOT_UNARY_ERROR, Oper );
|
||||
}
|
||||
|
||||
Expr1 = createabloper( Oper );
|
||||
addablhexpr( Expr1, Expr );
|
||||
|
||||
return( Expr1 );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablcreate.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_CREATE_H
|
||||
# define ABL_CREATE_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,230 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablctlnorm.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : C G. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "ablctlnorm.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Normalisation Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ablexpr *local_normablctl( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
|
||||
{
|
||||
long Oper;
|
||||
ablexpr *NormExpr;
|
||||
ablexpr *ScanExpr;
|
||||
ablexpr *ExprG1;
|
||||
ablexpr *ExprG2;
|
||||
ablexpr *ExprTemp;
|
||||
ablexpr *ExprTemp2;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
Oper = ABL_OPER( Expr );
|
||||
|
||||
if ( ( Oper == ABL_EX ||
|
||||
Oper == ABL_EG ) &&
|
||||
( ABL_ATOM( ABL_CADR( Expr ) ) ) )
|
||||
{
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
/*----------------------------------------- */
|
||||
/* AX(f) -> !EX(!f) */
|
||||
/*----------------------------------------- */
|
||||
if ( Oper == ABL_AX )
|
||||
{
|
||||
NormExpr = local_normablctl( ABL_CADR( Expr ) );
|
||||
if ( NormExpr != ABL_CADR( Expr ) )
|
||||
ABL_CADR( Expr ) = NormExpr;
|
||||
ABL_CADR( Expr ) = createablnotexpr( ABL_CADR( Expr ) );
|
||||
ABL_OPER( Expr ) = ABL_EX;
|
||||
NormExpr = createablnotexpr( Expr );
|
||||
return( NormExpr );
|
||||
}
|
||||
|
||||
/*----------------------------------------- */
|
||||
/* EF(f) -> EU(True f) */
|
||||
/*----------------------------------------- */
|
||||
if ( Oper == ABL_EF )
|
||||
{
|
||||
NormExpr = local_normablctl( ABL_CADR( Expr ) );
|
||||
if ( NormExpr != ABL_CADR( Expr ) )
|
||||
ABL_CADR( Expr ) = NormExpr;
|
||||
ExprTemp = createablatom( ABL_ATOM_NAME_ONE );
|
||||
NormExpr = createablbinexpr( ABL_EU,
|
||||
ExprTemp,
|
||||
ABL_CADR( Expr )
|
||||
);
|
||||
freechain( ABL_CAR( Expr ) );
|
||||
freechain( Expr );
|
||||
return( NormExpr );
|
||||
}
|
||||
|
||||
/*----------------------------------------- */
|
||||
/* AF(f) -> !EG(!f) */
|
||||
/*----------------------------------------- */
|
||||
if ( Oper == ABL_AF )
|
||||
{
|
||||
NormExpr = local_normablctl( ABL_CADR( Expr ) );
|
||||
if ( NormExpr != ABL_CADR( Expr ) )
|
||||
ABL_CADR( Expr ) = NormExpr;
|
||||
ABL_CADR( Expr ) = createablnotexpr( ABL_CADR( Expr ) );
|
||||
ABL_OPER( Expr ) = ABL_EG;
|
||||
NormExpr = createablnotexpr( Expr );
|
||||
return( NormExpr );
|
||||
}
|
||||
|
||||
/*----------------------------------------- */
|
||||
/* AG(f) -> !EF(!f) */
|
||||
/*----------------------------------------- */
|
||||
if ( Oper == ABL_AG )
|
||||
{
|
||||
NormExpr = local_normablctl( ABL_CADR( Expr ) );
|
||||
if ( NormExpr != ABL_CADR( Expr ) )
|
||||
ABL_CADR( Expr ) = NormExpr;
|
||||
ABL_CADR( Expr ) = createablnotexpr( ABL_CADR( Expr ) );
|
||||
ABL_OPER( Expr ) = ABL_EF;
|
||||
NormExpr = createablnotexpr( Expr );
|
||||
NormExpr = local_normablctl( NormExpr );
|
||||
return( NormExpr );
|
||||
}
|
||||
|
||||
/*------------------------------------------- */
|
||||
/* AU(f g) -> AND(!EU(!g AND(!f !g)) !EG(!g)) */
|
||||
/*------------------------------------------- */
|
||||
if ( Oper == ABL_AU )
|
||||
{
|
||||
NormExpr = local_normablctl( ABL_CADR( Expr ) );
|
||||
if ( NormExpr != ABL_CADR( Expr ) )
|
||||
ABL_CADR( Expr ) = NormExpr;
|
||||
NormExpr = local_normablctl( ABL_CAR( ABL_CDDR( Expr ) ) );
|
||||
if ( NormExpr != ABL_CAR( ABL_CDDR( Expr ) ) )
|
||||
ABL_CAR( ABL_CDDR( Expr ) ) = NormExpr;
|
||||
|
||||
ABL_CADR( Expr ) = createablnotexpr( ABL_CADR( Expr ) );
|
||||
ABL_CAR( ABL_CDDR( Expr ) ) = createablnotexpr( ABL_CAR( ABL_CDDR( Expr ) ) );
|
||||
ExprG1 = dupablexpr( ABL_CAR( ABL_CDDR( Expr ) ) );
|
||||
ExprG2 = dupablexpr( ABL_CAR( ABL_CDDR( Expr ) ) );
|
||||
ExprTemp = createablbinexpr( ABL_AND,
|
||||
ABL_CADR( Expr ),
|
||||
ABL_CAR( ABL_CDDR( Expr ) )
|
||||
);
|
||||
ExprTemp = createablbinexpr( ABL_EU,
|
||||
ExprG1,
|
||||
ExprTemp
|
||||
);
|
||||
ExprTemp = createablnotexpr( ExprTemp );
|
||||
ExprTemp2 = createablunaryexpr( ABL_EG,
|
||||
ExprG2
|
||||
);
|
||||
ExprTemp2 = createablnotexpr( ExprTemp2 );
|
||||
NormExpr = createablbinexpr( ABL_AND,
|
||||
ExprTemp,
|
||||
ExprTemp2
|
||||
);
|
||||
freechain( ABL_CAR( Expr ) );
|
||||
freechain( Expr );
|
||||
return( NormExpr );
|
||||
}
|
||||
|
||||
|
||||
ScanExpr = Expr;
|
||||
NormExpr = Expr;
|
||||
|
||||
while ( ( ScanExpr = ABL_CDR( ScanExpr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
NormExpr = local_normablctl( ABL_CAR( ScanExpr ) );
|
||||
if ( NormExpr != ABL_CAR( ScanExpr ) )
|
||||
ABL_CAR( ScanExpr ) = NormExpr;
|
||||
NormExpr = Expr;
|
||||
}
|
||||
|
||||
return( NormExpr );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Abl Normalisation Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *normablctlexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
return( local_normablctl( Expr ) );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablctlnorm.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : C G |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_CTL_NORM_H
|
||||
# define ABL_CTL_NORM_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,406 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablctlsimp.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : C G. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "ablctlsimp.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Abl Simplification |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ablexpr *loc_simpablctl( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
long Oper;
|
||||
ablexpr *SimpExpr;
|
||||
ablexpr *ScanExpr;
|
||||
ablexpr *ExprTemp;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
Oper = ABL_OPER( Expr );
|
||||
|
||||
if ( ( Oper == ABL_AF ||
|
||||
Oper == ABL_AG ||
|
||||
Oper == ABL_AX ||
|
||||
Oper == ABL_EF ||
|
||||
Oper == ABL_EG ||
|
||||
Oper == ABL_EX ) &&
|
||||
( ABL_ATOM( ABL_CADR( Expr ) ) ) )
|
||||
{
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------*/
|
||||
/* AG(AG(f)) -> AG(f) */
|
||||
/* EF(EF(f)) -> EF(f) */
|
||||
/* EG(EG(f)) -> EG(f) */
|
||||
/* AF(AF(f)) -> AF(f) */
|
||||
/* AG(EF(AG(EF(f)))) -> EF(AG(EF(f))) */
|
||||
/* EF(AG(EF(AG(f)))) -> AG(EF(AG(f))) */
|
||||
/* AF(EG(AF(f))) -> EG(AF(f)) */
|
||||
/* EG(AF(EG(f))) -> AF(EG(f)) */
|
||||
/* AF(AG(AF(f))) -> AG(AF(f)) */
|
||||
/* AG(AF(AG(f))) -> AF(AG(f)) */
|
||||
/*----------------------------------------------*/
|
||||
if ( ( ( Oper == ABL_AG ||
|
||||
Oper == ABL_EF ||
|
||||
Oper == ABL_EG ||
|
||||
Oper == ABL_AF ) &&
|
||||
( ABL_OPER( ABL_CADR( Expr ) ) == Oper ) ) ||
|
||||
( Oper == ABL_AG &&
|
||||
ABL_OPER( ABL_CADR( Expr ) ) == ABL_EF &&
|
||||
ABL_OPER( ABL_CADR( ABL_CADR( Expr ) ) ) == ABL_AG &&
|
||||
ABL_OPER( ABL_CADR( ABL_CADR( ABL_CADR( Expr ) ) ) ) == ABL_EF ) ||
|
||||
( Oper == ABL_EF &&
|
||||
ABL_OPER( ABL_CADR( Expr ) ) == ABL_AG &&
|
||||
ABL_OPER( ABL_CADR( ABL_CADR( Expr ) ) ) == ABL_EF &&
|
||||
ABL_OPER( ABL_CADR( ABL_CADR( ABL_CADR( Expr ) ) ) ) == ABL_AG ) ||
|
||||
( Oper == ABL_AF &&
|
||||
ABL_OPER( ABL_CADR( Expr ) ) == ABL_EG &&
|
||||
ABL_OPER( ABL_CADR( ABL_CADR( Expr ) ) ) == ABL_AF ) ||
|
||||
( Oper == ABL_EG &&
|
||||
ABL_OPER( ABL_CADR( Expr ) ) == ABL_AF &&
|
||||
ABL_OPER( ABL_CADR( ABL_CADR( Expr ) ) ) == ABL_EG ) ||
|
||||
( Oper == ABL_AF &&
|
||||
ABL_OPER( ABL_CADR( Expr ) ) == ABL_AG &&
|
||||
ABL_OPER( ABL_CADR( ABL_CADR( Expr ) ) ) == ABL_AF ) ||
|
||||
( Oper == ABL_AG &&
|
||||
ABL_OPER( ABL_CADR( Expr ) ) == ABL_AF &&
|
||||
ABL_OPER( ABL_CADR( ABL_CADR( Expr ) ) ) == ABL_AG ) )
|
||||
{
|
||||
SimpExpr = ABL_CADR( Expr );
|
||||
freechain( ABL_CAR( Expr ) );
|
||||
freechain( Expr );
|
||||
|
||||
ExprTemp = loc_simpablctl( SimpExpr );
|
||||
if ( ExprTemp != SimpExpr )
|
||||
SimpExpr = ExprTemp;
|
||||
|
||||
return( SimpExpr );
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------*/
|
||||
/* AG(EG(f)) -> AG(f) */
|
||||
/* EF(AF(f)) -> EF(f) */
|
||||
/*----------------------------------------------*/
|
||||
if ( ( Oper == ABL_AG &&
|
||||
ABL_OPER( ABL_CADR( Expr ) ) == ABL_EG ) ||
|
||||
( Oper == ABL_EF &&
|
||||
ABL_OPER( ABL_CADR( Expr ) ) == ABL_AF ) )
|
||||
{
|
||||
ExprTemp = ABL_CADR( ABL_CADR( Expr ) );
|
||||
freechain( ABL_CAR( ABL_CADR( Expr ) ) );
|
||||
freechain( ABL_CADR( Expr ) );
|
||||
ABL_CADR( Expr ) = ExprTemp;
|
||||
SimpExpr = Expr;
|
||||
|
||||
ExprTemp = loc_simpablctl( SimpExpr );
|
||||
if ( ExprTemp != SimpExpr )
|
||||
SimpExpr = ExprTemp;
|
||||
|
||||
return( SimpExpr );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------*/
|
||||
/* AU(f AU(f g)) -> AU(f g) */
|
||||
/*----------------------------------------------*/
|
||||
if ( Oper == ABL_AU )
|
||||
{
|
||||
ExprTemp = loc_simpablctl( ABL_CADR( Expr ) );
|
||||
if ( ExprTemp != ABL_CADR( Expr ) )
|
||||
ABL_CADR( Expr ) = ExprTemp;
|
||||
ExprTemp = loc_simpablctl( ABL_CAR( ABL_CDDR( Expr ) ) );
|
||||
if ( ExprTemp != ABL_CAR( ABL_CDDR( Expr ) ) )
|
||||
ABL_CAR( ABL_CDDR( Expr ) ) = ExprTemp;
|
||||
|
||||
if ( ABL_OPER( ABL_CAR( ABL_CDDR( Expr ) ) ) == Oper &&
|
||||
ABL_CADR( Expr ) != (ablexpr *)0 &&
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR ( Expr ) ) ) != (ablexpr *)0 &&
|
||||
isablequalexpr( ABL_CADR( Expr ),
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR ( Expr ) ) ) ) )
|
||||
{
|
||||
SimpExpr = ABL_CAR( ABL_CDDR( Expr ) );
|
||||
delablexpr( ABL_CADR( Expr ) );
|
||||
freechain( ABL_CAR( Expr ) );
|
||||
freechain( Expr );
|
||||
|
||||
return( SimpExpr );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------*/
|
||||
/* AND(AG(f) AG(g)) -> AG(AND(f g)) */
|
||||
/* OR(EF(f) AG(g)) -> EF(OR(f g)) */
|
||||
/*----------------------------------------------*/
|
||||
if ( Oper == ABL_AND ||
|
||||
Oper == ABL_OR )
|
||||
{
|
||||
ExprTemp = loc_simpablctl( ABL_CADR( Expr ) );
|
||||
if ( ExprTemp != ABL_CADR( Expr ) )
|
||||
ABL_CADR( Expr ) = ExprTemp;
|
||||
ExprTemp = loc_simpablctl( ABL_CAR( ABL_CDDR( Expr ) ) );
|
||||
if ( ExprTemp != ABL_CAR( ABL_CDDR( Expr ) ) )
|
||||
ABL_CAR( ABL_CDDR( Expr ) ) = ExprTemp;
|
||||
|
||||
if ( ( Oper == ABL_AND &&
|
||||
ABL_OPER( ABL_CADR( Expr ) ) == ABL_AG &&
|
||||
ABL_OPER( ABL_CAR( ABL_CDDR( Expr ) ) ) == ABL_AG ) ||
|
||||
( Oper == ABL_OR &&
|
||||
ABL_OPER( ABL_CADR( Expr ) ) == ABL_EF &&
|
||||
ABL_OPER( ABL_CAR( ABL_CDDR( Expr ) ) ) == ABL_EF ) )
|
||||
{
|
||||
SimpExpr = createablbinexpr( Oper,
|
||||
ABL_CADR( ABL_CADR( Expr ) ),
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( Expr ) ) )
|
||||
);
|
||||
SimpExpr = createablunaryexpr( ABL_OPER( ABL_CADR( Expr ) ), SimpExpr );
|
||||
freechain( ABL_CAR( ABL_CAR( ABL_CDDR( Expr ) ) ) );
|
||||
freechain( ABL_CAR( ABL_CDDR( Expr ) ) );
|
||||
freechain( ABL_CAR( ABL_CADR( Expr ) ) );
|
||||
freechain( ABL_CADR( Expr ) );
|
||||
freechain( ABL_CAR( Expr ) );
|
||||
freechain( Expr );
|
||||
|
||||
return( SimpExpr );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------*/
|
||||
/* EG(OR(OR(EG(f) g) OR(f EG(g)))) */
|
||||
/* -> OR(EG(f) EG(g)) */
|
||||
/*----------------------------------------------*/
|
||||
if ( Oper == ABL_EG &&
|
||||
ABL_OPER( ABL_CADR( Expr ) ) == ABL_OR &&
|
||||
ABL_OPER( ABL_CADR( ABL_CADR( Expr ) ) ) == ABL_OR &&
|
||||
ABL_OPER( ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) ) == ABL_OR &&
|
||||
ABL_OPER( ABL_CADR( ABL_CADR( ABL_CADR( Expr ) ) ) ) == ABL_EG &&
|
||||
ABL_OPER( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) ) ) ) == ABL_EG &&
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) ) != (ablexpr *)0 &&
|
||||
ABL_CADR( ABL_CADR( ABL_CADR( ABL_CADR( Expr ) ) ) ) != (ablexpr *)0 &&
|
||||
isablequalexpr( ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) ),
|
||||
ABL_CADR( ABL_CADR( ABL_CADR( ABL_CADR( Expr ) ) ) ) ) &&
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR ( ABL_CADR( Expr ) ) ) ) ) ) != (ablexpr *)0 &&
|
||||
ABL_CAR( ABL_CDDR( ABL_CADR( ABL_CADR( Expr ) ) ) ) != (ablexpr *)0 &&
|
||||
isablequalexpr( ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) ) ) ),
|
||||
ABL_CAR( ABL_CDDR( ABL_CADR( ABL_CADR( Expr ) ) ) ) ) )
|
||||
{
|
||||
SimpExpr = createablbinexpr( ABL_OR,
|
||||
ABL_CADR( ABL_CADR( ABL_CADR( Expr ) ) ),
|
||||
ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) ) ) );
|
||||
ABL_CADR( ABL_CADR( ABL_CADR( Expr ) ) ) = (ablexpr *)0;
|
||||
ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) ) ) = (ablexpr *)0;
|
||||
freeablexpr( Expr );
|
||||
|
||||
ExprTemp = loc_simpablctl( ABL_CADR( SimpExpr ) );
|
||||
if ( ExprTemp != ABL_CADR( SimpExpr ) )
|
||||
ABL_CADR( SimpExpr ) = ExprTemp;
|
||||
ExprTemp = loc_simpablctl( ABL_CAR( ABL_CDDR( SimpExpr ) ) );
|
||||
if ( ExprTemp != ABL_CAR( ABL_CDDR( SimpExpr ) ) )
|
||||
ABL_CAR( ABL_CDDR( SimpExpr ) ) = ExprTemp;
|
||||
|
||||
return( SimpExpr );
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------*/
|
||||
/* AF(OR(AND(f AF(g)) AND(AF(f) g))) */
|
||||
/* -> AND(AF(f) AF(g)) */
|
||||
/*----------------------------------------------*/
|
||||
if ( Oper == ABL_AF &&
|
||||
ABL_OPER( ABL_CADR( Expr ) ) == ABL_OR &&
|
||||
ABL_OPER( ABL_CADR( ABL_CADR( Expr ) ) ) == ABL_AND &&
|
||||
ABL_OPER( ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) ) == ABL_AND &&
|
||||
ABL_OPER( ABL_CAR( ABL_CDDR( ABL_CADR( ABL_CADR( Expr ) ) ) ) ) == ABL_AF &&
|
||||
ABL_OPER( ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) ) ) == ABL_AF &&
|
||||
ABL_CADR( ABL_CADR( ABL_CADR( Expr ) ) ) != (ablexpr *)0 &&
|
||||
ABL_CADR( ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) ) ) != (ablexpr *)0 &&
|
||||
isablequalexpr( ABL_CADR( ABL_CADR( ABL_CADR( Expr ) ) ),
|
||||
ABL_CADR( ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) ) ) ) &&
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CADR( ABL_CADR( Expr ) ) ) ) ) != (ablexpr *)0 &&
|
||||
ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR ( ABL_CADR( Expr ) ) ) ) ) != (ablexpr *)0 &&
|
||||
isablequalexpr( ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CADR( ABL_CADR( Expr ) ) ) ) ),
|
||||
ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR ( ABL_CADR( Expr ) ) ) ) ) ) )
|
||||
{
|
||||
SimpExpr = createablbinexpr( ABL_AND,
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) ),
|
||||
ABL_CAR( ABL_CDDR( ABL_CADR( ABL_CADR( Expr ) ) ) ) );
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) ) = (ablexpr *)0;
|
||||
ABL_CAR( ABL_CDDR( ABL_CADR( ABL_CADR( Expr ) ) ) ) = (ablexpr *)0;
|
||||
freeablexpr( Expr );
|
||||
|
||||
ExprTemp = loc_simpablctl( ABL_CADR( SimpExpr ) );
|
||||
if ( ExprTemp != ABL_CADR( SimpExpr ) )
|
||||
ABL_CADR( SimpExpr ) = ExprTemp;
|
||||
ExprTemp = loc_simpablctl( ABL_CAR( ABL_CDDR( SimpExpr ) ) );
|
||||
if ( ExprTemp != ABL_CAR( ABL_CDDR( SimpExpr ) ) )
|
||||
ABL_CAR( ABL_CDDR( SimpExpr ) ) = ExprTemp;
|
||||
|
||||
return( SimpExpr );
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------*/
|
||||
/* AU(AND(f f') OR(AND(g AU(f' g')) AND(g' AU(f g)))) */
|
||||
/* -> AND(AU(f g) EU(f' g')) */
|
||||
/*----------------------------------------------------*/
|
||||
if ( Oper == ABL_AU &&
|
||||
ABL_OPER( ABL_CADR( Expr ) ) == ABL_AND &&
|
||||
ABL_OPER( ABL_CAR( ABL_CDDR( Expr ) ) ) == ABL_OR &&
|
||||
ABL_OPER( ABL_CADR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) == ABL_AND &&
|
||||
ABL_OPER( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) == ABL_AND &&
|
||||
ABL_OPER( ABL_CAR( ABL_CDDR( ABL_CADR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) ) == ABL_AU &&
|
||||
ABL_OPER( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) ) ) == ABL_AU &&
|
||||
ABL_CADR( ABL_CADR( Expr ) ) != (ablexpr *)0 &&
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) ) ) != (ablexpr *)0 &&
|
||||
isablequalexpr( ABL_CADR( ABL_CADR( Expr ) ),
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) ) ) ) &&
|
||||
ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) != (ablexpr *)0 &&
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CADR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) ) != (ablexpr *)0 &&
|
||||
isablequalexpr( ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ),
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CADR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) ) ) &&
|
||||
ABL_CADR( ABL_CADR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) != (ablexpr *)0 &&
|
||||
ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) ) ) ) != (ablexpr *)0 &&
|
||||
isablequalexpr( ABL_CADR( ABL_CADR( ABL_CAR( ABL_CDDR( Expr ) ) ) ),
|
||||
ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) ) ) ) ) &&
|
||||
ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( ABL_CADR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) ) ) != (ablexpr *)0 &&
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) != (ablexpr *)0 &&
|
||||
isablequalexpr( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( ABL_CADR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) ) ),
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) )
|
||||
)
|
||||
{
|
||||
ExprTemp = createablbinexpr( ABL_AU,
|
||||
ABL_CADR( ABL_CADR( Expr ) ),
|
||||
ABL_CADR( ABL_CADR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) );
|
||||
ABL_CADR( ABL_CADR( Expr ) ) = (ablexpr *)0;
|
||||
ABL_CADR( ABL_CADR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) = (ablexpr *)0;
|
||||
SimpExpr = createablbinexpr( ABL_EU,
|
||||
ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ),
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) );
|
||||
ABL_CAR( ABL_CDDR( ABL_CADR( Expr ) ) ) = (ablexpr *)0;
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( Expr ) ) ) ) ) = (ablexpr *)0;
|
||||
SimpExpr = createablbinexpr( ABL_AND,
|
||||
ExprTemp,
|
||||
SimpExpr );
|
||||
freeablexpr( Expr );
|
||||
|
||||
ExprTemp = loc_simpablctl( ABL_CADR( ABL_CADR( SimpExpr ) ) );
|
||||
if ( ExprTemp != ABL_CADR( ABL_CADR( SimpExpr ) ) )
|
||||
ABL_CADR( ABL_CADR( SimpExpr ) ) = ExprTemp;
|
||||
ExprTemp = loc_simpablctl( ABL_CAR( ABL_CDDR( ABL_CADR( SimpExpr ) ) ) );
|
||||
if ( ExprTemp != ABL_CAR( ABL_CDDR( ABL_CADR( SimpExpr ) ) ) )
|
||||
ABL_CAR( ABL_CDDR( ABL_CADR( SimpExpr ) ) ) = ExprTemp;
|
||||
ExprTemp = loc_simpablctl( ABL_CADR( ABL_CAR( ABL_CDDR( SimpExpr ) ) ) );
|
||||
if ( ExprTemp != ABL_CADR( ABL_CAR( ABL_CDDR( SimpExpr ) ) ) )
|
||||
ABL_CADR( ABL_CAR( ABL_CDDR( SimpExpr ) ) ) = ExprTemp;
|
||||
ExprTemp = loc_simpablctl( ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( SimpExpr ) ) ) ) );
|
||||
if ( ExprTemp != ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( SimpExpr ) ) ) ) )
|
||||
ABL_CAR( ABL_CDDR( ABL_CAR( ABL_CDDR( SimpExpr ) ) ) ) = ExprTemp;
|
||||
|
||||
return( SimpExpr );
|
||||
}
|
||||
|
||||
|
||||
ScanExpr = Expr;
|
||||
SimpExpr = Expr;
|
||||
|
||||
while ( ( ScanExpr = ABL_CDR( ScanExpr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
SimpExpr = loc_simpablctl( ABL_CAR( ScanExpr ) );
|
||||
if ( SimpExpr != ABL_CAR( ScanExpr ) )
|
||||
ABL_CAR( ScanExpr ) = SimpExpr;
|
||||
SimpExpr = Expr;
|
||||
}
|
||||
|
||||
return( SimpExpr );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Abl Simplification Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *simpablctlexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
return( loc_simpablctl( Expr ) );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablctlsimp.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : C G |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_CTL_SIMP_H
|
||||
# define ABL_CTL_SIMP_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,144 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : abldel.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "abldel.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Del Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Del Abl Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void delablexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *ScanExpr;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
freechain( Expr );
|
||||
}
|
||||
else
|
||||
{
|
||||
ScanExpr = Expr;
|
||||
|
||||
freechain( ABL_CAR( Expr ) );
|
||||
|
||||
while ( ( ScanExpr = ABL_CDR( ScanExpr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
delablexpr( ABL_CAR( ScanExpr ) );
|
||||
}
|
||||
|
||||
freechain( Expr );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Del Abl Expr Number |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void delablexprnum( Expr, Number )
|
||||
|
||||
ablexpr *Expr;
|
||||
int Number;
|
||||
{
|
||||
ablexpr *PrevExpr;
|
||||
int Counter;
|
||||
|
||||
if ( ! ABL_ATOM( Expr ) )
|
||||
{
|
||||
PrevExpr = Expr;
|
||||
Counter = 0;
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
if ( Counter == Number )
|
||||
{
|
||||
ABL_CDR( PrevExpr ) = ABL_CDR( Expr );
|
||||
ABL_CDR( Expr ) = (ablexpr *)0;
|
||||
|
||||
delablexpr( ABL_CAR( Expr ) );
|
||||
freechain( Expr );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Counter = Counter + 1;
|
||||
PrevExpr = Expr;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : abldel.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_DEL_H
|
||||
# define ABL_DEL_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,176 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : abldev.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "abldev.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Develop Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Develop Duplicate Abl Xor Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *devdupablxorexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *ExprDev;
|
||||
ablexpr *ExprQueue;
|
||||
long Oper;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
return( addchain( (ablexpr *)0, ABL_CAR( Expr ) ) );
|
||||
}
|
||||
|
||||
Oper = ABL_OPER( Expr );
|
||||
|
||||
if ( ( Oper == ABL_XOR ) ||
|
||||
( Oper == ABL_NXOR ) )
|
||||
{
|
||||
Expr = ABL_CDR( Expr );
|
||||
ExprDev = dupablexpr( ABL_CAR( Expr ) );
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
ExprDev = optimablxorbinexpr( Oper,
|
||||
ExprDev,
|
||||
devdupablxorexpr( ABL_CAR( Expr ) ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ExprDev = addchain( (ablexpr *)0,
|
||||
(void *)addchain( (ablexpr *)0,
|
||||
(void *)Oper ) );
|
||||
ExprQueue = ExprDev;
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
ABL_CDR( ExprQueue ) = addchain( (ablexpr *)0,
|
||||
(void *)devdupablxorexpr( ABL_CAR( Expr ) ) );
|
||||
ExprQueue = ABL_CDR( ExprQueue );
|
||||
}
|
||||
}
|
||||
|
||||
return( ExprDev );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Develop Abl Xor Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *devablxorexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *ExprDev;
|
||||
ablexpr *ScanExpr;
|
||||
long Oper;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
Oper = ABL_OPER( Expr );
|
||||
|
||||
if ( ( Oper == ABL_XOR ) ||
|
||||
( Oper == ABL_NXOR ) )
|
||||
{
|
||||
ScanExpr = ABL_CDR( Expr );
|
||||
ExprDev = ABL_CAR( ScanExpr );
|
||||
|
||||
while ( ( ScanExpr = ABL_CDR( ScanExpr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
ExprDev = optimablxorbinexpr( Oper,
|
||||
ExprDev,
|
||||
devablxorexpr( ABL_CAR( ScanExpr ) ) );
|
||||
}
|
||||
|
||||
freechain( Expr );
|
||||
}
|
||||
else
|
||||
{
|
||||
ExprDev = Expr;
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
ABL_CAR( Expr ) = (void *)devablxorexpr( ABL_CAR( Expr ) );
|
||||
}
|
||||
}
|
||||
|
||||
return( ExprDev );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : abldev.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_DEV_H
|
||||
# define ABL_DEV_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,108 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : abldup.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "abldup.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Dup Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Duplicate Abl Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *dupablexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *ExprDup;
|
||||
ablexpr *ExprQueue;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
return( addchain( (ablexpr *)0, ABL_CAR( Expr ) ) );
|
||||
}
|
||||
|
||||
ExprDup = addchain( (ablexpr *)0,
|
||||
(void *)addchain( (ablexpr *)0,
|
||||
(void *)ABL_OPER( Expr ) ) );
|
||||
ExprQueue = ExprDup;
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
ABL_CDR( ExprQueue ) = addchain( (ablexpr *)0,
|
||||
(void *)dupablexpr( ABL_CAR( Expr ) ) );
|
||||
ExprQueue = ABL_CDR( ExprQueue );
|
||||
}
|
||||
|
||||
return( ExprDup );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : abldup.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_DUP_H
|
||||
# define ABL_DUP_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,120 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablenv.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "ablis.h"
|
||||
# include "ablenv.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
char *ABL_OPERATOR_NAME[ ABL_MAX_OPERATOR ];
|
||||
|
||||
char *ABL_OPERATOR_UPPER_NAME[ ABL_MAX_OPERATOR ] =
|
||||
{
|
||||
"OR", /* ABL_OR */
|
||||
"AND", /* ABL_AND */
|
||||
"XOR", /* ABL_XOR */
|
||||
"NOT", /* ABL_NOT */
|
||||
"NOR", /* ABL_NOR */
|
||||
"NAND", /* ABL_NAND */
|
||||
"NXOR", /* ABL_NXOR */
|
||||
"STABLE", /* ABL_STABLE */
|
||||
"AF", /* ABL_AF */
|
||||
"AG", /* ABL_AG */
|
||||
"AX", /* ABL_AX */
|
||||
"AU", /* ABL_AU */
|
||||
"EF", /* ABL_EF */
|
||||
"EG", /* ABL_EG */
|
||||
"EX", /* ABL_EX */
|
||||
"EU" /* ABL_EU */
|
||||
};
|
||||
|
||||
char *ABL_ATOM_NAME_ONE;
|
||||
char *ABL_ATOM_NAME_ZERO;
|
||||
char *ABL_ATOM_NAME_DC;
|
||||
char *ABL_ATOM_NAME_TRISTATE;
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Abl Env |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void ablenv()
|
||||
{
|
||||
int Index;
|
||||
|
||||
ABL_ATOM_NAME_ZERO = namealloc( "'0'" );
|
||||
ABL_ATOM_NAME_ONE = namealloc( "'1'" );
|
||||
ABL_ATOM_NAME_DC = namealloc( "'d'" );
|
||||
ABL_ATOM_NAME_TRISTATE = namealloc( "'z'" );
|
||||
|
||||
for ( Index = 0; Index < ABL_MAX_OPERATOR; Index++ )
|
||||
{
|
||||
ABL_OPERATOR_NAME[ Index ] = namealloc( ABL_OPERATOR_UPPER_NAME[ Index ] );
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablenv.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_ENV_H
|
||||
# define ABL_ENV_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,107 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : Abl Errors |
|
||||
| |
|
||||
| Authors : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void abl_error( Error, Text, File, Line )
|
||||
|
||||
int Error;
|
||||
char *Text;
|
||||
char *File;
|
||||
long Line;
|
||||
{
|
||||
char *Name;
|
||||
|
||||
Name = mbkstrdup( File );
|
||||
Name[ strlen( File ) - 1 ] = '\0';
|
||||
|
||||
fprintf( stderr, "%s%ld ", Name, Line );
|
||||
|
||||
switch( Error )
|
||||
{
|
||||
case ABL_OPERATOR_ERROR :
|
||||
|
||||
fprintf( stderr, "bad operator %ld !\n", (long)Text );
|
||||
|
||||
break;
|
||||
|
||||
case ABL_NOT_UNARY_ERROR :
|
||||
|
||||
fprintf( stderr, "not unary operator %ld !\n", (long)Text );
|
||||
|
||||
break;
|
||||
|
||||
default :
|
||||
|
||||
fprintf( stderr, "unknown internal error %d !\n", Error );
|
||||
}
|
||||
|
||||
autexit( 1 );
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : Abl Errors |
|
||||
| |
|
||||
| Authors : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_ERROR_H
|
||||
# define ABL_ERROR_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# define ABL_OPERATOR_ERROR 0
|
||||
# define ABL_NOT_UNARY_ERROR 1
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macros |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# define ablerror( E, V ) (abl_error( (int)(E), (char *)(V), __FILE__, __LINE__ ))
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
extern void abl_error __P((int Error, char *Text, char *File, long Line));
|
||||
|
||||
# endif
|
|
@ -0,0 +1,145 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablflat.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "ablflat.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Flat Abl Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void flatablexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *ScanExpr;
|
||||
ablexpr *ExprFlat;
|
||||
ablexpr *ExprPrev;
|
||||
long Oper;
|
||||
int Binary;
|
||||
int Polar;
|
||||
|
||||
if ( ! ABL_ATOM( Expr ) )
|
||||
{
|
||||
Oper = ABL_OPER( Expr );
|
||||
|
||||
Binary = isablbinaryoper( Oper );
|
||||
|
||||
if ( Binary == 0 )
|
||||
{
|
||||
flatablexpr( ABL_CADR( Expr ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
Polar = getabloperpolar( Oper );
|
||||
ExprPrev = ScanExpr = Expr;
|
||||
|
||||
while ( ( ScanExpr = ABL_CDR( ScanExpr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
ExprFlat = ABL_CAR( ScanExpr );
|
||||
|
||||
if ( ! ABL_ATOM( ExprFlat ) )
|
||||
{
|
||||
if ( ( Polar == ABL_POLAR_POSITIVE ) &&
|
||||
( Binary == 1 ) &&
|
||||
( ABL_OPER( ExprFlat ) == Oper ) )
|
||||
{
|
||||
ABL_CDR( ExprPrev ) = ABL_CDR( ExprFlat );
|
||||
|
||||
while ( ABL_CDR( ExprFlat ) != (ablexpr *)0 )
|
||||
{
|
||||
ExprFlat = ABL_CDR( ExprFlat );
|
||||
}
|
||||
|
||||
ABL_CDR( ExprFlat ) = ABL_CDR( ScanExpr );
|
||||
ABL_CDR( ScanExpr ) = (ablexpr *)0;
|
||||
ExprFlat = ABL_CAR( ScanExpr );
|
||||
ABL_CDR( ExprFlat ) = (ablexpr *)0;
|
||||
|
||||
freechain( ScanExpr );
|
||||
freechain( ABL_CAR( ExprFlat ) );
|
||||
freechain( ExprFlat );
|
||||
|
||||
ScanExpr = ExprPrev;
|
||||
}
|
||||
else
|
||||
{
|
||||
flatablexpr( ExprFlat );
|
||||
ExprPrev = ScanExpr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ExprPrev = ScanExpr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablflat.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_FLAT_H
|
||||
# define ABL_FLAT_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,115 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablfree.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include "ablfree.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Abl Free Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Abl Free Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freeablexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *ScanExpr;
|
||||
|
||||
if ( Expr != (ablexpr *)0 )
|
||||
{
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
freechain( Expr );
|
||||
}
|
||||
else
|
||||
{
|
||||
ScanExpr = Expr;
|
||||
|
||||
if ( ABL_CAR( Expr ) != (ablexpr *)0 )
|
||||
{
|
||||
ABL_CDR( ABL_CAR( Expr ) ) = (ablexpr *)0;
|
||||
|
||||
freechain( ABL_CAR( Expr ) );
|
||||
}
|
||||
|
||||
while ( ( ScanExpr = ABL_CDR( ScanExpr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
freeablexpr( ABL_CAR( ScanExpr ) );
|
||||
}
|
||||
|
||||
freechain( Expr );
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablfree.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_FREE_H
|
||||
# define ABL_FREE_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,635 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablget.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "ablget.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static chain_list *AblGetHeadChain = (chain_list *)0;
|
||||
static ptype_list *AblGetHeadPType = (ptype_list *)0;
|
||||
|
||||
static char *AblGetName = (char *)0;
|
||||
|
||||
static int AblOperPolarity[ ABL_MAX_OPERATOR ] =
|
||||
{
|
||||
ABL_POLAR_POSITIVE, /* ABL_OR */
|
||||
ABL_POLAR_POSITIVE, /* ABL_AND */
|
||||
ABL_POLAR_POSITIVE, /* ABL_XOR */
|
||||
ABL_POLAR_NEGATIVE, /* ABL_NOT */
|
||||
ABL_POLAR_NEGATIVE, /* ABL_NOR */
|
||||
ABL_POLAR_NEGATIVE, /* ABL_NAND */
|
||||
ABL_POLAR_NEGATIVE, /* ABL_NXOR */
|
||||
ABL_POLAR_POSITIVE, /* ABL_STABLE */
|
||||
ABL_POLAR_POSITIVE, /* ABL_AF */
|
||||
ABL_POLAR_POSITIVE, /* ABL_AG */
|
||||
ABL_POLAR_POSITIVE, /* ABL_AX */
|
||||
ABL_POLAR_POSITIVE, /* ABL_AU */
|
||||
ABL_POLAR_POSITIVE, /* ABL_EF */
|
||||
ABL_POLAR_POSITIVE, /* ABL_EG */
|
||||
ABL_POLAR_POSITIVE, /* ABL_EX */
|
||||
ABL_POLAR_POSITIVE /* ABL_EU */
|
||||
};
|
||||
|
||||
static long AblOperNotTable[ ABL_MAX_OPERATOR ] =
|
||||
{
|
||||
ABL_NOR, /* ABL_OR */
|
||||
ABL_NAND, /* ABL_AND */
|
||||
ABL_NXOR, /* ABL_XOR */
|
||||
-1, /* ABL_NOT */
|
||||
ABL_OR, /* ABL_NOR */
|
||||
ABL_AND, /* ABL_NAND */
|
||||
ABL_XOR, /* ABL_NXOR */
|
||||
-1, /* ABL_STABLE */
|
||||
-1, /* ABL_AF */
|
||||
-1, /* ABL_AG */
|
||||
-1, /* ABL_AX */
|
||||
-1, /* ABL_AU */
|
||||
-1, /* ABL_EF */
|
||||
-1, /* ABL_EG */
|
||||
-1, /* ABL_EX */
|
||||
-1 /* ABL_EU */
|
||||
};
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Operator Name |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
char *getablopername( Oper )
|
||||
|
||||
long Oper;
|
||||
{
|
||||
if ( ( Oper < 0 ) ||
|
||||
( Oper >= ABL_MAX_OPERATOR ) )
|
||||
{
|
||||
return( (char *)0 );
|
||||
}
|
||||
|
||||
return( ABL_OPERATOR_NAME[ Oper ] );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Upper Operator Name |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
char *getabloperuppername( Oper )
|
||||
|
||||
long Oper;
|
||||
{
|
||||
if ( ( Oper < 0 ) ||
|
||||
( Oper >= ABL_MAX_OPERATOR ) )
|
||||
{
|
||||
return( (char *)0 );
|
||||
}
|
||||
|
||||
return( ABL_OPERATOR_UPPER_NAME[ Oper ] );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Operator Polarity |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int getabloperpolar( Oper )
|
||||
|
||||
long Oper;
|
||||
{
|
||||
if ( ( Oper < 0 ) ||
|
||||
( Oper >= ABL_MAX_OPERATOR ) )
|
||||
{
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
return( AblOperPolarity[ Oper ] );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Not Operator |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int getablopernot( Oper )
|
||||
|
||||
long Oper;
|
||||
{
|
||||
if ( ( Oper < 0 ) ||
|
||||
( Oper >= ABL_MAX_OPERATOR ) )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
return( AblOperNotTable[ Oper ] );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Operator By Name |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
long getabloperbyname( Name )
|
||||
|
||||
char *Name;
|
||||
{
|
||||
int Oper;
|
||||
|
||||
Name = namealloc( Name );
|
||||
|
||||
for ( Oper = 0; Oper < ABL_MAX_OPERATOR; Oper++ )
|
||||
{
|
||||
if ( ABL_OPERATOR_NAME[ Oper ] == Name )
|
||||
{
|
||||
return( Oper );
|
||||
}
|
||||
}
|
||||
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Expr Depth |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
long getablexprdepth( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
long NumberOper;
|
||||
long MaxDepth;
|
||||
long CarDepth;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
MaxDepth = 0;
|
||||
NumberOper = 0;
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (chain_list *)0 )
|
||||
{
|
||||
CarDepth = getablexprdepth( ABL_CAR( Expr ) );
|
||||
|
||||
if ( CarDepth > MaxDepth ) MaxDepth = CarDepth;
|
||||
|
||||
NumberOper++;
|
||||
}
|
||||
|
||||
if ( NumberOper > 1 ) NumberOper--;
|
||||
|
||||
return( MaxDepth + NumberOper );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Expr Length |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
long getablexprlength( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
long Length;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
Length = 0;
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
Length += 1;
|
||||
}
|
||||
|
||||
return( Length );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Expr Number Atom |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
long getablexprnumatom( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
long Number;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
Number = 0;
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
Number += getablexprnumatom( ABL_CAR( Expr ) );
|
||||
}
|
||||
|
||||
return( Number );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Expr Number Oper |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
long getablexprnumbinoper( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
long Number;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
if ( isablunaryoper( ABL_OPER( Expr ) ) )
|
||||
{
|
||||
return( getablexprnumbinoper( ABL_CADR( Expr ) ) );
|
||||
}
|
||||
|
||||
Number = 0;
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
Number += 1 + getablexprnumbinoper( ABL_CAR( Expr ) );
|
||||
}
|
||||
|
||||
return( Number -1 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Expr Atom Chain |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_getablsupportchain( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *ScanName;
|
||||
ablexpr **PrevName;
|
||||
char *AtomValue;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
AtomValue = ABL_ATOM_VALUE( Expr );
|
||||
|
||||
if ( ( AtomValue != ABL_ATOM_NAME_ONE ) &&
|
||||
( AtomValue != ABL_ATOM_NAME_ZERO ) &&
|
||||
( AtomValue != ABL_ATOM_NAME_DC ) &&
|
||||
( AtomValue != ABL_ATOM_NAME_TRISTATE ) )
|
||||
{
|
||||
PrevName = &AblGetHeadChain;
|
||||
|
||||
for ( ScanName = AblGetHeadChain;
|
||||
ScanName != (chain_list *)0;
|
||||
ScanName = ScanName->NEXT )
|
||||
{
|
||||
if ( ScanName->DATA == (void *)AtomValue ) return;
|
||||
|
||||
PrevName = &ScanName->NEXT;
|
||||
}
|
||||
|
||||
*PrevName = addchain( (chain_list *)0, (void *)AtomValue );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
loc_getablsupportchain( ABL_CAR( Expr ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Expr Atom PType |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_getablsupportptype( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ptype_list *ScanName;
|
||||
ptype_list **PrevName;
|
||||
char *AtomValue;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
AtomValue = ABL_ATOM_VALUE( Expr );
|
||||
|
||||
if ( ( AtomValue != ABL_ATOM_NAME_ONE ) &&
|
||||
( AtomValue != ABL_ATOM_NAME_ZERO ) &&
|
||||
( AtomValue != ABL_ATOM_NAME_DC ) &&
|
||||
( AtomValue != ABL_ATOM_NAME_TRISTATE ) )
|
||||
{
|
||||
PrevName = &AblGetHeadPType;
|
||||
|
||||
for ( ScanName = AblGetHeadPType;
|
||||
ScanName != (ptype_list *)0;
|
||||
ScanName = ScanName->NEXT )
|
||||
{
|
||||
if ( ScanName->DATA == (void *)AtomValue ) return;
|
||||
|
||||
PrevName = &ScanName->NEXT;
|
||||
}
|
||||
|
||||
*PrevName = addptype( (ptype_list *)0, 0, (void *)AtomValue );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
loc_getablsupportptype( ABL_CAR( Expr ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Expr Support |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void *getablexprsupport( Expr, Mode )
|
||||
|
||||
ablexpr *Expr;
|
||||
int Mode;
|
||||
{
|
||||
if ( Mode == ABL_SUPPORT_CHAIN )
|
||||
{
|
||||
AblGetHeadChain = (chain_list *)0;
|
||||
loc_getablsupportchain( Expr );
|
||||
|
||||
return( (void *)AblGetHeadChain );
|
||||
}
|
||||
|
||||
AblGetHeadPType = (ptype_list *)0;
|
||||
loc_getablsupportptype( Expr );
|
||||
|
||||
return( (void *)AblGetHeadPType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Expr Support |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void *unionablexprsupport( Support, Expr, Mode )
|
||||
|
||||
void *Support;
|
||||
ablexpr *Expr;
|
||||
int Mode;
|
||||
{
|
||||
if ( Mode == ABL_SUPPORT_CHAIN )
|
||||
{
|
||||
AblGetHeadChain = (chain_list *)Support;
|
||||
loc_getablsupportchain( Expr );
|
||||
|
||||
return( (void *)AblGetHeadChain );
|
||||
}
|
||||
|
||||
AblGetHeadPType = (ptype_list *)Support;
|
||||
loc_getablsupportptype( Expr );
|
||||
|
||||
return( (void *)AblGetHeadPType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Local Expr Number Occur |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static long loc_getablnumocc( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
long Number;
|
||||
|
||||
if ( ( ABL_ATOM( Expr ) ) &&
|
||||
( ABL_ATOM_VALUE( Expr ) == AblGetName ) )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
Number = 0;
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
Number += loc_getablnumocc( ABL_CAR( Expr ) );
|
||||
}
|
||||
|
||||
return( Number );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Expr Number Occur |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
long getablexprnumocc( Expr, Name )
|
||||
|
||||
ablexpr *Expr;
|
||||
char *Name;
|
||||
{
|
||||
AblGetName = namealloc( Name );
|
||||
|
||||
return( loc_getablnumocc( Expr ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Max Expression |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *getablexprmax( Function, Expr )
|
||||
|
||||
int (*Function)();
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *MaxExpr;
|
||||
long Maximum;
|
||||
long Value;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
Expr = ABL_CDR( Expr );
|
||||
MaxExpr = ABL_CAR( Expr );
|
||||
Maximum = (*Function)( MaxExpr );
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
Value = (*Function)( ABL_CAR( Expr ) );
|
||||
|
||||
if ( Value > Maximum )
|
||||
{
|
||||
Maximum = Value;
|
||||
MaxExpr = ABL_CAR( Expr );
|
||||
}
|
||||
}
|
||||
|
||||
return( MaxExpr );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Min Expression |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *getablexprmin( Function, Expr )
|
||||
|
||||
int (*Function)();
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *MinExpr;
|
||||
long Minimum;
|
||||
long Value;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
Expr = ABL_CDR( Expr );
|
||||
MinExpr = ABL_CAR( Expr );
|
||||
Minimum = (*Function)( MinExpr );
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
Value = (*Function)( ABL_CAR( Expr ) );
|
||||
|
||||
if ( Value < Minimum )
|
||||
{
|
||||
Minimum = Value;
|
||||
MinExpr = ABL_CAR( Expr );
|
||||
}
|
||||
}
|
||||
|
||||
return( MinExpr );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Abl Expression Number |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *getablexprnum( Expr, Number )
|
||||
|
||||
ablexpr *Expr;
|
||||
int Number;
|
||||
{
|
||||
int Counter;
|
||||
|
||||
if ( ! ABL_ATOM( Expr ) )
|
||||
{
|
||||
Counter = 0;
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
if ( Counter == Number ) return( ABL_CAR( Expr ) );
|
||||
|
||||
Counter = Counter + 1;
|
||||
}
|
||||
}
|
||||
|
||||
return( (ablexpr *)0 );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablget.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_GET_H
|
||||
# define ABL_GET_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,369 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablis.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "ablis.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int AblOperBinary[ ABL_MAX_OPERATOR ] =
|
||||
{
|
||||
1, /* ABL_OR */
|
||||
1, /* ABL_AND */
|
||||
1, /* ABL_XOR */
|
||||
0, /* ABL_NOT */
|
||||
1, /* ABL_NOR */
|
||||
1, /* ABL_NAND */
|
||||
1, /* ABL_NXOR */
|
||||
0, /* ABL_STABLE */
|
||||
0, /* ABL_AF */
|
||||
0, /* ABL_AG */
|
||||
0, /* ABL_AX */
|
||||
2, /* ABL_AU */
|
||||
0, /* ABL_EF */
|
||||
0, /* ABL_EG */
|
||||
0, /* ABL_EX */
|
||||
2, /* ABL_EU */
|
||||
};
|
||||
|
||||
static char *AblIsName = (char *)0;
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Is Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Is Abl Unary Operator |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int isablunaryoper( Oper )
|
||||
|
||||
long Oper;
|
||||
{
|
||||
if ( ( Oper < 0 ) ||
|
||||
( Oper >= ABL_MAX_OPERATOR ) )
|
||||
{
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
return( ! AblOperBinary[ Oper ] );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Is Abl Binary Operator |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int isablbinaryoper( Oper )
|
||||
|
||||
long Oper;
|
||||
{
|
||||
if ( ( Oper < 0 ) ||
|
||||
( Oper >= ABL_MAX_OPERATOR ) )
|
||||
{
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
return( AblOperBinary[ Oper ] );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Is Abl Operator In Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int isabloperinexpr( Expr, Oper )
|
||||
|
||||
ablexpr *Expr;
|
||||
long Oper;
|
||||
{
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
if ( ABL_OPER( Expr ) == Oper )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
if ( isabloperinexpr( ABL_CAR( Expr ), Oper ) ) return( 1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Is Local Name In Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static int loc_isablnamein( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
if ( ( ABL_ATOM( Expr ) ) &&
|
||||
( ABL_ATOM_VALUE( Expr ) == AblIsName ) )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
if ( loc_isablnamein( ABL_CAR( Expr ) ) ) return( 1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Is Abl Name In Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int isablnameinexpr( Expr, Name )
|
||||
|
||||
ablexpr *Expr;
|
||||
char *Name;
|
||||
{
|
||||
AblIsName = namealloc( Name );
|
||||
|
||||
return( loc_isablnamein( Expr ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Is Abl Equal Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int isablequalexpr( Expr1, Expr2 )
|
||||
|
||||
ablexpr *Expr1;
|
||||
ablexpr *Expr2;
|
||||
{
|
||||
if ( ABL_ATOM( Expr1 ) )
|
||||
{
|
||||
if ( ( ABL_ATOM( Expr2 ) ) &&
|
||||
( ABL_ATOM_VALUE( Expr1 ) == ABL_ATOM_VALUE( Expr2 ) ) )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
if ( ABL_OPER( Expr1 ) != ABL_OPER( Expr2 ) )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
Expr1 = ABL_CDR( Expr1 );
|
||||
Expr2 = ABL_CDR( Expr2 );
|
||||
|
||||
while ( ( Expr1 != (ablexpr *)0 ) &&
|
||||
( Expr2 != (ablexpr *)0 ) )
|
||||
{
|
||||
if ( ! isablequalexpr( ABL_CAR( Expr1 ), ABL_CAR( Expr2 ) ) )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
Expr1 = ABL_CDR( Expr1 );
|
||||
Expr2 = ABL_CDR( Expr2 );
|
||||
}
|
||||
|
||||
if ( ( Expr1 != (ablexpr *)0 ) ||
|
||||
( Expr2 != (ablexpr *)0 ) )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Is Abl Similar Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int isablsimilarexpr( Expr1, Expr2 )
|
||||
|
||||
ablexpr *Expr1;
|
||||
ablexpr *Expr2;
|
||||
{
|
||||
if ( ABL_ATOM( Expr1 ) )
|
||||
{
|
||||
if ( ABL_ATOM( Expr2 ) )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
if ( ABL_OPER( Expr1 ) != ABL_OPER( Expr2 ) )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
Expr1 = ABL_CDR( Expr1 );
|
||||
Expr2 = ABL_CDR( Expr2 );
|
||||
|
||||
while ( ( Expr1 != (ablexpr *)0 ) &&
|
||||
( Expr2 != (ablexpr *)0 ) )
|
||||
{
|
||||
if ( ! isablequalexpr( ABL_CAR( Expr1 ), ABL_CAR( Expr2 ) ) )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
Expr1 = ABL_CDR( Expr1 );
|
||||
Expr2 = ABL_CDR( Expr2 );
|
||||
}
|
||||
|
||||
if ( ( Expr1 != (ablexpr *)0 ) ||
|
||||
( Expr2 != (ablexpr *)0 ) )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Is Abl Not Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int isablnotexpr( Expr1, Expr2 )
|
||||
|
||||
ablexpr *Expr1;
|
||||
ablexpr *Expr2;
|
||||
{
|
||||
long Oper;
|
||||
long NotOper;
|
||||
|
||||
if ( ABL_ATOM( Expr1 ) )
|
||||
{
|
||||
if ( ( ! ABL_ATOM( Expr2 ) ) &&
|
||||
( ABL_OPER( Expr2 ) == ABL_NOT ) &&
|
||||
( ABL_ATOM_VALUE( Expr1 ) == ABL_ATOM_VALUE( ABL_CADR( Expr2 ) ) ) )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
if ( ABL_ATOM( Expr2 ) )
|
||||
{
|
||||
if ( ( ABL_OPER( Expr1 ) == ABL_NOT ) &&
|
||||
( ABL_ATOM_VALUE( ABL_CADR( Expr1 ) ) == ABL_ATOM_VALUE( Expr2 ) ) )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
if ( ABL_OPER( Expr1 ) == ABL_NOT )
|
||||
{
|
||||
if ( isablequalexpr( ABL_CADR( Expr1 ), Expr2 ) ) return( 1 );
|
||||
}
|
||||
|
||||
if ( ABL_OPER( Expr2 ) == ABL_NOT )
|
||||
{
|
||||
if ( isablequalexpr( Expr1, ABL_CADR( Expr2 ) ) ) return ( 1 );
|
||||
}
|
||||
|
||||
Oper = ABL_OPER( Expr1 );
|
||||
NotOper = getablopernot( Oper );
|
||||
|
||||
if ( ABL_OPER( Expr2 ) == NotOper )
|
||||
{
|
||||
if ( ( isablequalexpr(ABL_CADR( Expr1 ),
|
||||
ABL_CADR( Expr2 ) ) ) &&
|
||||
( isablequalexpr(ABL_CAR( ABL_CDDR( Expr1 ) ),
|
||||
ABL_CAR( ABL_CDDR( Expr2 ) ) ) ) )
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablis.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_IS_H
|
||||
# define ABL_IS_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
extern int AblOperBinary[ ABL_MAX_OPERATOR ];
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,154 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablmap.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "ablmap.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Map Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Map Abl Expression |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void mapablexpr( Function, Expr )
|
||||
|
||||
void (*Function)();
|
||||
ablexpr *Expr;
|
||||
{
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
(*Function)( ABL_CAR( Expr ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Map Abl Sub Expression |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *mapabloperexpr( Function, Oper, Expr )
|
||||
|
||||
ablexpr *(*Function)();
|
||||
long Oper;
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *MapExpr;
|
||||
|
||||
MapExpr = createabloper( Oper );
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
addablhexpr( MapExpr, (*Function)( ABL_CAR( Expr ) ) );
|
||||
}
|
||||
|
||||
return( MapExpr );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Map Abl Any Expression |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int mapablanyexpr( Function, Expr )
|
||||
|
||||
int (*Function)();
|
||||
ablexpr *Expr;
|
||||
{
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
if ( (*Function)( ABL_CAR( Expr ) ) ) return( 1 );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Map Abl Every Expression |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int mapableveryexpr( Function, Expr )
|
||||
|
||||
int (*Function)();
|
||||
ablexpr *Expr;
|
||||
{
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
if ( ! (*Function)( ABL_CAR( Expr ) ) ) return( 0 );
|
||||
}
|
||||
|
||||
return( 1 );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablmap.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_MAP_H
|
||||
# define ABL_MAP_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,271 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : abloptim.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "abloptim.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Optim Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Optim Abl Bin Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *optimablbinexpr( Oper, Expr1, Expr2 )
|
||||
|
||||
long Oper;
|
||||
ablexpr *Expr1;
|
||||
ablexpr *Expr2;
|
||||
{
|
||||
ablexpr *Expr;
|
||||
ablexpr *ScanExpr;
|
||||
int Negative;
|
||||
int Binary;
|
||||
|
||||
Binary = isablbinaryoper( Oper );
|
||||
|
||||
if ( Binary == 0 )
|
||||
{
|
||||
ablerror( ABL_OPERATOR_ERROR, Oper );
|
||||
}
|
||||
|
||||
Negative = ( getabloperpolar( Oper ) == ABL_POLAR_NEGATIVE );
|
||||
|
||||
if ( ( Negative ) ||
|
||||
( Binary == 2 ) ||
|
||||
( ABL_ATOM( Expr2 ) ) ||
|
||||
( ABL_OPER( Expr2 ) != Oper ) )
|
||||
{
|
||||
Expr = createabloper( Oper );
|
||||
addablhexpr( Expr, Expr2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
Expr = Expr2;
|
||||
}
|
||||
|
||||
if ( ( Negative ) ||
|
||||
( Binary == 2 ) ||
|
||||
( ABL_ATOM( Expr1 ) ) ||
|
||||
( ABL_OPER( Expr1 ) != Oper ) )
|
||||
{
|
||||
addablhexpr( Expr, Expr1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
ScanExpr = Expr1;
|
||||
|
||||
while ( ABL_CDR( ScanExpr ) != (ablexpr *)0 )
|
||||
{
|
||||
ScanExpr = ABL_CDR( ScanExpr );
|
||||
}
|
||||
|
||||
ABL_CDR( ScanExpr ) = ABL_CDR( Expr );
|
||||
ABL_CDR( Expr ) = ABL_CDR( Expr1 );
|
||||
ABL_CDR( Expr1 ) = (ablexpr *)0;
|
||||
|
||||
freechain( ABL_CAR( Expr1 ) );
|
||||
freechain( Expr1 );
|
||||
}
|
||||
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Optim Abl Not Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *optimablnotexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *Expr1;
|
||||
char *AtomValue;
|
||||
long Oper;
|
||||
long NotOper;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
AtomValue = ABL_ATOM_VALUE( Expr );
|
||||
|
||||
if ( AtomValue == ABL_ATOM_NAME_ONE )
|
||||
{
|
||||
ABL_ATOM_VALUE( Expr ) = (void *)ABL_ATOM_NAME_ZERO;
|
||||
|
||||
return( Expr );
|
||||
}
|
||||
else
|
||||
if ( AtomValue == ABL_ATOM_NAME_ZERO )
|
||||
{
|
||||
ABL_ATOM_VALUE( Expr ) = (void *)ABL_ATOM_NAME_ONE;
|
||||
|
||||
return( Expr );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Oper = ABL_OPER( Expr );
|
||||
NotOper = getablopernot( Oper );
|
||||
|
||||
if ( Oper == ABL_NOT )
|
||||
{
|
||||
Expr1 = ABL_CADR( Expr );
|
||||
freechain( ABL_CAR( Expr ) );
|
||||
freechain( Expr );
|
||||
|
||||
return( Expr1 );
|
||||
}
|
||||
else
|
||||
if ( NotOper != -1 )
|
||||
{
|
||||
ABL_OPER( Expr ) = NotOper;
|
||||
return( Expr );
|
||||
}
|
||||
}
|
||||
|
||||
Expr1 = createabloper( ABL_NOT );
|
||||
addablhexpr( Expr1, Expr );
|
||||
|
||||
return( Expr1 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Optim Abl Xor Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *optimablxorbinexpr( Oper, Expr1, Expr2 )
|
||||
|
||||
long Oper;
|
||||
ablexpr *Expr1;
|
||||
ablexpr *Expr2;
|
||||
{
|
||||
ablexpr *Expr;
|
||||
ablexpr *NotExpr1;
|
||||
ablexpr *NotExpr2;
|
||||
|
||||
if ( ( Oper != ABL_XOR ) &&
|
||||
( Oper != ABL_NXOR ) )
|
||||
{
|
||||
ablerror( ABL_OPERATOR_ERROR, Oper );
|
||||
}
|
||||
|
||||
NotExpr1 = optimablnotexpr( dupablexpr( Expr1 ) );
|
||||
NotExpr2 = optimablnotexpr( dupablexpr( Expr2 ) );
|
||||
|
||||
if ( Oper == ABL_XOR )
|
||||
{
|
||||
Expr = optimablbinexpr( ABL_OR,
|
||||
optimablbinexpr( ABL_AND, NotExpr1, Expr2 ),
|
||||
optimablbinexpr( ABL_AND, Expr1 , NotExpr2 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
Expr = optimablbinexpr( ABL_OR,
|
||||
optimablbinexpr( ABL_AND, NotExpr1, NotExpr2 ),
|
||||
optimablbinexpr( ABL_AND, Expr1 , Expr2 ) );
|
||||
}
|
||||
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Optim Abl Unary Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *optimablunaryexpr( Oper, Expr )
|
||||
|
||||
long Oper;
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *Expr1;
|
||||
|
||||
if ( ! isablunaryoper( Oper ) )
|
||||
{
|
||||
ablerror( ABL_NOT_UNARY_ERROR, Oper );
|
||||
}
|
||||
|
||||
if ( Oper == ABL_NOT )
|
||||
{
|
||||
return( optimablnotexpr( Expr ) );
|
||||
}
|
||||
|
||||
Expr1 = createabloper( Oper );
|
||||
addablhexpr( Expr1, Expr );
|
||||
|
||||
return( Expr1 );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : abloptim.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_OPTIM_H
|
||||
# define ABL_OPTIM_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,252 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablpolar.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "ablpolar.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static long AblPolarOperTable[ ABL_MAX_OPERATOR ][ 3 ] =
|
||||
{
|
||||
/* */
|
||||
/* Negative Positive Polarity */
|
||||
/* */
|
||||
{ ABL_AND , ABL_OR , 0 }, /* ABL_OR */
|
||||
{ ABL_OR , ABL_AND , 0 }, /* ABL_AND */
|
||||
{ ABL_NXOR , ABL_XOR , -1 }, /* ABL_XOR */
|
||||
{ -1 , -1 , 0 }, /* ABL_NOT */
|
||||
{ ABL_OR , ABL_AND , 1 }, /* ABL_NOR */
|
||||
{ ABL_AND , ABL_OR , 1 }, /* ABL_NAND */
|
||||
{ ABL_XOR , ABL_NXOR , -1 }, /* ABL_NXOR */
|
||||
{ -1 , -1 , 0 }, /* ABL_STABLE */
|
||||
{ -1 , -1 , 0 }, /* ABL_AF */
|
||||
{ -1 , -1 , 0 }, /* ABL_AG */
|
||||
{ -1 , -1 , 0 }, /* ABL_AX */
|
||||
{ -1 , -1 , 0 }, /* ABL_AU */
|
||||
{ -1 , -1 , 0 }, /* ABL_EF */
|
||||
{ -1 , -1 , 0 }, /* ABL_EG */
|
||||
{ -1 , -1 , 0 }, /* ABL_EX */
|
||||
{ -1 , -1 , 0 } /* ABL_EU */
|
||||
};
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Flat Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Duplicate Abl Polar Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *polardupablexpr( Expr, Polar )
|
||||
|
||||
ablexpr *Expr;
|
||||
int Polar;
|
||||
{
|
||||
ablexpr *ExprFlat;
|
||||
ablexpr *ExprQueue;
|
||||
long Oper;
|
||||
long NewOper;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
ExprFlat = addchain( (ablexpr *)0, ABL_CAR( Expr ) );
|
||||
|
||||
if ( Polar == ABL_POLAR_NEGATIVE )
|
||||
{
|
||||
ExprFlat = addchain( (ablexpr *)0, (void *)ExprFlat );
|
||||
ExprFlat = addchain( ExprFlat,
|
||||
(void *)addchain( (ablexpr *)0,
|
||||
(void *)ABL_NOT ) );
|
||||
}
|
||||
|
||||
return( ExprFlat );
|
||||
}
|
||||
|
||||
Oper = ABL_OPER( Expr );
|
||||
|
||||
if ( isablunaryoper( Oper ) )
|
||||
{
|
||||
if ( Oper == ABL_NOT )
|
||||
{
|
||||
ExprFlat = polardupablexpr( ABL_CADR( Expr ), ! Polar );
|
||||
}
|
||||
else
|
||||
{
|
||||
ExprFlat = polardupablexpr( ABL_CADR( Expr ), ABL_POLAR_POSITIVE );
|
||||
ExprFlat = addchain( (ablexpr *)0, (void *)ExprFlat );
|
||||
ExprFlat = addchain( ExprFlat,
|
||||
(void *)addchain( (ablexpr *)0,
|
||||
(void *)Oper ) );
|
||||
if ( Polar == ABL_POLAR_NEGATIVE )
|
||||
{
|
||||
ExprFlat = addchain( (ablexpr *)0, (void *)ExprFlat );
|
||||
ExprFlat = addchain( ExprFlat,
|
||||
(void *)addchain( (ablexpr *)0,
|
||||
(void *)ABL_NOT ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NewOper = AblPolarOperTable[ Oper ][ Polar ];
|
||||
|
||||
if ( AblPolarOperTable[ Oper ][ 2 ] == 1 ) Polar = ! Polar;
|
||||
if ( AblPolarOperTable[ Oper ][ 2 ] == -1 ) Polar = ABL_POLAR_POSITIVE;
|
||||
|
||||
ExprFlat = addchain( (ablexpr *)0,
|
||||
(void *)addchain( (ablexpr *)0,
|
||||
(void *)NewOper ) );
|
||||
ExprQueue = ExprFlat;
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
ABL_CDR( ExprQueue ) =
|
||||
|
||||
addchain( (ablexpr *)0,
|
||||
(void *)polardupablexpr( ABL_CAR( Expr ), Polar ) );
|
||||
|
||||
ExprQueue = ABL_CDR( ExprQueue );
|
||||
}
|
||||
}
|
||||
|
||||
return( ExprFlat );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Abl Polar Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *polarablexpr( Expr, Polar )
|
||||
|
||||
ablexpr *Expr;
|
||||
int Polar;
|
||||
{
|
||||
ablexpr *ScanExpr;
|
||||
long Oper;
|
||||
long NewOper;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
if ( Polar != ABL_POLAR_POSITIVE )
|
||||
{
|
||||
Expr = addchain( (ablexpr *)0, (void *)Expr );
|
||||
Expr = addchain( Expr,
|
||||
(void *)addchain( (ablexpr *)0,
|
||||
(void *)ABL_NOT ) );
|
||||
}
|
||||
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
Oper = ABL_OPER( Expr );
|
||||
|
||||
if ( isablunaryoper( Oper ) )
|
||||
{
|
||||
if ( Oper == ABL_NOT )
|
||||
{
|
||||
ScanExpr = Expr;
|
||||
Expr = polarablexpr( ABL_CADR( Expr ), ! Polar );
|
||||
|
||||
freechain( ABL_CAR( ScanExpr ) );
|
||||
freechain( ScanExpr );
|
||||
}
|
||||
else
|
||||
{
|
||||
ABL_CADR( Expr ) = polarablexpr( ABL_CADR( Expr ), ABL_POLAR_POSITIVE );
|
||||
|
||||
if ( Polar == ABL_POLAR_NEGATIVE )
|
||||
{
|
||||
Expr = addchain( (ablexpr *)0, (void *)Expr );
|
||||
Expr = addchain( Expr,
|
||||
(void *)addchain( (ablexpr *)0,
|
||||
(void *)ABL_NOT ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NewOper = AblPolarOperTable[ Oper ][ Polar ];
|
||||
|
||||
if ( AblPolarOperTable[ Oper ][ 2 ] == 1 ) Polar = ! Polar;
|
||||
if ( AblPolarOperTable[ Oper ][ 2 ] == -1 ) Polar = ABL_POLAR_POSITIVE;
|
||||
|
||||
ABL_OPER( Expr ) = NewOper;
|
||||
ScanExpr = Expr;
|
||||
|
||||
while ( ( ScanExpr = ABL_CDR( ScanExpr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
ABL_CAR( ScanExpr ) = polarablexpr( ABL_CAR( ScanExpr ), Polar );
|
||||
}
|
||||
}
|
||||
|
||||
return( Expr );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablpolar.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_POLAR_H
|
||||
# define ABL_POLAR_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,416 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablsimp.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "ablsimp.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static long AblSimplifyTable[ ABL_MAX_OPERATOR ][ 4 ] =
|
||||
|
||||
{
|
||||
{ 1, 1, 0, 0 }, /* ABL_OR */
|
||||
{ 0, 0, 1, 1 }, /* ABL_AND */
|
||||
{ 1, -1, 0, 0 }, /* ABL_XOR */
|
||||
|
||||
{ -1, -1, -1, -1 }, /* ABL_NOT */
|
||||
{ -1, -1, -1, -1 }, /* ABL_NOR */
|
||||
{ -1, -1, -1, -1 }, /* ABL_NAND */
|
||||
{ -1, -1, -1, -1 }, /* ABL_NXOR */
|
||||
{ -1, -1, -1, -1 }, /* ABL_STABLE */
|
||||
{ -1, -1, -1, -1 }, /* ABL_AF */
|
||||
{ -1, -1, -1, -1 }, /* ABL_AG */
|
||||
{ -1, -1, -1, -1 }, /* ABL_AX */
|
||||
{ -1, -1, -1, -1 }, /* ABL_AU */
|
||||
{ -1, -1, -1, -1 }, /* ABL_EF */
|
||||
{ -1, -1, -1, -1 }, /* ABL_EG */
|
||||
{ -1, -1, -1, -1 }, /* ABL_EX */
|
||||
{ -1, -1, -1, -1 } /* ABL_EU */
|
||||
};
|
||||
|
||||
static char AblFirstSimplify = 1;
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Simplify Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simplify Initialize |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void loc_initablsimp()
|
||||
{
|
||||
int Line;
|
||||
int Row;
|
||||
|
||||
if ( AblFirstSimplify )
|
||||
{
|
||||
AblFirstSimplify = 0;
|
||||
|
||||
for ( Line = 0; Line < ABL_MAX_OPERATOR; Line++ )
|
||||
{
|
||||
for ( Row = 0; Row < 4; Row++ )
|
||||
{
|
||||
if ( AblSimplifyTable[ Line ][ Row ] == 1 )
|
||||
{
|
||||
AblSimplifyTable[ Line ][ Row ] = (long)ABL_ATOM_NAME_ONE;
|
||||
}
|
||||
else
|
||||
if ( AblSimplifyTable[ Line ][ Row ] == 0 )
|
||||
{
|
||||
AblSimplifyTable[ Line ][ Row ] = (long)ABL_ATOM_NAME_ZERO;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Simplify Duplicate Abl Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *simpdupexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *ExprSimp;
|
||||
ablexpr *ExprQueue;
|
||||
ablexpr *ScanExpr;
|
||||
char *AtomValue;
|
||||
long Oper;
|
||||
char Negative;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
return( addchain( (ablexpr *)0, ABL_CAR( Expr ) ) );
|
||||
}
|
||||
|
||||
Oper = ABL_OPER( Expr );
|
||||
|
||||
if ( Oper == ABL_NOT )
|
||||
{
|
||||
ExprSimp = simpdupexpr( ABL_CADR( Expr ) );
|
||||
ExprSimp = optimablnotexpr( ExprSimp );
|
||||
|
||||
return( ExprSimp );
|
||||
}
|
||||
|
||||
if ( getabloperpolar( Oper ) == ABL_POLAR_NEGATIVE )
|
||||
{
|
||||
Oper = getablopernot( Oper );
|
||||
Negative = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
Negative = 0;
|
||||
}
|
||||
|
||||
ScanExpr = Expr;
|
||||
Expr = addchain( (ablexpr *)0,
|
||||
(void *)addchain( (ablexpr *)0,
|
||||
(void *)Oper ) );
|
||||
if ( isablunaryoper( Oper ) )
|
||||
{
|
||||
ExprSimp = simpdupexpr( ABL_CADR( ScanExpr ) );
|
||||
ABL_CDR( Expr ) = addchain( (ablexpr *)0, (void *)ExprSimp );
|
||||
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
ExprQueue = Expr;
|
||||
|
||||
while ( ( ScanExpr = ABL_CDR( ScanExpr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
ExprSimp = simpdupexpr( ABL_CAR( ScanExpr ) );
|
||||
|
||||
if ( ABL_ATOM( ExprSimp ) )
|
||||
{
|
||||
AtomValue = ABL_ATOM_VALUE( ExprSimp );
|
||||
|
||||
if ( AtomValue == (char *)AblSimplifyTable[ Oper ][ 0 ] )
|
||||
{
|
||||
if ( AblSimplifyTable[ Oper ][ 1 ] != -1 )
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
ABL_ATOM_VALUE( ExprSimp ) = (char *)AblSimplifyTable[ Oper ][ 1 ];
|
||||
|
||||
return( ExprSimp );
|
||||
}
|
||||
|
||||
freeablexpr( ExprSimp );
|
||||
Negative = ! Negative;
|
||||
}
|
||||
else
|
||||
if ( AtomValue == (char *)AblSimplifyTable[ Oper ][ 2 ] )
|
||||
{
|
||||
freeablexpr( ExprSimp );
|
||||
}
|
||||
else
|
||||
{
|
||||
ABL_CDR( ExprQueue ) = addchain( (ablexpr *)0, (void *)ExprSimp );
|
||||
ExprQueue = ABL_CDR( ExprQueue );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ABL_CDR( ExprQueue ) = addchain( (ablexpr *)0, (void *)ExprSimp );
|
||||
ExprQueue = ABL_CDR( ExprQueue );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ExprQueue == Expr )
|
||||
{
|
||||
ExprSimp = ABL_CAR( Expr );
|
||||
ABL_ATOM_VALUE( ExprSimp ) = (char *)AblSimplifyTable[ Oper ][ 3 ];
|
||||
freechain( Expr );
|
||||
}
|
||||
else
|
||||
if ( ExprQueue == ABL_CDR( Expr ) )
|
||||
{
|
||||
ExprSimp = ABL_CADR( Expr );
|
||||
ABL_CADR( Expr ) = (void *)0;
|
||||
freeablexpr( Expr );
|
||||
}
|
||||
else
|
||||
{
|
||||
ExprSimp = Expr;
|
||||
}
|
||||
|
||||
if ( Negative == 1 )
|
||||
{
|
||||
return( optimablnotexpr( ExprSimp ) );
|
||||
}
|
||||
|
||||
return( ExprSimp );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Simplify Duplicate Abl Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *simpdupablexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
loc_initablsimp();
|
||||
|
||||
return( simpdupexpr( Expr ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simplify Abl Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *loc_simpablexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *ExprSimp;
|
||||
ablexpr *ScanExpr;
|
||||
ablexpr *PrevExpr;
|
||||
char *AtomValue;
|
||||
long Oper;
|
||||
char Negative;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
Oper = ABL_OPER( Expr );
|
||||
|
||||
if ( Oper == ABL_NOT )
|
||||
{
|
||||
ExprSimp = loc_simpablexpr( ABL_CADR( Expr ) );
|
||||
freechain( ABL_CAR( Expr ) );
|
||||
freechain( Expr );
|
||||
ExprSimp = optimablnotexpr( ExprSimp );
|
||||
|
||||
return( ExprSimp );
|
||||
}
|
||||
|
||||
if ( isablunaryoper( Oper ) )
|
||||
{
|
||||
ABL_CADR( Expr ) = loc_simpablexpr( ABL_CADR( Expr ) );
|
||||
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
if ( getabloperpolar( Oper ) == ABL_POLAR_NEGATIVE )
|
||||
{
|
||||
Oper = getablopernot( Oper );
|
||||
ABL_OPER( Expr ) = Oper;
|
||||
Negative = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
Negative = 0;
|
||||
}
|
||||
|
||||
ScanExpr = Expr;
|
||||
PrevExpr = Expr;
|
||||
|
||||
while ( ( ScanExpr = ABL_CDR( ScanExpr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
ExprSimp = loc_simpablexpr( ABL_CAR( ScanExpr ) );
|
||||
|
||||
if ( ABL_ATOM( ExprSimp ) )
|
||||
{
|
||||
AtomValue = ABL_ATOM_VALUE( ExprSimp );
|
||||
|
||||
if ( AtomValue == (char *)AblSimplifyTable[ Oper ][ 0 ] )
|
||||
{
|
||||
if ( AblSimplifyTable[ Oper ][ 1 ] != -1 )
|
||||
{
|
||||
ABL_CAR( ScanExpr ) = (ablexpr *)0;
|
||||
freeablexpr( Expr );
|
||||
ABL_ATOM_VALUE( ExprSimp ) = (char *)AblSimplifyTable[ Oper ][ 1 ];
|
||||
|
||||
return( ExprSimp );
|
||||
}
|
||||
|
||||
freeablexpr( ExprSimp );
|
||||
|
||||
ABL_CDR( PrevExpr ) = ABL_CDR( ScanExpr );
|
||||
ABL_CDR( ScanExpr ) = (ablexpr *)0;
|
||||
freechain( ScanExpr );
|
||||
|
||||
ScanExpr = PrevExpr;
|
||||
Negative = ! Negative;
|
||||
}
|
||||
else
|
||||
if ( AtomValue == (char *)AblSimplifyTable[ Oper ][ 2 ] )
|
||||
{
|
||||
freeablexpr( ExprSimp );
|
||||
|
||||
ABL_CDR( PrevExpr ) = ABL_CDR( ScanExpr );
|
||||
ABL_CDR( ScanExpr ) = (ablexpr *)0;
|
||||
freechain( ScanExpr );
|
||||
|
||||
ScanExpr = PrevExpr;
|
||||
}
|
||||
else
|
||||
{
|
||||
ABL_CAR( ScanExpr ) = ExprSimp;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ABL_CAR( ScanExpr ) = ExprSimp;
|
||||
}
|
||||
|
||||
PrevExpr = ScanExpr;
|
||||
}
|
||||
|
||||
if ( PrevExpr == Expr )
|
||||
{
|
||||
ABL_ATOM_VALUE( Expr ) = (char *)AblSimplifyTable[ Oper ][ 3 ];
|
||||
ExprSimp = Expr;
|
||||
}
|
||||
else
|
||||
if ( PrevExpr == ABL_CDR( Expr ) )
|
||||
{
|
||||
ExprSimp = ABL_CADR( Expr );
|
||||
ABL_CADR( Expr ) = (void *)0;
|
||||
freeablexpr( Expr );
|
||||
}
|
||||
else
|
||||
{
|
||||
ExprSimp = Expr;
|
||||
}
|
||||
|
||||
if ( Negative == 1 )
|
||||
{
|
||||
ExprSimp = optimablnotexpr( ExprSimp );
|
||||
}
|
||||
|
||||
return( ExprSimp );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Simplify Abl Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *simpablexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
loc_initablsimp();
|
||||
|
||||
return( loc_simpablexpr( Expr ) );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablsimp.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_SIMP_H
|
||||
# define ABL_SIMP_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,648 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablstr.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include <ctype.h>
|
||||
# include <string.h>
|
||||
# include "ablstr.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static char *AblScanString = (char *)0;
|
||||
static char AblStringOper = 0;
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Skip Blank |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_strablskipblank()
|
||||
|
||||
{
|
||||
while ( ( *AblScanString != '\0' ) &&
|
||||
( isspace( (int)*AblScanString ) ) )
|
||||
{
|
||||
AblScanString = AblScanString + 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| End Word |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_strablendword()
|
||||
|
||||
{
|
||||
int Open;
|
||||
|
||||
Open = 0;
|
||||
|
||||
while ( ( *AblScanString != '\0' ) &&
|
||||
( ! isspace( (int)*AblScanString ) ) )
|
||||
{
|
||||
if ( *AblScanString == '(' )
|
||||
{
|
||||
if ( Open == 0 )
|
||||
{
|
||||
Open = 1; *AblScanString = ' ';
|
||||
}
|
||||
else break;
|
||||
}
|
||||
else
|
||||
if ( *AblScanString == ')' )
|
||||
{
|
||||
if ( Open == 1 )
|
||||
{
|
||||
Open = 0; *AblScanString = '\0';
|
||||
}
|
||||
else break;
|
||||
}
|
||||
|
||||
AblScanString = AblScanString + 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Word |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static char *loc_strablgetword()
|
||||
|
||||
{
|
||||
char *BeginWord;
|
||||
char *EndWord;
|
||||
char SwapChar;
|
||||
|
||||
BeginWord = AblScanString;
|
||||
loc_strablendword();
|
||||
EndWord = AblScanString;
|
||||
|
||||
if ( BeginWord == EndWord )
|
||||
{
|
||||
return( (char *)0 );
|
||||
}
|
||||
|
||||
SwapChar = *EndWord;
|
||||
*EndWord = '\0';
|
||||
BeginWord = namealloc( BeginWord );
|
||||
*EndWord = SwapChar;
|
||||
|
||||
return( BeginWord );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Str Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Str Abl Infix Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ablexpr *loc_strablinfix()
|
||||
{
|
||||
ablexpr *Expr;
|
||||
ablexpr *ExprQueue;
|
||||
ablexpr *ExprStr;
|
||||
char ToggleOper;
|
||||
char *Name;
|
||||
long Oper;
|
||||
|
||||
loc_strablskipblank();
|
||||
|
||||
if ( *AblScanString == '(' )
|
||||
{
|
||||
AblScanString = AblScanString + 1;
|
||||
loc_strablskipblank();
|
||||
|
||||
if ( *AblScanString != '\0' )
|
||||
{
|
||||
ExprStr = loc_strablinfix();
|
||||
|
||||
if ( ExprStr == (ablexpr *)0 )
|
||||
{
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
Expr = addchain( (ablexpr *)0,
|
||||
(void *)ExprStr );
|
||||
ExprQueue = Expr;
|
||||
|
||||
if ( AblStringOper )
|
||||
{
|
||||
AblStringOper = 0;
|
||||
|
||||
Oper = ABL_OPER( Expr );
|
||||
ToggleOper = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Oper = -1;
|
||||
ToggleOper = 1;
|
||||
}
|
||||
|
||||
loc_strablskipblank();
|
||||
|
||||
while ( ( *AblScanString != ')' ) &&
|
||||
( *AblScanString != '\0' ) )
|
||||
{
|
||||
ExprStr = loc_strablinfix();
|
||||
|
||||
if ( ExprStr == (ablexpr *)0 )
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
if ( AblStringOper )
|
||||
{
|
||||
AblStringOper = 0;
|
||||
|
||||
if ( ! ToggleOper )
|
||||
{
|
||||
freeablexpr( ExprStr );
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
if ( Oper == -1 )
|
||||
{
|
||||
Expr = addchain( Expr, (void *)ExprStr );
|
||||
Oper = ABL_OPER( Expr );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( Oper != (long)ABL_CAR( ExprStr ) )
|
||||
{
|
||||
freeablexpr( ExprStr );
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
freeablexpr( ExprStr );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ToggleOper )
|
||||
{
|
||||
freeablexpr( ExprStr );
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
ABL_CDR( ExprQueue ) = addchain( (ablexpr *)0,
|
||||
(void *)ExprStr );
|
||||
ExprQueue = ABL_CDR( ExprQueue );
|
||||
}
|
||||
|
||||
loc_strablskipblank();
|
||||
|
||||
ToggleOper = ! ToggleOper;
|
||||
}
|
||||
|
||||
if ( Oper == -1 )
|
||||
{
|
||||
ExprStr = ABL_CAR( Expr );
|
||||
freechain( Expr );
|
||||
Expr = ExprStr;
|
||||
}
|
||||
else
|
||||
if ( isablunaryoper( Oper ) )
|
||||
{
|
||||
if ( ABL_CDDR( Expr ) != (ablexpr *)0 )
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
if ( ABL_CDDR( Expr ) == (ablexpr *)0 )
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
if ( *AblScanString == ')' )
|
||||
{
|
||||
AblScanString = AblScanString + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Name = loc_strablgetword();
|
||||
|
||||
if ( Name == (char *)0 )
|
||||
{
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
Oper = getabloperbyname( Name );
|
||||
|
||||
if ( Oper == -1 )
|
||||
{
|
||||
Expr = addchain( (ablexpr *)0, (void *)Name );
|
||||
}
|
||||
else
|
||||
{
|
||||
Expr = addchain( (ablexpr *)0, (void *)Oper );
|
||||
AblStringOper = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Str Abl Prefix Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ablexpr *loc_strablprefix()
|
||||
{
|
||||
ablexpr *Expr;
|
||||
ablexpr *ExprQueue;
|
||||
ablexpr *ExprStr;
|
||||
char *Name;
|
||||
long Oper;
|
||||
|
||||
loc_strablskipblank();
|
||||
|
||||
if ( *AblScanString == '(' )
|
||||
{
|
||||
AblScanString = AblScanString + 1;
|
||||
loc_strablskipblank();
|
||||
|
||||
Name = loc_strablgetword();
|
||||
|
||||
if ( Name == (char *)0 )
|
||||
{
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
Oper = getabloperbyname( Name );
|
||||
|
||||
loc_strablskipblank();
|
||||
|
||||
if ( *AblScanString == ')' )
|
||||
{
|
||||
if ( Oper == -1 )
|
||||
{
|
||||
Expr = addchain( (ablexpr *)0, Name );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
if ( *AblScanString != '\0' )
|
||||
{
|
||||
Expr = addchain( (ablexpr *)0,
|
||||
(void *)addchain( (ablexpr *)0,
|
||||
(void *)Oper ) );
|
||||
|
||||
ExprQueue = Expr;
|
||||
|
||||
do
|
||||
{
|
||||
ExprStr = loc_strablprefix();
|
||||
|
||||
if ( ExprStr == (ablexpr *)0 )
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
ABL_CDR( ExprQueue ) = addchain( (ablexpr *)0,
|
||||
(void *)ExprStr );
|
||||
ExprQueue = ABL_CDR( ExprQueue );
|
||||
|
||||
loc_strablskipblank();
|
||||
}
|
||||
while ( ( *AblScanString != ')' ) &&
|
||||
( *AblScanString != '\0' ) );
|
||||
|
||||
if ( isablunaryoper( Oper ) )
|
||||
{
|
||||
if ( ABL_CDDR( Expr ) != (ablexpr *)0 )
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
if ( ABL_CDDR( Expr ) == (ablexpr *)0 )
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
if ( *AblScanString == ')' )
|
||||
{
|
||||
AblScanString = AblScanString + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Name = loc_strablgetword();
|
||||
|
||||
if ( Name == (char *)0 )
|
||||
{
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
Oper = getabloperbyname( Name );
|
||||
|
||||
if ( Oper == -1 )
|
||||
{
|
||||
Expr = addchain( (ablexpr *)0, (void *)Name );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
}
|
||||
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Str Abl Postfix Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ablexpr *loc_strablpostfix()
|
||||
{
|
||||
ablexpr *Expr;
|
||||
ablexpr *ExprQueue;
|
||||
ablexpr *ExprStr;
|
||||
char *Name;
|
||||
long Oper;
|
||||
|
||||
loc_strablskipblank();
|
||||
|
||||
if ( *AblScanString == '(' )
|
||||
{
|
||||
AblScanString = AblScanString + 1;
|
||||
loc_strablskipblank();
|
||||
|
||||
if ( *AblScanString != '\0' )
|
||||
{
|
||||
ExprStr = loc_strablpostfix();
|
||||
|
||||
if ( ExprStr == (ablexpr *)0 )
|
||||
{
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
if ( AblStringOper )
|
||||
{
|
||||
AblStringOper = 0;
|
||||
|
||||
freeablexpr( ExprStr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
Expr = addchain( (ablexpr *)0,
|
||||
(void *)ExprStr );
|
||||
|
||||
ExprQueue = Expr;
|
||||
Oper = -1;
|
||||
|
||||
loc_strablskipblank();
|
||||
|
||||
while ( ( Oper == -1 ) &&
|
||||
( *AblScanString != ')' ) &&
|
||||
( *AblScanString != '\0' ) )
|
||||
{
|
||||
ExprStr = loc_strablpostfix();
|
||||
|
||||
if ( ExprStr == (ablexpr *)0 )
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
if ( AblStringOper )
|
||||
{
|
||||
Expr = addchain( Expr, (void *)ExprStr );
|
||||
Oper = ABL_OPER( Expr );
|
||||
AblStringOper = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ABL_CDR( ExprQueue ) = addchain( (ablexpr *)0,
|
||||
(void *)ExprStr );
|
||||
ExprQueue = ABL_CDR( ExprQueue );
|
||||
}
|
||||
|
||||
loc_strablskipblank();
|
||||
}
|
||||
|
||||
if ( Oper == -1 )
|
||||
{
|
||||
if ( ABL_CDR( Expr ) != (ablexpr *)0 )
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
ExprStr = ABL_CAR( Expr );
|
||||
freechain( Expr );
|
||||
Expr = ExprStr;
|
||||
}
|
||||
else
|
||||
if ( isablunaryoper( Oper ) )
|
||||
{
|
||||
if ( ABL_CDDR( Expr ) != (ablexpr *)0 )
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
if ( ABL_CDDR( Expr ) == (ablexpr *)0 )
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
if ( *AblScanString == ')' )
|
||||
{
|
||||
AblScanString = AblScanString + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Name = loc_strablgetword();
|
||||
|
||||
if ( Name == (char *)0 )
|
||||
{
|
||||
return( (ablexpr *)0 );
|
||||
}
|
||||
|
||||
Oper = getabloperbyname( Name );
|
||||
|
||||
if ( Oper == -1 )
|
||||
{
|
||||
Expr = addchain( (ablexpr *)0, (void *)Name );
|
||||
}
|
||||
else
|
||||
{
|
||||
Expr = addchain( (ablexpr *)0, (void *)Oper );
|
||||
AblStringOper = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return( Expr );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Str Abl Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *strablexpr( String, Mode )
|
||||
|
||||
char *String;
|
||||
int Mode;
|
||||
{
|
||||
ablexpr *Expr;
|
||||
|
||||
String = mbkstrdup( String );
|
||||
|
||||
AblScanString = String;
|
||||
AblStringOper = 0;
|
||||
|
||||
if ( Mode == ABL_VIEW_INFIX )
|
||||
{
|
||||
Expr = loc_strablinfix();
|
||||
}
|
||||
else
|
||||
if ( Mode == ABL_VIEW_PREFIX )
|
||||
{
|
||||
Expr = loc_strablprefix();
|
||||
}
|
||||
else
|
||||
{
|
||||
Expr = loc_strablpostfix();
|
||||
}
|
||||
|
||||
loc_strablskipblank();
|
||||
|
||||
if ( ( AblStringOper ) ||
|
||||
( *AblScanString != '\0' ) )
|
||||
{
|
||||
freeablexpr( Expr );
|
||||
Expr = (ablexpr *)0;
|
||||
}
|
||||
|
||||
mbkfree( String );
|
||||
|
||||
return( Expr );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablstr.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_STR_H
|
||||
# define ABL_STR_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,188 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablsubst.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "ablsubst.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static char *AblSubstName = (char *)0;
|
||||
static ablexpr *AblSubstExpr = (ablexpr *)0;
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Substitue Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Substitue Local Name By Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ablexpr *loc_substablexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *ExprSubst;
|
||||
|
||||
ExprSubst = Expr;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
if ( ABL_ATOM_VALUE( Expr ) == AblSubstName )
|
||||
{
|
||||
freechain( Expr );
|
||||
ExprSubst = dupablexpr( AblSubstExpr );
|
||||
}
|
||||
|
||||
return( ExprSubst );
|
||||
}
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) )
|
||||
{
|
||||
ABL_CAR( Expr ) = loc_substablexpr( ABL_CAR( Expr ) );
|
||||
}
|
||||
|
||||
return( ExprSubst );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Substitue Name Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *substablexpr( Expr1, Name, Expr2 )
|
||||
|
||||
ablexpr *Expr1;
|
||||
char *Name;
|
||||
ablexpr *Expr2;
|
||||
{
|
||||
AblSubstName = namealloc( Name );
|
||||
AblSubstExpr = Expr2;
|
||||
|
||||
return( loc_substablexpr( Expr1 ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Substitue Local Duplicate Name By Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ablexpr *loc_substdupablexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *ExprDup;
|
||||
ablexpr *ExprQueue;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
if ( ABL_ATOM_VALUE( Expr ) == AblSubstName )
|
||||
{
|
||||
return( dupablexpr( AblSubstExpr ) );
|
||||
}
|
||||
|
||||
return( addchain( (ablexpr *)0, ABL_CAR( Expr ) ) );
|
||||
}
|
||||
|
||||
ExprDup = addchain( (ablexpr *)0,
|
||||
(void *)addchain( (ablexpr *)0,
|
||||
(void *)ABL_OPER( Expr ) ) );
|
||||
ExprQueue = ExprDup;
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
ABL_CDR( ExprQueue ) =
|
||||
|
||||
addchain( (ablexpr *)0, (void *)loc_substdupablexpr( ABL_CAR( Expr ) ) );
|
||||
|
||||
ExprQueue = ABL_CDR( ExprQueue );
|
||||
}
|
||||
|
||||
return( ExprDup );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Substitue Duplicate Name Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *substdupablexpr( Expr1, Name, Expr2 )
|
||||
|
||||
ablexpr *Expr1;
|
||||
char *Name;
|
||||
ablexpr *Expr2;
|
||||
{
|
||||
AblSubstName = namealloc( Name );
|
||||
AblSubstExpr = Expr2;
|
||||
|
||||
return( loc_substdupablexpr( Expr1 ) );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablsubst.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_SUBST_H
|
||||
# define ABL_SUBST_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,127 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablunflat.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "ablunflat.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Flat Abl Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ablexpr *unflatablexpr( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
ablexpr *ScanExpr;
|
||||
long Oper;
|
||||
int Binary;
|
||||
int Polar;
|
||||
|
||||
if ( ! ABL_ATOM( Expr ) )
|
||||
{
|
||||
Oper = ABL_OPER( Expr );
|
||||
|
||||
Binary = isablbinaryoper( Oper );
|
||||
|
||||
if ( Binary != 0 )
|
||||
{
|
||||
Polar = getabloperpolar( Oper );
|
||||
|
||||
if ( ABL_CDR( ABL_CDDR( Expr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
if ( Polar != ABL_POLAR_POSITIVE )
|
||||
{
|
||||
Oper = getablopernot( Oper );
|
||||
ABL_OPER( Expr ) = Oper;
|
||||
|
||||
ScanExpr = createabloper( ABL_NOT );
|
||||
addablhexpr( ScanExpr, Expr );
|
||||
|
||||
Expr = ScanExpr;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScanExpr = createabloper( Oper );
|
||||
ABL_CDR( ScanExpr ) = ABL_CDDR( Expr );
|
||||
ABL_CDDR( Expr ) = addchain( (ablexpr *)0, (void *)ScanExpr );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ScanExpr = Expr;
|
||||
|
||||
while ( ( ScanExpr = ABL_CDR( ScanExpr ) ) != (ablexpr *)0 )
|
||||
{
|
||||
ABL_CAR( ScanExpr ) = unflatablexpr( ABL_CAR( ScanExpr ) );
|
||||
}
|
||||
}
|
||||
|
||||
return( Expr );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablunflat.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_UNFLAT_H
|
||||
# define ABL_UNFLAT_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,283 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablvhdl.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include <ctype.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# include "ablvhdl.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static authtable *AblVhdlHashTable = (authtable *)0;
|
||||
static char AblVhdlBuffer[ ABL_VHDL_BUFFER_SIZE ];
|
||||
|
||||
static char *AblVhdlUsedName[] =
|
||||
{
|
||||
"abs" , "access" ,
|
||||
"after" , "alias" ,
|
||||
"all" , "and" ,
|
||||
"architecture", "array" ,
|
||||
"assert" , "attribute" ,
|
||||
"begin" , "bit" ,
|
||||
"bit_vector" , "block" ,
|
||||
"body" , "buffer" ,
|
||||
"bus" , "case" ,
|
||||
"component" , "configuration",
|
||||
"constant" , "disconnect" ,
|
||||
"downto" , "else" ,
|
||||
"elsif" , "end" ,
|
||||
"entity" , "error" ,
|
||||
"exit" , "file" ,
|
||||
"for" , "function" ,
|
||||
"generate" , "generic" ,
|
||||
"guarded" , "if" ,
|
||||
"in" , "inout" ,
|
||||
"is" , "label" ,
|
||||
"library" , "linkage" ,
|
||||
"loop" , "map" ,
|
||||
"mod" , "mux_bit" ,
|
||||
"mux_vector" , "nand" ,
|
||||
"natural" , "new" ,
|
||||
"next" , "nor" ,
|
||||
"not" , "null" ,
|
||||
"of" , "on" ,
|
||||
"open" , "or" ,
|
||||
"others" , "out" ,
|
||||
"package" , "port" ,
|
||||
"procedure" , "process" ,
|
||||
"range" , "record" ,
|
||||
"reg_bit" , "reg_vector" ,
|
||||
"register" , "rem" ,
|
||||
"report" , "return" ,
|
||||
"select" , "severity" ,
|
||||
"signal" , "stable" ,
|
||||
"subtype" , "then" ,
|
||||
"to" , "transport" ,
|
||||
"type" , "units" ,
|
||||
"until" , "use" ,
|
||||
"variable" , "wait" ,
|
||||
"warning" , "when" ,
|
||||
"while" , "with" ,
|
||||
"wor_bit" , "wor_vector" ,
|
||||
"xor" , (char *)0
|
||||
};
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| getablname |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
char *vhdlablname( Name )
|
||||
|
||||
char *Name;
|
||||
{
|
||||
authelem *Element;
|
||||
char *UsedName;
|
||||
char *NewName;
|
||||
long Scan;
|
||||
long Target;
|
||||
char Space;
|
||||
char DefaultChar;
|
||||
|
||||
if ( Name == (char *)0 )
|
||||
{
|
||||
return( (char *)0 );
|
||||
}
|
||||
|
||||
Name = namealloc( Name );
|
||||
|
||||
if ( AblVhdlHashTable == (authtable *)0 )
|
||||
{
|
||||
AblVhdlHashTable = createauthtable( ABL_VHDL_HASH_TABLE_SIZE );
|
||||
|
||||
AblVhdlBuffer[ 0 ] = ABL_DEFAULT_CHAR;
|
||||
AblVhdlBuffer[ 1 ] = '_';
|
||||
|
||||
Scan = 0;
|
||||
|
||||
while ( AblVhdlUsedName[ Scan ] != (char *)0 )
|
||||
{
|
||||
UsedName = namealloc( AblVhdlUsedName[ Scan ] );
|
||||
strcpy( AblVhdlBuffer + 2, UsedName );
|
||||
NewName = namealloc( AblVhdlBuffer );
|
||||
|
||||
addauthelem( AblVhdlHashTable, UsedName, (long)NewName );
|
||||
|
||||
Scan = Scan + 1;
|
||||
}
|
||||
}
|
||||
|
||||
Element = searchauthelem( AblVhdlHashTable, Name );
|
||||
|
||||
if ( Element != (authelem *)0 )
|
||||
{
|
||||
return( (char *)Element->VALUE );
|
||||
}
|
||||
|
||||
Target = 0;
|
||||
Space = 0;
|
||||
|
||||
DefaultChar = ABL_DEFAULT_FIRST_CHAR;
|
||||
|
||||
for ( Scan = 0; Name[ Scan ]; Scan++ )
|
||||
{
|
||||
if ( ( isalpha( Name[ Scan ] ) ) ||
|
||||
( ( Name[ Scan ] == '_' ) &&
|
||||
( Scan != 0 ) &&
|
||||
( Name[ Scan - 1 ] != '_' ) ) )
|
||||
{
|
||||
AblVhdlBuffer[ Target++ ] = Name[ Scan ];
|
||||
}
|
||||
else
|
||||
if ( isdigit( Name[ Scan ] ) )
|
||||
{
|
||||
if ( ! Scan )
|
||||
{
|
||||
AblVhdlBuffer[ Target++ ] = DefaultChar;
|
||||
}
|
||||
|
||||
AblVhdlBuffer[ Target++ ] = Name[ Scan ];
|
||||
}
|
||||
else
|
||||
if ( ( Name[ Scan ] == ' ' ) &&
|
||||
( Space == 0 ) )
|
||||
{
|
||||
Space = 1; AblVhdlBuffer[ Target++ ] = '(';
|
||||
}
|
||||
else
|
||||
{
|
||||
AblVhdlBuffer[ Target++ ] = DefaultChar;
|
||||
}
|
||||
|
||||
DefaultChar = ABL_DEFAULT_CHAR;
|
||||
}
|
||||
|
||||
if ( Target > 0 )
|
||||
{
|
||||
if ( AblVhdlBuffer[ Target - 1 ] == '_' )
|
||||
{
|
||||
AblVhdlBuffer[ Target++ ] = DefaultChar;
|
||||
}
|
||||
|
||||
if ( Space )
|
||||
{
|
||||
AblVhdlBuffer[ Target++ ] = ')';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AblVhdlBuffer[ Target++ ] = DefaultChar;
|
||||
}
|
||||
|
||||
AblVhdlBuffer[ Target++ ] = '\0';
|
||||
NewName = namealloc( AblVhdlBuffer );
|
||||
|
||||
addauthelem( AblVhdlHashTable, Name, (long)NewName );
|
||||
|
||||
return( NewName );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| vhdlablvector |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
char *vhdlablvector( Name, Index )
|
||||
|
||||
char *Name;
|
||||
long *Index;
|
||||
{
|
||||
char *Blank;
|
||||
|
||||
if ( Name == (char *)0 )
|
||||
{
|
||||
return( (char *)0 );
|
||||
}
|
||||
|
||||
strcpy( AblVhdlBuffer, Name );
|
||||
Blank = strchr( AblVhdlBuffer, ' ' );
|
||||
|
||||
if ( Blank == (char *)0 )
|
||||
{
|
||||
return( (char *)0 );
|
||||
}
|
||||
|
||||
*Blank = '\0';
|
||||
*Index = atoi( Blank + 1 );
|
||||
|
||||
Name = namealloc( AblVhdlBuffer );
|
||||
|
||||
return( Name );
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablvhdl.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_VHDL_H
|
||||
# define ABL_VHDL_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# define ABL_VHDL_BUFFER_SIZE 512
|
||||
# define ABL_VHDL_HASH_TABLE_SIZE 500
|
||||
|
||||
# define ABL_DEFAULT_FIRST_CHAR 'x'
|
||||
# define ABL_DEFAULT_CHAR 'x'
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,523 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablview.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "abl.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include "ablview.h"
|
||||
# include "ablerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static FILE *AblViewFile = (FILE *)0;
|
||||
static int AblViewLength = 0;
|
||||
static void (*AblViewFunction)();
|
||||
|
||||
static char *AblStringBuffer = (char *)0;
|
||||
static int AblStringSize = 0;
|
||||
static int AblStringLength = 0;
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| View Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| View Local Abl File |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_viewablfile( String, Length )
|
||||
|
||||
char *String;
|
||||
int Length;
|
||||
{
|
||||
AblViewLength += Length;
|
||||
|
||||
if ( AblViewLength >= ABL_VIEW_MAX_LENGTH )
|
||||
{
|
||||
fprintf( AblViewFile, "\n" );
|
||||
AblViewLength = 0;
|
||||
}
|
||||
|
||||
fprintf( AblViewFile, "%s", String );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| View Local Abl String |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_viewablstr( String, Length )
|
||||
|
||||
char *String;
|
||||
int Length;
|
||||
{
|
||||
char *Buffer;
|
||||
|
||||
if ( ( AblStringLength + Length ) >= AblStringSize )
|
||||
{
|
||||
AblStringSize = AblStringSize << 1;
|
||||
Buffer = (char *)autallocblock( AblStringSize );
|
||||
strcpy( Buffer, AblStringBuffer );
|
||||
autfreeblock( AblStringBuffer );
|
||||
AblStringBuffer = Buffer;
|
||||
}
|
||||
|
||||
AblViewLength += Length;
|
||||
|
||||
if ( AblViewLength >= ABL_VIEW_MAX_LENGTH )
|
||||
{
|
||||
AblViewLength = 0;
|
||||
loc_viewablstr( "\n", 1 );
|
||||
}
|
||||
|
||||
strcpy( AblStringBuffer + AblStringLength, String );
|
||||
AblStringLength += Length;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| View Local Expr Prefix |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_viewablprefix( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
long Oper;
|
||||
char *OperName;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
(*AblViewFunction)( ABL_ATOM_VALUE( Expr ),
|
||||
strlen( ABL_ATOM_VALUE( Expr ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
Oper = ABL_OPER( Expr );
|
||||
OperName = getabloperuppername( Oper );
|
||||
|
||||
if ( OperName == (char *)0 )
|
||||
{
|
||||
ablerror( ABL_OPERATOR_ERROR, Oper );
|
||||
}
|
||||
|
||||
(*AblViewFunction)( "(", 1 );
|
||||
(*AblViewFunction)( OperName, strlen( OperName ) );
|
||||
|
||||
Expr = ABL_CDR( Expr );
|
||||
|
||||
while ( Expr != (ablexpr *)0 )
|
||||
{
|
||||
(*AblViewFunction)( " ", 1 );
|
||||
|
||||
loc_viewablprefix( ABL_CAR( Expr ) );
|
||||
|
||||
Expr = ABL_CDR( Expr );
|
||||
}
|
||||
|
||||
(*AblViewFunction)( ")", 1 );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| View Local Expr Postfix |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_viewablpostfix( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
long Oper;
|
||||
char *OperName;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
(*AblViewFunction)( ABL_ATOM_VALUE( Expr ),
|
||||
strlen( ABL_ATOM_VALUE( Expr ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
Oper = ABL_OPER( Expr );
|
||||
OperName = getabloperuppername( Oper );
|
||||
|
||||
if ( OperName == (char *)0 )
|
||||
{
|
||||
ablerror( ABL_OPERATOR_ERROR, Oper );
|
||||
}
|
||||
|
||||
(*AblViewFunction)( "(", 1 );
|
||||
|
||||
Expr = ABL_CDR( Expr );
|
||||
|
||||
while ( Expr != (ablexpr *)0 )
|
||||
{
|
||||
loc_viewablpostfix( ABL_CAR( Expr ) );
|
||||
|
||||
Expr = ABL_CDR( Expr );
|
||||
|
||||
(*AblViewFunction)( " ", 1 );
|
||||
}
|
||||
|
||||
(*AblViewFunction)( OperName, strlen( OperName ) );
|
||||
(*AblViewFunction)( ")", 1 );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| View Local Expr Infix |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_viewablinfix( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
long Oper;
|
||||
char *OperName;
|
||||
int Length;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
(*AblViewFunction)( ABL_ATOM_VALUE( Expr ),
|
||||
strlen( ABL_ATOM_VALUE( Expr ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
Oper = ABL_OPER( Expr );
|
||||
OperName = getabloperuppername( Oper );
|
||||
Length = strlen( OperName );
|
||||
|
||||
if ( OperName == (char *)0 )
|
||||
{
|
||||
ablerror( ABL_OPERATOR_ERROR, Oper );
|
||||
}
|
||||
|
||||
(*AblViewFunction)( "(", 1 );
|
||||
|
||||
if ( isablunaryoper( Oper ) )
|
||||
{
|
||||
(*AblViewFunction)( OperName, Length );
|
||||
(*AblViewFunction)( " ", 1 );
|
||||
|
||||
loc_viewablinfix( ABL_CADR( Expr ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) )
|
||||
{
|
||||
loc_viewablinfix( ABL_CAR( Expr ) );
|
||||
|
||||
if ( ABL_CDR( Expr ) != (ablexpr *)0 )
|
||||
{
|
||||
(*AblViewFunction)( " ", 1 );
|
||||
(*AblViewFunction)( OperName, Length );
|
||||
(*AblViewFunction)( " ", 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
(*AblViewFunction)( ")", 1 );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| View Local Expr Vhdl |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_viewablvhdl( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
long Oper;
|
||||
char *String;
|
||||
int Length;
|
||||
|
||||
if ( ABL_ATOM( Expr ) )
|
||||
{
|
||||
String = ABL_ATOM_VALUE( Expr );
|
||||
|
||||
if ( ( String != ABL_ATOM_NAME_ZERO ) &&
|
||||
( String != ABL_ATOM_NAME_ONE ) &&
|
||||
( String != ABL_ATOM_NAME_DC ) &&
|
||||
( String != ABL_ATOM_NAME_TRISTATE ) )
|
||||
{
|
||||
String = vhdlablname( String );
|
||||
}
|
||||
|
||||
(*AblViewFunction)( String, strlen( String ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
Oper = ABL_OPER( Expr );
|
||||
String = getabloperuppername( Oper );
|
||||
Length = strlen( String );
|
||||
|
||||
if ( String == (char *)0 )
|
||||
{
|
||||
ablerror( ABL_OPERATOR_ERROR, Oper );
|
||||
}
|
||||
|
||||
if ( isablunaryoper( Oper ) )
|
||||
{
|
||||
if ( Oper == ABL_STABLE )
|
||||
{
|
||||
(*AblViewFunction)( "(", 1 );
|
||||
|
||||
loc_viewablvhdl( ABL_CADR( Expr ) );
|
||||
|
||||
(*AblViewFunction)( "'", 1 );
|
||||
(*AblViewFunction)( String, Length );
|
||||
}
|
||||
else
|
||||
{
|
||||
(*AblViewFunction)( String, Length );
|
||||
(*AblViewFunction)( "(", 1 );
|
||||
|
||||
loc_viewablvhdl( ABL_CADR( Expr ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( getabloperpolar( Oper ) == ABL_POLAR_POSITIVE )
|
||||
{
|
||||
(*AblViewFunction)( "(", 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
(*AblViewFunction)( "NOT(", 4 );
|
||||
String = getabloperuppername( getablopernot( Oper ) );
|
||||
Length = strlen( String );
|
||||
}
|
||||
|
||||
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)NULL )
|
||||
{
|
||||
loc_viewablvhdl( ABL_CAR( Expr ) );
|
||||
|
||||
if ( ABL_CDR( Expr ) != (ablexpr *)0 )
|
||||
{
|
||||
(*AblViewFunction)( " ", 1 );
|
||||
(*AblViewFunction)( String, Length );
|
||||
(*AblViewFunction)( " ", 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
(*AblViewFunction)( ")", 1 );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| View Abl Expr File |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewablexprfile( AblFile, Expr, Mode )
|
||||
|
||||
FILE *AblFile;
|
||||
ablexpr *Expr;
|
||||
int Mode;
|
||||
{
|
||||
AblViewFile = AblFile;
|
||||
AblViewLength = 0;
|
||||
AblViewFunction = loc_viewablfile;
|
||||
|
||||
if ( Mode == ABL_VIEW_INFIX )
|
||||
{
|
||||
loc_viewablinfix( Expr );
|
||||
}
|
||||
else
|
||||
if ( Mode == ABL_VIEW_PREFIX )
|
||||
{
|
||||
loc_viewablprefix( Expr );
|
||||
}
|
||||
else
|
||||
if ( Mode == ABL_VIEW_POSTFIX )
|
||||
{
|
||||
loc_viewablpostfix( Expr );
|
||||
}
|
||||
else
|
||||
if ( Mode == ABL_VIEW_VHDL )
|
||||
{
|
||||
loc_viewablvhdl( Expr );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| View Abl Expr File NewLine |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewablexprfileln( AblFile, Expr, Mode )
|
||||
|
||||
FILE *AblFile;
|
||||
ablexpr *Expr;
|
||||
int Mode;
|
||||
{
|
||||
viewablexprfile( AblFile, Expr, Mode );
|
||||
fprintf( AblViewFile, "\n" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| View Abl Expr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewablexpr( Expr, Mode )
|
||||
|
||||
ablexpr *Expr;
|
||||
int Mode;
|
||||
{
|
||||
viewablexprfile( stdout, Expr, Mode );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| View Abl Expr NewLine |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewablexprln( Expr, Mode )
|
||||
|
||||
ablexpr *Expr;
|
||||
int Mode;
|
||||
{
|
||||
viewablexprfileln( stdout, Expr, Mode );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| View Abl Expr String |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
char *viewablexprstr( Expr, Mode )
|
||||
|
||||
ablexpr *Expr;
|
||||
int Mode;
|
||||
{
|
||||
if ( AblStringBuffer == (char *)0 )
|
||||
{
|
||||
AblStringBuffer = (char *)autallocblock( ABL_STRING_BUFFER_SIZE );
|
||||
AblStringSize = ABL_STRING_BUFFER_SIZE;
|
||||
}
|
||||
|
||||
AblStringLength = 0;
|
||||
AblStringBuffer[ 0 ] = '\0';
|
||||
|
||||
AblViewLength = 0;
|
||||
AblViewFunction = loc_viewablstr;
|
||||
|
||||
if ( Mode == ABL_VIEW_INFIX )
|
||||
{
|
||||
loc_viewablinfix( Expr );
|
||||
}
|
||||
else
|
||||
if ( Mode == ABL_VIEW_PREFIX )
|
||||
{
|
||||
loc_viewablprefix( Expr );
|
||||
}
|
||||
else
|
||||
if ( Mode == ABL_VIEW_POSTFIX )
|
||||
{
|
||||
loc_viewablpostfix( Expr );
|
||||
}
|
||||
else
|
||||
if ( Mode == ABL_VIEW_VHDL )
|
||||
{
|
||||
loc_viewablvhdl( Expr );
|
||||
}
|
||||
|
||||
return( AblStringBuffer );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| View Abl Expr String NewLine |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
char *viewablexprstrln( Expr, Mode )
|
||||
|
||||
ablexpr *Expr;
|
||||
int Mode;
|
||||
{
|
||||
viewablexprstr( Expr, Mode );
|
||||
strcpy( AblStringBuffer + AblStringLength, "\n" );
|
||||
|
||||
return( AblStringBuffer );
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Abl |
|
||||
| |
|
||||
| File : ablview.h |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef ABL_VIEW_H
|
||||
# define ABL_VIEW_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# define ABL_VIEW_MAX_LENGTH 50
|
||||
# define ABL_STRING_BUFFER_SIZE 512
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue