Find Jobs
Hire Freelancers

Boolean Expression Parser and Converter

$30-35 USD

Cancelled
Posted over 15 years ago

$30-35 USD

Paid on delivery
I require C++ code that parses a logical formula and puts it in Conjunctive Normal Form. The compiler I am using is Turbo C++ 3.0, and thus I would appreciate the coder using only very simple code so that I can easily integrate the code you write into my software project. (I will approve the code you write when you submit it; you must be willing to make any changes I request if I accept your bid.) Please use the apstring and apvector include files. They are all free and available from [login to view URL]~ola/ap/code/ , along with any of the other ap classes you require. I would like the logical formula to be parsed as an apstring. Each literal in the logical formula will be represented as an integer. The negation of a formula, whether a single literal or a parenthetical clause, will be represented with the minus sign "-". The "and" operator will be represented with an ampersand, "&," the "or" operator will be represented with a pipe, "|", and the implication operator (i.e., the operator such that "a implies b" means a is true if b is true) will be represented by a semicolon, ";". Incorporate the order of operations into your solution. Here is a sample formula: ((-(2&3)|-(1|-3|4)&3&-(2;3))|(1|2|3)) There is a Java version of what I want programmed available online: [login to view URL] . Do not copy their code (it's in Java anyway); however, you may look at it to get an idea of what I want. This should be a relatively simple job for a programmer who knows what they are doing. Remember, I want the code written in a simple manner, so that my (very old) compiler will be able to use it. I want to be able to call a single function that will run on an inputted apstring and convert to conjunctive normal form as I have requested. The output should be of the following form: (1|3|2|5)&(-3|1|4|2)&(-2)&(1|2|2) (Obviously, that is not the CNF version of the formula listed above; but this should give you some idea of how the output should look.) I will test the accuracy your code using Bexpred. I will not release funds until I am satisfied that your code is correct, and it meets my specification. Thank you. -Phil ## Deliverables I have listed all requirements above.
Project ID: 3060234

About the project

6 proposals
Remote project
Active 16 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
6 freelancers are bidding on average $25 USD for this job
User Avatar
See private message.
$29.75 USD in 7 days
4.8 (274 reviews)
7.1
7.1
User Avatar
See private message.
$25.50 USD in 7 days
4.9 (89 reviews)
5.3
5.3
User Avatar
See private message.
$29.75 USD in 7 days
5.0 (30 reviews)
4.3
4.3
User Avatar
See private message.
$16.15 USD in 7 days
5.0 (4 reviews)
1.9
1.9
User Avatar
See private message.
$29.75 USD in 7 days
0.0 (1 review)
0.0
0.0
User Avatar
See private message.
$17 USD in 7 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
United States
5.0
3
Member since May 13, 2005

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.