This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % Solving Boolean expressions with Prolog | |
| % Parsing | |
| % prop([-,+,a,*,b,c],T). gives: T = not(or(var(a), and(var(b), var(c)))) | |
| prop([A|R], var(A), R):- char_type(A, lower). | |
| prop([-|A], not(C), R):- prop(A, C, R). | |
| prop([+|A], or(C,D), R2):- prop(A, C, R1), prop(R1, D, R2). | |
| prop([*|A], and(C,D), R2):- prop(A, C, R1), prop(R1, D, R2). | |
| prop(T,A):- prop(T,A,[]). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Login script for UIB-proxy if you lack the following: | |
| # Any web browser, | |
| # a network manager, | |
| # wireless network | |
| # graphical user interface | |
| echo "Username: " | |
| read USER | |
| echo "Password: " | |
| read -s PASS |
NewerOlder