Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 32.282.691 Times

Math::Logic 1.19

  Date Added: November 26, 2010  |  Visits: 1.145


Report Broken Link
Printer Friendly Version

Product Homepage
Download (86 downloads)

Math::Logic is a Perl module that provides pure 2, 3 or multi-value logic. SYNOPSIS use Math::Logic qw( $TRUE $FALSE $UNDEF $STR_TRUE $STR_FALSE $STR_UNDEF ) ; # 1 0 -1 TRUE FALSE UNDEF use Math::Logic :NUM ; # $TRUE $FALSE $UNDEF -- what you normally want use Math::Logic :ALL ; # All the constants use Math::Logic :STR ; # $STR_TRUE $STR_FALSE $STR_UNDEF # 2-degree logic my $true = Math::Logic->new( -value => $TRUE, -degree => 2 ) ; my $false = Math::Logic->new( -value => $FALSE, -degree => 2 ) ; my $x = Math::Logic->new_from_string( TRUE,2 ) ; print "true" if $true ; # 3-degree logic (non-propagating) my $true = Math::Logic->new( -value => $TRUE, -degree => 3 ) ; my $false = Math::Logic->new( -value => $FALSE, -degree => 3 ) ; my $undef = Math::Logic->new( -value => $UNDEF, -degree => 3 ) ; my $x = Math::Logic->new_from_string( FALSE,3 ) ; print "true" if ( $true | $undef ) == $TRUE ; # 3-degree logic (propagating) my $true = Math::Logic->new( -value => $TRUE, -degree => 3, -propagate => 1 ) ; my $false = Math::Logic->new( -value => $FALSE, -degree => 3, -propagate => 1 ) ; my $undef = Math::Logic->new( -value => $UNDEF, -degree => 3, -propagate => 1 ) ; my $x = Math::Logic->new_from_string( ( UNDEF, 3, -propagate ) ) ; print "undef" if ( $true | $undef ) == $UNDEF ; # multi-degree logic my $True = 100 ; # Define our own true my $False = $FALSE ; my $true = Math::Logic->new( -value => $True, -degree => $True ) ; my $very = Math::Logic->new( -value => 67, -degree => $True ) ; my $fairly = Math::Logic->new( -value => 33, -degree => $True ) ; my $false = Math::Logic->new( -value => $False, -degree => $True ) ; my $x = Math::Logic->new_from_string( "25,$True" ) ; print "maybe" if ( $very | $fairly ) > 50 ; # We can have arbitrarily complex expressions; the result is a Math::Logic # object; all arguments must be Math::Logic objects or things which can be # promoted into such and must all be compatible. The outcome depends on # which kind of logic is being used. my $xor = ( $x | $y ) & ( ! ( $x & $y ) ) ; # This is identical to: my $xor = $x ^ $y ; Perls built-in logical operators, and, or, xor and not support 2-value logic. This means that they always produce a result which is either true or false. In fact perl sometimes returns 0 and sometimes returns undef for false depending on the operator and the order of the arguments. For "true" Perl generally returns the first value that evaluated to true which turns out to be extremely useful in practice. Given the choice Perls built-in logical operators are to be preferred -- but when you really want pure 2-degree logic or 3-degree logic or multi-degree logic they are available through this module. The only 2-degree logic values are 1 (TRUE) and 0 (FALSE). The only 3-degree logic values are 1 (TRUE), 0 (FALSE) and -1 (UNDEF). Note that UNDEF is -1 not undef! The only multi-degree logic values are 0 (FALSE)..-degree -- the value of TRUE is equal to the degree, usually 100. The -degree is the maximum value (except for 2 and 3-degree logic); i.e. logic of n-degree is n+1-value logic, e.g. 100-degree logic has 101 values, 0..100. Although some useful constants may be exported, this is an object module and the results of logical comparisons are Math::Logic objects..

Requirements: No special requirements
Platforms: Linux
Keyword: False Libraries Logic Mathlogic New Perl Perl Module Programming Str True Undef
Users rating: 0/10

License: Freeware Size: 12.29 KB
Development Tools  -  What's New for Object-Oriented Programming in MATLAB Webinar - Code Examples 1.0
These are the code examples used in the "What's New for Object-Oriented Programming in MATLABdlT«" webinar, which described the new object oriented features in Release 2008a.To use the code, add the top folder to your path. See the test* M-files...
112.64 KB  
Libraries  -  Math::Logic::Predicate 0.03
Math::Logic::Predicate is a Perl module to manage and query a predicate assertion database. SYNOPSIS use Math::Logic::Predicate; $db = new Math::Logic::Predicate; # Enter some predicates into the database $db->add(<
17.41 KB  
Libraries  -  perl58delta 5.8.8
perl58delta Perl module contains information about what is new for perl v5.8.0. This document describes differences between the 5.6.0 release and the 5.8.0 release. Many of the bug fixes in 5.8.0 were already seen in the 5.6.1 maintenance...
12.2 MB  
Libraries  -  Wx::Perl::Packager 0.07
Wx::Perl::Packager provides a module to assist packaging Wx based applications with PAR, ActiveState PerlApp / PDK and Perl A module to assist packaging Wx based applications with PAR, ActiveState PerlApp / PDK and Perl2Exe. All that is needed...
12.29 KB  
Libraries  -  Genezzo::Havok::SQLCompare 0.69
Genezzo::Havok::SQLCompare is a Perl module with SQL comparison functions. SYNOPSIS HavokUse("Genezzo::Havok::SQLCompare") FUNCTIONS SQL functions IN WHERE value IN (list) Returns TRUE if the value is present in the list, else FALSE....
481.28 KB  
Libraries  -  perlrpcgen 0.71
perlrpcgen is a Perl module that can generate Perl interfaces from ONC RPC interface definitions. SYNOPSIS perlrpcgen [--makefile] [--all] [--client] [--server] [--data] [--constants] [--module module] [--typemap typemap] [--fork] [--perl...
37.89 KB  
Libraries  -  Tuxedo 2.08
Tuxedo is a Perl extension module for Tuxedo. This module provides the following functionality... C style interface The Tuxedo perl module gives you access to almost all of the tuxedo 8.1 apis from perl. In most cases you can take the C API...
33.79 KB  
Libraries  -  OzDB 0.02
OzDB is a database Perl interface module for OzBot. SYNOPSIS use OzDB; The OzDB Perl module handles authentication and access control for the OzBot based utility bots. The basic database format is the authentication schema. This is based on...
12.29 KB  
Libraries  -  Sort::Versions 1.5
Sort::Versions is a Perl 5 module for sorting of revision-like numbers. SYNOPSIS use Sort::Versions; @l = sort { versioncmp($a, $b) } qw( 1.2 1.2.0 1.2a.0 1.2.a 1.a 02.a ); ... use Sort::Versions; print lower if versioncmp(1.2, 1.2a) ==...
5.12 KB  
Libraries  -  Net::Whois::RIPE 1.23
Net::Whois::RIPE is an object-oriented Perl library module that provides methods to query, retrieve, and update RIPE-157 formatted objects from whois servers that support this format. In particular, both the Asian and European Internet...
32.77 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 3.15.3
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB