-
Notifications
You must be signed in to change notification settings - Fork 0
/
Generate.h
58 lines (43 loc) · 1.3 KB
/
Generate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef SOLVING_01_04_MOFIFY_H
#define SOLVING_01_04_MOFIFY_H
#include "Interpretation.h"
#include "Formula.h"
#include "Sat.h"
#include "vecInt.h"
/**
* This is a modified version of problem solving session 01
* exercice 4.
* Here we continue to generate a random formula, but we do not print
* it, but store it inside Formula
*/
/**
* Generate and print a random clause with nbLiterals literals
* @param f the formula
* @param clauseNumber : the clause to generate
* @param : the number of literals that contain the clause
*/
void generateClause(Formula f,int clauseNumber, int nbLiterals);
/**
* Generate and print nbClauses
* @param f the formula
* @param clauseNumber the clause to genrate
* @param nbLiterals the number of literals in the clause
* @param nbVariablesInFormula the number of variables in the formula
*/
void generateAllClauses(Formula f);
/**
* Generate a full random formula
* @param number of variables
* @param number of clauses
* @return the formula
*/
void generateFullRandomFormula(Formula *f,int nbVars,int nbClauses);
/**
* Generate a 3-SAT random formula
* Each clause have to contain exactly 3 literals
* @param number of variables
* @param number of clauses
* Return the formula
*/
void generate3RandomFormula(Formula *f,int nbVars,int nbClauses);
#endif