Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7700953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:52:03+00:00 2026-05-31T22:52:03+00:00

I get the Operator Expected error at the end of the two following rules

  • 0

I get the “Operator Expected” error at the end of the two following rules but i can’t understand why.

testDrivenChecking :-
%Stores all the methods of the projet which are tested by a unit test 
findall(allTestedMethods, 
    (create(allTestMethods, 'method', _, _), 
        addProperty(allTestMethods, 'annotation', 'Test', _, _), %Method created and ensures that it's a test.
        not(delete(allTestMethods, 'method', _, _)), %The test should not be deleted
        addReference(allTestMethods, 'calls', allTestedMethods, _, _),
        not(remReference(allTestMethods, 'calls', allTestedMethods, _, _))), %Ensures that the test keep testing the method
    allTestedMethodsList),
list_to_set(allTestedMethodsList, allTestedMethodSet),

%Stores all the methods of the project which are not tests or main
findall(allMethods, 
    (create(allMethods, 'method', _, _),
        not(addProperty(allMethods, 'annotation', 'Test', _, _)), 
        not(addProperty(allMethods, 'name', 'main', _, _)), 
    allMethodsList),
list_to_set(allMethodsList, allMethodsSet),  

%Intersection gives the set of methods which are not tested in restMethods
intersection(allTestedMethodSet, allMethodSet, restMethods),

%Gives the lengths of each set
length(allTestedMethodSet, LengthTest), 
length(allMethodSet, LengthMethods),
length(restMethods, LengthRest). 

I’ve seek for hours but I really can’t find why I doesn’t work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:52:04+00:00Added an answer on May 31, 2026 at 10:52 pm

    This:

    findall(allMethods, 
            (create(allMethods, 'method', _, _),
             not(addProperty(allMethods, 'annotation', 'Test', _, _)), 
             not(addProperty(allMethods, 'name', 'main', _, _)), 
            allMethodsList),
    

    should be:

    findall(allMethods, 
            (create(allMethods, 'method', _, _),
             not(addProperty(allMethods, 'annotation', 'Test', _, _)), 
             not(addProperty(allMethods, 'name', 'main', _, _))), 
            allMethodsList),
    

    Note the additional closing parenthesis in the fourth line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We can get the type returned by function in gcc using the typeof operator
I want to define std::tr1::hash<boost::tuple<A,B,C> > . But I get an error that doesn't
Running the code below gives me the error -bash: [: -ne: unary operator expected
Why does the following not compile? It says error: expected primary-expression before ‘>’ token.
I am struggling to get my head around operator overloading. In this case the
I get this 'error' when running PEVerify on a custom generated assembly. [MD](0x8013124C): Error:
i get a valid fd object from a caller. How can i find out
I'm trying to get my head around the use of the tilde operator, and
Given the following code, I try to implement the public static Point operator +(int
The goal is to get an unambiguous status that can be evaluated in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.