Getting an undergraduate research experience in an unfamiliar topic I am a second-year Computer Science undergraduate.
I have been steadily getting into mathematics - after taking the basics in my first year and taking a course in set theory my second year I realized that if I want to get into a good graduate program in mathematics I would need to have had some research experience (and possibly a published paper).
That is why I asked my set theory professor if there is a way I could work on some open problem this summer (with him advising me). He was very polite and helpful and did offer me two topics on which he was working now - one was related to unification in modal logic, and the other related to definability in modal logic. Unfortunately, I am just now taking a course on logic - and that is classical first order logic (and we probably won't have much time to get too into deep results).
That's why I've come here to ask for advice:

*

*Is it a wise idea to embark on such a "research" ( my professor did offer some basic materials and papers to look up ) without prior experience in this specific field?
(My concern is that because I am feeling desperate to have a undergrad research experience , I will make the mistake to accept any kind of field for that.)


*Obviously, since I have just been introduced to Modal Logic, the results of my hypothetical research experience will not be too fruitful ( or at least this is a high probability ), but if I develop a good work ethic then I will probably have the opportunity to continue this research for another two years under the supervision of my professors - is that a potential reason to do this research?


*Another concern I have is that If I spend more time on this topic I may end up with lower grades in my classes. And since this is not an official undergraduate research experience program, I may not have an legitimate excuse when applying to a grad school.
To restate my question in perhaps less vague way: If I am not very familiar with a research topic my professor offered me, should I skip it until I get good enough in the topics I am studying now, or should I embrace it and work hard enough to advance in the given topic (possibly long enough to produce at least one article)?
Edit:

*

*My professor knows well that I haven't learnt Modal Logic before - so far we've had some brief meetings in which he gave some exposition on Modal Logic and specifically some insight into his paper.

*I am not switching from CS to Math per se, but right now I think that I would prefer to pursue a research career in mathematics primarily, and hopefully with some applications in CS. I will finish my CS undergraduate, and hopefully I will be able to enter a good Masters or Phd program in Mathematics.

*I am neither from UK, nor US. I am from Bulgaria, and I am not sure how  the university system here compares to the UK, or US ones, but I wanted to  get a more general answer on whether attempting such a research is better (given a certain urgence in having a paper published) than waiting out until I get more proficient in some area and attempting research in it.

 A: I think you need to decide whether your career is to be in mathematics, CS, or some strategic combination of the two. Even if it's mathematics you seem to have hopes for applications to CS. 
Thinking that modal logic might be useful in pursuing artificial intelligence, I took the opportunity to chat informally with some people who are doing serious work in AI at major corporations, and got mixed opinions on that idea. But AI is a field full of strong opinions
and diverse approaches, so the useful news is that there seems to be some
informed support for a connection. 
Especially if your professor is interested in the
relevant parts of modal logic, a publishable paper that reaches towards AI
applications might be feasible. (I'm thinking about a 'real' publication
in a serious journal, not one of the commercial 'pay to play' pretend
journals that are so rapidly proliferating these days.)
This is quite deliberately not 'advice' because I don't know you, your capabilities,
or even your real interests well enough to give advice. This is to get you
thinking about career possibilities that might combine your various interests.
That is the kind of thinking I believe you need to do in order to answer
your basic question for yourself---and to sustain your motivation through
the inevitable moments of despair amongst triumphs that are part of serious research.
