CSC 366 Standard Demo Page

The following text was written to the standard output stream when the wildcard.pro program was executed from swi-prolog.

        mcruz@arch-desktop$ swipl     
        Welcome to SWI-Prolog (Version 2.7.16)
        Copyright (c) 1993-1996 University of Amsterdam.
        All rights reserved.
        For help, use ?- help(Topic). or ?- apropos(Word).
        
        
        ?- module(demo), consult('prolang_v3.pro').
        true.

        ~ LISTS THE PART OF THE KNOWLEGE BASE PERTAINING TO THE NAMES RELATION
        demo:  ?- listing(names).
        user:names :-
            pokemon(N, _, _, _, _),
            write(N),
            nl,
            fail.
        user:names.

        true.

        ~ LISTS THE PART OF THE KNOWLEGE BASE PERTAINING TO THE TYPES RELATION
        demo:  ?- listing(types). 
        user:types :-
            pokemon(_, type(T), _, _, _),
            write(T),
            nl,
            fail.
        user:types.

        true.

        ~ LIST ALL POKEMON NAMES
        demo:  ?- names.
        eevee
        leafeon
        espeon
        flareon
        vaporeon
        jolteon
        bulbasaur
        squirtle
        pikachu
        charmander
        true.

        ~ LIST ALL POKEMON TYPES
        demo:  ?- types.
        normal
        leaf
        psychic
        fire
        water
        electric
        leaf
        water
        electric
        fire
        true.

        ~ FIND A LEAF TYPE
        demo:  ?- leaf(Name).
        Name = leafeon ;
        Name = bulbasaur.

        ~ FIND A FIRE TYPE
        demo:  ?- fire(Name).
        Name = flareon ;
        Name = charmander.

        ~ FIND A WATER TYPE
        demo:  ?- water(Name).
        Name = vaporeon ;
        Name = squirtle.
        
        ~ FIND A ELECTRIC TYPE
        demo:  ?- electric(Name).
        Name = jolteon ;
        Name = pikachu.

        ~ FIND A NORMAL TYPE
        demo:  ?- normal(Name).
        Name = eevee.

        ~ FIND A PSYCHIC TYPE
        demo:  ?- psychic(Name).
        Name = espeon.

        ~ LIST THE NAMES OF ALL POKEMON WITH STRONGATK
        demo:  ?- strongatk(Name), write(Name), nl, fail.
        flareon
        vaporeon
        bulbasaur
        pikachu
        false.

        ~ LIST THE NAMES OF ALL POKEMON WITH WEAKATK
        demo:  ?- weakatk(Name), write(Name), nl, fail.
        eevee
        leafeon
        espeon
        jolteon
        squirtle
        charmander
        false.

        ~ LIST THE NAMES OF ALL POKEMON WITH STRONGDEF
        demo:  ?- strongdef(Name), write(Name), nl, fail.
        eevee
        espeon
        flareon
        bulbasaur
        charmander
        false.

        ~ LIST THE NAMES OF ALL POKEMON WITH WEAKDEF
        demo:  ?- weakdef(Name), write(Name), nl, fail.
        leafeon
        vaporeon
        jolteon
        squirtle
        pikachu
        false.

        ~ LIST THE NAMES OF ALL FAST POKEMON 
        demo:  ?- fast(Name), write(Name), nl, fail.
        eevee
        vaporeon
        false.

        ~ LIST THE NAMES OF ALL SLOW POKEMON 
        demo:  ?- slow(Name), write(Name), nl, fail.
        leafeon
        espeon
        flareon
        jolteon
        bulbasaur
        squirtle
        pikachu
        charmander
        false.