Math::Logic::Predicate 0.03 review

Download
by rbytes.net on

License: Perl Artistic License
File size: 16K
Developer: Luke Palmer
0 stars award from rbytes.net

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(retract( 'smart(_)' );

# Make a query
$query = $db->parse( 'human(H) & name(H, X) ?' );
$iter = $db->match($query, $iter);

# Get the results
$name = $db->get($iter, 'X');

# Store it in a rule
$db->add( 'human_name(H, N) := human(H) & name(H, N).' );

# Use it in a query
$iter = $db->match( 'human_name(lister, N) ?' );

# Save it to a file
use Storable;
store($db->rules, 'red_dwarf');

Requirements:
Perl

Math::Logic::Predicate 0.03 keywords