f



Two programs with same logic

Hi,
Two set of codes can be compared by using
beyond compare or other equivalent software
to determine the areas of differences and the
areas of similarities. But, there are scenarios
in which the same logic would be used by 2 set of
programs/softwares but that the variable names
might be different. So, how to determine this
without executing the program ? Is there any tool
that will help in identifying the existence of similar
logics in two different programs ? Any ideas ?

Thx in advans,
Karthik Balaguru
0
12/20/2009 3:42:18 PM
comp.lang.c 30434 articles. 2 followers. spinoza1111 (3246) is leader. Post Follow

12 Replies
641 Views

Similar Articles

[PageSpeed] 11

karthikbalaguru <karthikbalaguru79@gmail.com> writes:
>in which the same logic would be used by 2 set of

  Determining whether two programs behave the same for
  every input should in general be equivalent to the

http://en.wikipedia.org/wiki/Halting_problem

  .

  For special conditions, it should still be possible: 
  For example, when variables are only renamed, one 
  can replace both name sequences by generated names.

  (I have removed other groups from the �Newsgroups:�
  header.)

0
ram
12/20/2009 3:50:16 PM
ram@zedat.fu-berlin.de (Stefan Ram) writes:
> karthikbalaguru <karthikbalaguru79@gmail.com> writes:
>>in which the same logic would be used by 2 set of
>
>   Determining whether two programs behave the same for
>   every input should in general be equivalent to the
>
> http://en.wikipedia.org/wiki/Halting_problem
>
>   .
>
>   For special conditions, it should still be possible: 
>   For example, when variables are only renamed, one 
>   can replace both name sequences by generated names.
>
>   (I have removed other groups from the »Newsgroups:«
>   header.)

The original article was cross-posted to
comp.os.linux.development.apps, comp.programming,
comp.unix.programmer, and comp.lang.c.  Why did you remove everything
but comp.lang.c?  The question isn't specific to C or to any other
language; surely comp.programming would be more appropriate.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
0
Keith
12/20/2009 6:19:41 PM
Keith Thompson <kst-u@mib.org> writes:
>The question isn't specific to C or to any other language;
>surely comp.programming would be more appropriate.

  Since it was posted to comp.lang.c, I assumed that the
  OP was referring to a C program. This assumption might
  have been wrong, but I had it at the time I was reading
  his OP.

>Why did you remove everything but comp.lang.c?

  Since I had this assumption, I deemed the other groups
  to be not appropriate. (I might have been wrong with
  this assessment.)

  It is my own posting style not to crosspost to multiple
  groups without sufficient reason. This was another reason
  for me to trim the Newgroup header.

0
ram
12/20/2009 6:40:19 PM
"karthikbalaguru" <karthikbalaguru79@gmail.com> wrote in message news:
> Two set of codes can be compared by using
> beyond compare or other equivalent software
> to determine the areas of differences and the
> areas of similarities. But, there are scenarios
> in which the same logic would be used by 2 set of
> programs/softwares but that the variable names
> might be different. So, how to determine this
> without executing the program ? Is there any tool
> that will help in identifying the existence of similar
> logics in two different programs ? Any ideas ?
>
I think such exist. Whilst in the general case "do two programs have the 
same output for the same input?" is the same as the halting problem, you are 
probably not interested in the general case, but intwo programs which have 
been copied from the same source, with identifiers changed and maybe a few 
minor control paths added. 


0
Malcolm
12/20/2009 7:20:09 PM
On 20 Dec 2009 at 15:50, Stefan Ram wrote:
> karthikbalaguru <karthikbalaguru79@gmail.com> writes:
>>in which the same logic would be used by 2 set of
>
> Determining whether two programs behave the same for every input
> should in general be equivalent to the
> http://en.wikipedia.org/wiki/Halting_problem

A gold medal there for exceeding even the customary level of uselessness
in a clc response.

It's obvious that the OP doesn't care about whether two programs behave
the same for every input. He's interested in the question:
heuristically, given two programs, are they "very similar"?

Notice that there are plenty of practical reasons for wanting to answer
this question:
* if the programs are given as source code, an instructor wants to check
for copying-with-superficial-changes; or a lawyer wants to check for a
GPL infringement
* if the programs are binary, anti-virus vendors might be interested in
this

Compare that with the halting problem, which has no practical
application and is of purely theoretical interest.

0
Antoninus
12/20/2009 7:30:20 PM
On Dec 20, 11:42=A0pm, karthikbalaguru <karthikbalagur...@gmail.com>
wrote:
> Hi,
> Two set of codes can be compared by using
> beyond compare or other equivalent software
> to determine the areas of differences and the
> areas of similarities. But, there are scenarios
> in which the same logic would be used by 2 set of
> programs/softwares but that the variable names
> might be different. So, how to determine this
> without executing the program ? Is there any tool
> that will help in identifying the existence of similar
> logics in two different programs ? Any ideas ?
>
> Thx in advans,
> Karthik Balaguru

As others have pointed out, the general problem is equivalent to the
Halting problem and is not solvable by an automated tool.

However, there are useful levels of similarity, where "similarity" is
a generalized identity:

(1) Similarity after compiler lexical analysis: "printf( \"Hello world\
\n\" );" as a fragment is similar in this way to "printf(\"Hello world\
\n\");"

(2) Similarity after parsing: "int a; a =3D 1+1;" is similar in this
sense to "int b; b =3D 1+1;"

(3) Similarity after code motion, elimination and optimization that
preserves intent: "int a; int b; a =3D 0; b =3D 0;" is similar to "int b;
int a; b =3D 0; a =3D 0;". "if (b || -1) c();" is similar in this sense to
"c();"

Factoring compilers better and providing an open architecture would
allow us to use compilers for far more than merely compiling. Instead
of shipping compilers, we should ship components. But, it's much more
amusing here to engage in the politics of personal destruction.
0
spinoza1111
12/22/2009 12:10:34 PM
karthikbalaguru wrote:
> Hi,
> Two set of codes can be compared by using
> beyond compare or other equivalent software
> to determine the areas of differences and the
> areas of similarities. But, there are scenarios
> in which the same logic would be used by 2 set of
> programs/softwares but that the variable names
> might be different. So, how to determine this
> without executing the program ? Is there any tool
> that will help in identifying the existence of similar
> logics in two different programs ? Any ideas ?

As others say, it would be difficult at best to find dups. But a
couple approaches that could help. One might be to run both codes
through an obfuscator which would replace the programmer's meaningful
variable names with generated names. Then compare. But there's still
a lot of room for programming style to mess you up.

A second approach would be to compile both to assembler and compare
the assembler code. That should remove a fair amount of programmer
style problems but not all.
0
Joe
12/22/2009 7:05:34 PM
On 2009-12-20, karthikbalaguru <karthikbalaguru79@gmail.com> wrote:
> Hi,
> Two set of codes can be compared by using
> beyond compare or other equivalent software
> to determine the areas of differences and the
> areas of similarities. But, there are scenarios
> in which the same logic would be used by 2 set of
> programs/softwares but that the variable names
> might be different. So, how to determine this
> without executing the program ? Is there any tool
> that will help in identifying the existence of similar
> logics in two different programs ? Any ideas ?

The structural similarity you are hinting at can be easily found if you parse
the code into a nice abstract syntax tree representation. Then it's just a
matter of writing an equality function which compares two pieces of code.

This is easiest to understand and illustrate through the Lisp language.

The comparison is similar to a routine that compares two trees, except that it
has to understand all ``special forms'' in the language, and their semantics.
That is to say, the comparison has to behave as a ``code walker'', with respect
to two trees at the same time. It has to recognize all special syntactic
constructs, so that it can apply the right kind of comparison.

It also must be capable of performing variable renaming.

So for instance we might want these two to be found equivalent:

  (let ((x 1)) (+ x x))

  (let ((y 1)) (+ y y))

For thaat we have to recognize that we have two matching constructs
(both are ``let''). They both bind the same number of variables,
using the same initialization values. Next, we have to normalize
the bodies. We can do that by renaming the variables on each
side: e.g. both x and y get renamed to t0 (temporary variable #0).
Each time we rename a variable we generate a new temporary.
When we rename x to t0 and substitute, we end up with:

  (let ((t0 1)) (+ t0 t0))

And when we do the same substitution on the variable y on the second form we
of course also end up with:

  (let ((t0 1)) (+ t0 t0))

So now having done this substituion over the let, we can recursively process
the body of each let and continue comparing: we now end up comparing (+ t0 t0)
to (+ t0 t0). We have a positive match on the same symbol +, and we know that
it's a function call.  The two functions calls have the same number of
arguments, which we can compare one by one, finding an exact match in
ech position: the expression t0 trivially matches the expression t0.
Thus having reached bottom, we conclude that the two constructs are equivalent
(modulo variable naming).

This applies to the comparison of C programs too because for the C language,
you can pick this kind of tree representation with symbols and atoms.
Parse the code to that, and write a comparison which applies the right
kind of rules.

The question is the semantic depth that you want in the comparison.

Should the expression  !(!P || !Q) match P && Q, by the application of
De Morgan's law?

Does your equivalence function fold constant expressions, so that
2 + 2 matches 1 + 3?

There is a huge range of things you can do in between the most naive
static comparison (in which even differences in variable names do matter)
to running the program and trying to identify that it does the same things
to all inputs (running into the halting problem).


Now about implementing this. Turns out, the annoying part of parsing C to
structure is already done. For instance, there is this Japanese gentleman's
project called SC:

http://super.para.media.kyoto-u.ac.jp/~tasuku/sc/index-e.html

With this software, you would be able to just concentrate on writing the
equivalence function.
0
Kaz
12/22/2009 7:53:43 PM
On Dec 23, 12:05=A0am, Joe Beanfish <j...@nospam.duh> wrote:
> karthikbalaguru wrote:
> > Hi,
> > Two set of codes can be compared by using
> > beyond compare or other equivalent software
> > to determine the areas of differences and the
> > areas of similarities. But, there are scenarios
> > in which the same logic would be used by 2 set of
> > programs/softwares but that the variable names
> > might be different. So, how to determine this
> > without executing the program ? Is there any tool
> > that will help in identifying the existence of similar
> > logics in two different programs ? Any ideas ?
>
> As others say, it would be difficult at best to find dups. But a
> couple approaches that could help. One might be to run both codes
> through an obfuscator which would replace the programmer's meaningful
> variable names with generated names. Then compare. But there's still
> a lot of room for programming style to mess you up.
>

Agreed !

> A second approach would be to compile both to assembler and compare
> the assembler code. That should remove a fair amount of programmer
> style problems but not all.

Interesting approach ! I think, this is better than the earlier
approach. But, Need to know the kind of programmer style
problems that will not get covered by this second approach.
Any ideas ?

Thx in advans,
Karthik Balaguru
0
karthikbalaguru
12/27/2009 6:17:06 AM
On Dec 23, 12:53=A0am, Kaz Kylheku <kkylh...@gmail.com> wrote:
> On 2009-12-20, karthikbalaguru <karthikbalagur...@gmail.com> wrote:
>
> > Hi,
> > Two set of codes can be compared by using
> > beyond compare or other equivalent software
> > to determine the areas of differences and the
> > areas of similarities. But, there are scenarios
> > in which the same logic would be used by 2 set of
> > programs/softwares but that the variable names
> > might be different. So, how to determine this
> > without executing the program ? Is there any tool
> > that will help in identifying the existence of similar
> > logics in two different programs ? Any ideas ?
>
> The structural similarity you are hinting at can be easily found if you p=
arse
> the code into a nice abstract syntax tree representation. Then it's just =
a
> matter of writing an equality function which compares two pieces of code.
>
> This is easiest to understand and illustrate through the Lisp language.
>
> The comparison is similar to a routine that compares two trees, except th=
at it
> has to understand all ``special forms'' in the language, and their semant=
ics.
> That is to say, the comparison has to behave as a ``code walker'', with r=
espect
> to two trees at the same time. It has to recognize all special syntactic
> constructs, so that it can apply the right kind of comparison.
>
> It also must be capable of performing variable renaming.
>
> So for instance we might want these two to be found equivalent:
>
> =A0 (let ((x 1)) (+ x x))
>
> =A0 (let ((y 1)) (+ y y))
>
> For thaat we have to recognize that we have two matching constructs
> (both are ``let''). They both bind the same number of variables,
> using the same initialization values. Next, we have to normalize
> the bodies. We can do that by renaming the variables on each
> side: e.g. both x and y get renamed to t0 (temporary variable #0).
> Each time we rename a variable we generate a new temporary.
> When we rename x to t0 and substitute, we end up with:
>
> =A0 (let ((t0 1)) (+ t0 t0))
>
> And when we do the same substitution on the variable y on the second form=
 we
> of course also end up with:
>
> =A0 (let ((t0 1)) (+ t0 t0))
>
> So now having done this substituion over the let, we can recursively proc=
ess
> the body of each let and continue comparing: we now end up comparing (+ t=
0 t0)
> to (+ t0 t0). We have a positive match on the same symbol +, and we know =
that
> it's a function call. =A0The two functions calls have the same number of
> arguments, which we can compare one by one, finding an exact match in
> ech position: the expression t0 trivially matches the expression t0.
> Thus having reached bottom, we conclude that the two constructs are equiv=
alent
> (modulo variable naming).
>
> This applies to the comparison of C programs too because for the C langua=
ge,
> you can pick this kind of tree representation with symbols and atoms.
> Parse the code to that, and write a comparison which applies the right
> kind of rules.
>

Interesting. Agreed !

> The question is the semantic depth that you want in the comparison.
>

True !

> Should the expression =A0!(!P || !Q) match P && Q, by the application of
> De Morgan's law?
>
> Does your equivalence function fold constant expressions, so that
> 2 + 2 matches 1 + 3?
>
> There is a huge range of things you can do in between the most naive
> static comparison (in which even differences in variable names do matter)
> to running the program and trying to identify that it does the same thing=
s
> to all inputs (running into the halting problem).

Yeah. True !

> Now about implementing this. Turns out, the annoying part of parsing C to
> structure is already done. For instance, there is this Japanese gentleman=
's
> project called SC:
>
> http://super.para.media.kyoto-u.ac.jp/~tasuku/sc/index-e.html
>
> With this software, you would be able to just concentrate on writing the
> equivalence function.

Okay, I will look into this !

Thx,
Karthik Balaguru
0
karthikbalaguru
12/27/2009 7:10:16 AM
karthikbalaguru <karthikbalaguru79@gmail.com> writes:

> On Dec 23, 12:05�am, Joe Beanfish <j...@nospam.duh> wrote:
>> karthikbalaguru wrote:
>> > Hi,
>> > Two set of codes can be compared by using
>> > beyond compare or other equivalent software
>> > to determine the areas of differences and the
>> > areas of similarities. But, there are scenarios
>> > in which the same logic would be used by 2 set of
>> > programs/softwares but that the variable names
>> > might be different. So, how to determine this
>> > without executing the program ? Is there any tool
>> > that will help in identifying the existence of similar
>> > logics in two different programs ? Any ideas ?
>>
>> As others say, it would be difficult at best to find dups. But a
>> couple approaches that could help. One might be to run both codes
>> through an obfuscator which would replace the programmer's meaningful
>> variable names with generated names. Then compare. But there's still
>> a lot of room for programming style to mess you up.
>>
>
> Agreed !
>
>> A second approach would be to compile both to assembler and compare
>> the assembler code. That should remove a fair amount of programmer
>> style problems but not all.
>
> Interesting approach ! I think, this is better than the earlier
> approach. But, Need to know the kind of programmer style
> problems that will not get covered by this second approach.
> Any ideas ?

It's not just a question or programming style. You're at the semantics
of the programs.  The question is to compare the semantics of two
programs.  So you first have to represent the semantics of a program.
One way to do that would be to have a formal semantic definition of
the programming language, and to translate the programs into that
formalism,  and then compare thetheir formal semantics.
Unfortunately, not a lot of languages have a formal semantic
definition, and for most of the programming languages which have been
developed without such in mind, when one is developed for them, if it
is complete, then it is rather complex, giving formal semantic forms
that are not really more obvious than the original program (for
example, in the case of C).  In conclusion, for these kind of
programming language, the best way to express their semantics in a
formal way is to consider their compilation to some simplier
processor code, and then compare these codes.

Now of course when you compile these two programs:

(defun s1 (v) 
 (loop for e across v sum e))

(defun s2 (v)
  (do ((s 0)
       (i (1- (length v)) (1- i)))
      ((< i 0) s)
   (incf s (aref v i))))
     

you get two different listings, but you have to find a way to conclude
that they do exactly the same thing:

C/LISP[215]> (disassemble 's1)

Disassembly of function S1
(CONST 0) = 0
1 required argument
0 optional arguments
No rest parameter
No keyword parameters
19 byte-code instructions:
0     (CONST&PUSH 0)                      ; 0
1     (NIL&PUSH)
2     (CONST&PUSH 0)                      ; 0
3     (JMP L19)
5     L5
5     (LOAD&PUSH 4)
6     (LOAD&PUSH 3)
7     (CALLSR&STORE 1 1 1)                ; AREF
11    (LOAD&PUSH 0)
12    (LOAD&PUSH 2)
13    (CALLSR&STORE 2 53 0)               ; +
17    (LOAD&INC&STORE 2)
19    L19
19    (LOAD&PUSH 2)
20    (LOAD&PUSH 5)
21    (CALLS2&PUSH 72)                    ; LENGTH
23    (CALLSR&JMPIFNOT 1 50 L5)           ; >=
27    (POP)
28    (SKIP&RET 4)
NIL
C/LISP[216]> (disassemble 's2)

Disassembly of function S2
(CONST 0) = 0
1 required argument
0 optional arguments
No rest parameter
No keyword parameters
17 byte-code instructions:
0     (CONST&PUSH 0)                      ; 0
1     (LOAD&PUSH 2)
2     (CALLS2&PUSH 72)                    ; LENGTH
4     (CALLS2&PUSH 152)                   ; 1-
6     (JMP L20)
8     L8
8     (LOAD&PUSH 1)
9     (LOAD&PUSH 4)
10    (LOAD&PUSH 2)
11    (CALLSR&PUSH 1 1)                   ; AREF
14    (CALLSR&STORE 2 53 1)               ; +
18    (LOAD&DEC&STORE 0)
20    L20
20    (LOAD&PUSH 0)
21    (CALLS2&JMPIFNOT 148 L8)            ; MINUSP
24    (LOAD 1)
25    (SKIP&RET 4)
NIL


The semantics of assembly is not more obvious than the semantics of
high level programming languages.  The reason why you will work with
assembly is not that (otherwise we would keep programming in
assembly!).  The point of assembly, is that the instructions are
simplier: their semantics is simplier.  Therefore it is easier for
programs to work with it.  You want to compare semantics, then it's
simplier to compare the semantics of simplier instructions.  However,
you still have a lot of work to do, even if each step of this work
will be simplier.  But it is possible to infer mechanically from both
these assembly codes that each element of the vector is read, and
summed, and that the sum is returned by the function.  Therefore that
these two functions are equivalent semantically.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
0
pjb
12/27/2009 12:39:25 PM
In article <87fx6wmvym.fsf@hubble.informatimago.com>,
Pascal J. Bourguignon <pjb@informatimago.com> was apparently confused
about which newsgroup he was in when he wrote:
....
>Now of course when you compile these two programs:
>
>(defun s1 (v) 
> (loop for e across v sum e))
>
>(defun s2 (v)
>  (do ((s 0)
>       (i (1- (length v)) (1- i)))
>      ((< i 0) s)
>   (incf s (aref v i))))

(Channelling our good friend Kiki, who is so good at pointing out the
obvious)

Lisp and C are two different languages.

0
gazelle
12/27/2009 1:17:14 PM
Reply:

Similar Artilces:

Simple Welding of two small C/C++ Programs, But How??
Hi everyone, I'm a newbie to C/C++ and I need some help with a minor C program. My assignment is to take two programs and mesh them together. The 1st program I wrote compiles and works fine. The 2nd program is to add to the 1st program with an if_then_else statement, and it's code is also correct as well; I just don't know how to or where to put it into the rest of the 1st program to make it work as one. I've tried to modify it but I get compiler errors. I look forward to any help some kind soul can provide. The code with both pieces is below. Thanks, Basil Fawlty ...

C program is standard C++ program?
I want if "a C program is a standard C++ program, but not vice versa" is a correct statement? In a C++ program, we can use standard C libraries. However, we cannot use C++ libraries inside C program. Please advise. thanks!! strutsng@gmail.com wrote: > I want if "a C program is a standard C++ program, but not vice versa" > is a correct statement? No. void template() { } int main() { template(); } is a valid C, but invalid C++. Check your favorite textbook (you do have one, don't you?) or google for more informations on C and C++ incompatibilities. > ...

How to compile C++ program with templates to pure C or C++ program without templates?
Hi, I heard that debug some C++ templates is very difficult. I'm wondering whether it is possible to compile C++ program with templates to pure C or C++ program without templates? Best wishes, Peng In article <1129128623.514540.179850@g14g2000cwa.googlegroups.com>, PengYu.UT@gmail.com <PengYu.UT@gmail.com> wrote: >I heard that debug some C++ templates is very difficult. I'm wondering >whether it is possible to compile C++ program with templates to pure C >or C++ program without templates? The point of using templates is to not do that, since, that's also d...

Compiling a C program through another C program
As "spawnl" executes an exe through C code., similarly how can we compile a C program through another C program (on Windows platform) ? On Sep 28, 8:29 pm, Ajinkya <kaleajin...@gmail.com> wrote: > As "spawnl" executes an exe through C code., similarly how can we > compile a C program through another C program (on Windows platform) ? Command in unix platform will do too... On Sep 28, 10:29 pm, Ajinkya <kaleajin...@gmail.com> wrote: > As "spawnl" executes an exe through C code., similarly how can we > compile a C program through another ...

Do C++ programs start up more slowly than C programs?
The question is in the subject. Background: we have an application which was ported from Unix to Windows. The original Unix version was consciously written in C instead of C++ because, on Unix at least, C++ programs do take longer to start up due to needing to load the C++ library. And this is a program which needs to start up frequently and fast. However, in porting to Windows we needed to use some existing C++ code so the choice was made to fix up the existing C code so we could build it all as C++. We're now experiencing some performance problems on Windows and I'm ...

C or C++ program?
I need some advice regarding a coding requirement that may suggest the need for an object oriented solution. The code fragments presented here attempt to solve the problem in C. The problem: Data Packets are received from a socket and consist of 3 elements: the Packet Type, the "Item", and some Data. The Packet type represents either: (1) A Task to be performed on the Item using the supplied Data (2) A Condition that has arisen for the Item (3) A signal to exit A Task triggers a function that executes code based on the Packet's Item and Data. Often the Task will trigger...

Linking two C++ Programs ???
I want to link two C++ Programs such that a class defined in first program may be used in second program. Please can anyone help me as soon as possible. Neha wrote: > I want to link two C++ Programs such that a class defined in first > program may be used in second program. > Please can anyone help me as soon as possible. If you have two *programs*, then you talk interprocess communication, and that's not defined by the language, you need to ask in the forum for your OS. If you just have two *translation units*, two C++ files, it's absolutely possible. Compile them both...

HPGCC calling another c program from within a c program
Haven't seen a solution to calling another c program from within a c program, as one's routines migrate beyond 82kb limit would like to use c only instead of hybrid mix of sysRPL. Has anybody cracked it yet? ........ Off at a tangent, just recently been messing around with win_text, if anybody interested, added some more functionality to win_text_new.c, ie numerics only higlighted text box, a callback routine to validate your data. ...

Two questions about a program in C
Hi there! I have two simple questions about a program i'm doing: 1) if I write: enum logic {VERO=1, FALSO=0}; logic trovato=VERO; Is this correct according to the ANSI '89 standard? 2) I have these lines: void GetInfo(void) { int i=0; char Dato[256]; printf("Inserire i dati numero %i: ", ++i); scanf("%[^\n]", Dato); fflush(stdin); while( strcmp(Dato, "FINE") ) { Riempi_Info(Dato); //Fills an array called Estremi printf("Sigla: %s \t Inizio: %f \tFine: %f\n", Sigle[Nstr], Estremi[Nstr][0], Estremi[Nstr][1] ); i++; Nstr++; print...

Logic Programming in C-Kermit
After a few rounds of Object-Oriented Programming in C-Kermit, I hope you've seen that C-Kermit can do OOP to solve some tough problems. I am about to embark on Patterns, an advanced software subject, when I tumble on the following puzzle in a Prolog book (Prolog and Lisp are considered as the two big tools to research artificial intelligence): =============================================================================== Implement an inference engine that can handle symmetric 2-place predicates (those whose arguments can be interchanged) without looping. Put the functor symmetr...

C (functional programming) VS C++ (object oriented programming)
I think I become more and more alone... Everybody tells me that C++ is better, because once a project becomes very large, I should be happy that it has been written in C++ and not C. I'm the only guy thinking that C is a great programming language and that there is no need to program things object oriented. Many people says also that they save more time by programming projects object oriented, but I think its faster to program them in a good structured functional way. What do you think? -- -= Joe Mayo* =- * This is a fake name. Joe Mayo wrote: > I think I become more and more a...

second order logic programming and thematic role based logic programming
Im not a great programmer so im looking for fairly simple introductions into second order logic programming. I really just want to be able to quantify over a set of finite predicates {the set of finite predicates availible in the knowledge base}. Also if anyone knows anything about thematic roles and could help me find a logic programinng lanquage based on that. I'd be ecstatic. On 7 =C1=D7=C7, 09:26, Sean Clarke <sea...@gmail.com> wrote: > Im not a great programmer so im looking for fairly simple > introductions into second order logic programming. I really just want > ...

Creating a User Interface with c/c++ so as to be called by another C/C++main program
Hi!! I want to create a user interface for my controlling Console main program. I would like to create a library of function (.lib) which start a user interface in the same thread. I have heard something about MFC, but in some examples I have faund a .uir file which I don=B4t know how to generate. Thank you pableratz@gmail.com wrote: > Hi!! > > I want to create a user interface for my controlling Console main > program. I would like to create a library of function (.lib) which > start a user interface in the same thread. > > I have heard something about MFC, but in ...

help Combining two c++ programs
Please help. I have created two programs. One a Shellexecute program to launch a program and the other a screensaver. Now I'm trying to combine them with no luck. I combine them and all I get is a black screen. The screensaver seemed to be orginally setup for like opengl graphice but all I want to do is run an app. Can anyone offer advice?? and ohh yaaa. of course I'm a beginner at all of this. Screensaver program *******************************************************************************************************************************************************************...

Web resources about - Two programs with same logic - comp.lang.c

Program - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Program involving naloxone kits supported in Sask.
The Council of the College of Physicians and Surgeons say naloxone kits should be more broadly available to people who need it.

Mac users can now try out new Microsoft Office features early with ‘Office Insider’ program
Microsoft opened up a beta test program for Windows users last November, letting Microsoft Office fanatics get early access to upcoming new features. ...

European authorities angered by VW's North American compensation program
... Government/Legal , Volkswagen , Diesel Volkswagen is under attack by European legislators after refusing to expand its US compensation program ...

Simple free app alerts you when a program (or hacker) takes control of your webcam
No matter how many times you read about it on the web, there's always a fresh new moment of uneasiness when you see someone mention that software ...

Measure to halt Syrian refugee program hits dead end
The Senate rejected a motion to advance the bill to a final vote on Wednesday

SolarCity Introduces SunRaising, A Solar Referral Fundraising Program For Nonprofits
SolarCity today announced SunRaising, a referral program that allows nonprofit organizations to raise additional funds by encouraging members ...

Facebook tests program to boost diversity in the workplace
The social-media giant wants to increase the number of minorities in its workforce which is overwhelmingly white and male.

Black kids are being kept out of gifted programs: Why having more black teachers could help
... Be Young, Gifted And Black it helps to have a black teacher,” looks at a recent study on the low numbers of students of color in gifted programs. ...

How Washington's Youngsters Turned The Program Around
Ask historically great programs like Texas football or UCLA basketball; losing has a way of compounding itself in college sports. With constant, ...

Resources last updated: 1/24/2016 8:02:22 AM